Re: [NTG-context] behavior of \vfill has changed in latest beta

2015-12-21 Thread Thomas A. Schmitz

On 12/21/2015 04:33 PM, Wolfgang Schuster wrote:

Why don’t you use the makeup environment?

\definemakeup[centered][pagestate=start,headerstate=start]

\starttext

\startmakeup[centered]

vertically centered?

\stopmakeup

\stoptext

Wolfgang


Because the \vfill is hidden deep in setup commands and part of a before 
key=value pair.


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] behavior of \vfill has changed in latest beta

2015-12-21 Thread Thomas A. Schmitz

On 12/21/2015 04:28 PM, Hans Hagen wrote:


it's more that i forgot to set \null ... you can put this in cont-new.mkiv

\def\null{\hpack{}}


Thank you Hans!

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] Plot using pgfplots: order of appearance of two simple plots

2015-12-21 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello Mojca,

thanks a lot for your answer and proposals.

I'll try them one after other... Option "reverse legend" is most promising so 
far.

Best regards,

Lukas


On Mon, 21 Dec 2015 14:45:25 +0100, Mojca Miklavec 
 wrote:


On 21 December 2015 at 13:55, Procházka Lukáš Ing. - Pontex s. r. o. wrote:

Hello,

I'm just starting with pgfplots library.

I have two plots, one being filled:


\usemodule[pgfplots]

\starttext
  \starttikzpicture
\startaxis[legend entries={Sin,Cos}]
  \addplot+[mark=none] {sin(deg(x))};
  \addplot+[mark=none,fill]{cos(deg(x))};
\stopaxis
  \stoptikzpicture
\stoptext


The problem is that the latter plot hides the former as they appear in the
order they are defined.

A solution would be to change the order - to swap plot "Sin" and "Cos".

But also I need to keep the order in which plots appear in the legend - it's
important to keep "Sin" followed by "Cos";
I'm looking for a way to set the order of plots, something like

\addplot+[mark=none,order=2] {sin(deg(x))};
\addplot+[mark=none,order=1] {sin(deg(x))};

or

\addplot+[mark=none,z=2] {sin(deg(x))};
\addplot+[mark=none,z=1] {sin(deg(x))};

Although I'm having pgfplots.pdf ("Package PGFPLOTS manual", 20. 10. 2013)
open, I cannot find a solution.

Would anyone more experienced have an idea?


There is an option "z buffer", but I guess that's only applicable for
a single \addplot.

There is an option "reverse legend" (page 213), but you might need to
take extra care about colours:

\startaxis[legend entries={Cos,Sin},reverse legend]
  \addplot+[mark=none,fill]{cos(deg(x))};
  \addplot+[mark=none] {sin(deg(x))};
\stopaxis

There is an option "reverse stacked plots" which I don't fully
understand, but it claims to reverse a number of things.

There is (somewhat low level) support for layers in TikZ. You can look
for "on background", "pgfonlayer", "on background layer", etc. (But
that calls for slightly more work than just providing a simple option
like "zorder=...").

If you don't get the answer here, I would suggest you to ask the
author of pgfplots, to raise the question on their mailing list (if
they have one) or to try luck on http://tex.stackexchange.com/. There
are probably not so many experts in pgfplots on this mailing list and
the question doesn't seem to be ConTeXt-specific.

(I'm often using matplotlib with export to TikZ, even though that's
sometimes horribly slow and probably not exactly what you were looking
for either.)

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
___



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

___
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] strange output in math display mode

2015-12-21 Thread Wolfgang Schuster



Otared Kavian 
21. Dezember 2015 um 14:14
Hi Dalyoung,

I can confirm that in displayed math, the digit 1 in the command 
\frac{1}{2} results in

494 > 1
which is unexpected…
However the command {1 \over 2} gives the correct result.

Actually there seems to be a spurious
494 >
in the source tree of the latest release, since any command such as 
\frac{a}{2} results in

494 > a
It's a spurious "\??mathstylecache" in math-ini.mkiv and I sent a fix to 
the dev-list.


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] Plot using pgfplots: order of appearance of two simple plots

2015-12-21 Thread Mojca Miklavec
On 21 December 2015 at 13:55, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
> Hello,
>
> I'm just starting with pgfplots library.
>
> I have two plots, one being filled:
>
> 
> \usemodule[pgfplots]
>
> \starttext
>   \starttikzpicture
> \startaxis[legend entries={Sin,Cos}]
>   \addplot+[mark=none] {sin(deg(x))};
>   \addplot+[mark=none,fill]{cos(deg(x))};
> \stopaxis
>   \stoptikzpicture
> \stoptext
> 
>
> The problem is that the latter plot hides the former as they appear in the
> order they are defined.
>
> A solution would be to change the order - to swap plot "Sin" and "Cos".
>
> But also I need to keep the order in which plots appear in the legend - it's
> important to keep "Sin" followed by "Cos";
> I'm looking for a way to set the order of plots, something like
>
> \addplot+[mark=none,order=2] {sin(deg(x))};
> \addplot+[mark=none,order=1] {sin(deg(x))};
>
> or
>
> \addplot+[mark=none,z=2] {sin(deg(x))};
> \addplot+[mark=none,z=1] {sin(deg(x))};
>
> Although I'm having pgfplots.pdf ("Package PGFPLOTS manual", 20. 10. 2013)
> open, I cannot find a solution.
>
> Would anyone more experienced have an idea?

There is an option "z buffer", but I guess that's only applicable for
a single \addplot.

There is an option "reverse legend" (page 213), but you might need to
take extra care about colours:

\startaxis[legend entries={Cos,Sin},reverse legend]
  \addplot+[mark=none,fill]{cos(deg(x))};
  \addplot+[mark=none] {sin(deg(x))};
\stopaxis

There is an option "reverse stacked plots" which I don't fully
understand, but it claims to reverse a number of things.

There is (somewhat low level) support for layers in TikZ. You can look
for "on background", "pgfonlayer", "on background layer", etc. (But
that calls for slightly more work than just providing a simple option
like "zorder=...").

If you don't get the answer here, I would suggest you to ask the
author of pgfplots, to raise the question on their mailing list (if
they have one) or to try luck on http://tex.stackexchange.com/. There
are probably not so many experts in pgfplots on this mailing list and
the question doesn't seem to be ConTeXt-specific.

(I'm often using matplotlib with export to TikZ, even though that's
sometimes horribly slow and probably not exactly what you were looking
for either.)

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
___

[NTG-context] Pgfplots - "reverse legend" by Lua

2015-12-21 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

one more question about pgfplots & Lua:

how to specify "reverse legend" by Lua?

Here are some examples:

- Plot 1 contains no Lua code and gives the desired result (OK);
- Plot 2 uses Lua to specify "legend entries" successfully (OK);
- Plot 3 tries to use Lua to specify "reverese legend", but doesn't work;


\usemodule[pgfplots]

\starttext
  Plot 1 -- OK

  \starttikzpicture
\startaxis[legend entries={Cos,Sin2,Sin},reverse legend]
  \addplot+[mark=none,fill,green]{cos(deg(x))}\closedcycle;
  \addplot+[mark=none,fill,yellow]{0.5*sin(deg(0.5*x))}\closedcycle;
  \addplot+[mark=none,]{sin(deg(x))}\closedcycle;
\stopaxis
  \stoptikzpicture

  Plot 2 -- Legend by Lua -- OK

  \starttikzpicture
%\startaxis[legend entries={Cos,Sin2,Sin}]
\cldcommand{startaxis{["legend entries"] = "{Cos,Sin2,Sin}"}}
  \addplot+[mark=none,fill,green]{cos(deg(x))}\closedcycle;
  \addplot+[mark=none,fill,yellow]{0.5*sin(deg(0.5*x))}\closedcycle;
  \addplot+[mark=none,]{sin(deg(x))}\closedcycle;
\stopaxis
  \stoptikzpicture

  Plot 3 -- Reverse legend by Lua -- not working

  \starttikzpicture
%\startaxis[legend entries={Cos,Sin2,Sin},reverse legend]
\cldcommand{startaxis{["legend entries"] = "{Cos,Sin2,Sin}", "reverse 
legend"}}
  \addplot+[mark=none,fill,green]{cos(deg(x))}\closedcycle;
  \addplot+[mark=none,fill,yellow]{0.5*sin(deg(0.5*x))}\closedcycle;
  \addplot+[mark=none,]{sin(deg(x))}\closedcycle;
\stopaxis
  \stoptikzpicture
\stoptext


So how to make Plot 3 work?

Best regards,

Lukas


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

t-Plot22.mkiv
Description: Binary data


t-Plot22.pdf
Description: Adobe PDF document
___
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] Bug in table ?

2015-12-21 Thread Christian Prim

Thanks Hans

works again with latest beta.

Christian

Am Son, 20. Dez, 2015 um 10:56 schrieb Hans Hagen :

On 12/20/2015 5:30 PM, Christian Prim wrote:
> Dear list
>
> with the latest context I get wrong alignment in table.

i'll look at it, not so much a table, more some side effect

> I know table is deprecated. But I couldn't get xtable to baseline 
align


nor really depricated but complemented by other mechanisms that some
purposes are better

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
___
___
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] strange output in math display mode

2015-12-21 Thread Otared Kavian
Hi Dalyoung,

I can confirm that in displayed math, the digit 1 in the command \frac{1}{2} 
results in 
494 > 1
which is unexpected…
However the command {1 \over 2} gives the correct result.

Actually there seems to be a spurious
494 >
in the source tree of the latest release, since any command such as \frac{a}{2} 
results in
494 > a

Best regards: OK

> On 21 Dec 2015, at 14:01, Jeong Dal  wrote:
> 
> Dear Hans,
> 
> After updating the minimal, I got a strange output of math display mode.
> Would you please check it?
> 
> Here is an example.
> 
> Best regards,
> Thank you.
> 
> Dalyoung
> 
> 
> \starttext
> 
> Here is a strange output of math formula. It is displayed correctly in text 
> line, but is displayed strangely in math display mode.
> \blank
> Here is a correct output  in text line.  $\int_0^t B(s)\ dB(s) = \frac{1}{2} 
> B^2(t) - \frac{1}{2} t.$
> \blank
> But in the output of display mode, the location of the sub- super-script of 
> the integral sign is not normal and the output of \type{ \frac{1}{2} B^2(t)} 
> is wrong.
> 
> \startformula
> \int_0^t B(s)\ dB(s) = \frac{1}{2} B^2(t) - \frac{1}{2} t.
> \stopformula
> \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
> ___

___
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] strange output in math display mode

2015-12-21 Thread Jeong Dal
Dear Hans,

After updating the minimal, I got a strange output of math display mode.
Would you please check it?

Here is an example.

Best regards,
Thank you.

Dalyoung


\starttext

Here is a strange output of math formula. It is displayed correctly in text 
line, but is displayed strangely in math display mode.
\blank
Here is a correct output  in text line.  $\int_0^t B(s)\ dB(s) = \frac{1}{2} 
B^2(t) - \frac{1}{2} t.$
\blank
But in the output of display mode, the location of the sub- super-script of the 
integral sign is not normal and the output of \type{ \frac{1}{2} B^2(t)} is 
wrong.

\startformula
\int_0^t B(s)\ dB(s) = \frac{1}{2} B^2(t) - \frac{1}{2} t.
\stopformula
\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] Plot using pgfplots: order of appearance of two simple plots

2015-12-21 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

I'm just starting with pgfplots library.

I have two plots, one being filled:


\usemodule[pgfplots]

\starttext
  \starttikzpicture
\startaxis[legend entries={Sin,Cos}]
  \addplot+[mark=none] {sin(deg(x))};
  \addplot+[mark=none,fill]{cos(deg(x))};
\stopaxis
  \stoptikzpicture
\stoptext


The problem is that the latter plot hides the former as they appear in the 
order they are defined.

A solution would be to change the order - to swap plot "Sin" and "Cos".

But also I need to keep the order in which plots appear in the legend - it's important to keep 
"Sin" followed by "Cos";
I'm looking for a way to set the order of plots, something like

\addplot+[mark=none,order=2] {sin(deg(x))};
\addplot+[mark=none,order=1] {sin(deg(x))};

or

\addplot+[mark=none,z=2] {sin(deg(x))};
\addplot+[mark=none,z=1] {sin(deg(x))};

Although I'm having pgfplots.pdf ("Package PGFPLOTS manual", 20. 10. 2013) 
open, I cannot find a solution.

Would anyone more experienced have an idea?

Best regards,

Lukas


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

t-Plot2.mkiv
Description: Binary data


t-Plot2.pdf
Description: Adobe PDF document
___
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] behavior of \vfill has changed in latest beta

2015-12-21 Thread Hans Hagen

On 12/21/2015 4:18 PM, Thomas A. Schmitz wrote:

Hi,

the behavior of \vfill has changed in the latest beta. In some of my
setups, I used code like this to produce vertically centered content:

\starttext

\null\vfill

vertically centered?

\vfill\null

\stoptext


it's more that i forgot to set \null ... you can put this in cont-new.mkiv

\def\null{\hpack{}}



-
  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] behavior of \vfill has changed in latest beta

2015-12-21 Thread Wolfgang Schuster



Thomas A. Schmitz 
21. Dezember 2015 um 16:18
Hi,

the behavior of \vfill has changed in the latest beta. In some of my 
setups, I used code like this to produce vertically centered content:


\starttext

\null\vfill

vertically centered?

\vfill\null

\stoptext

Why don’t you use the makeup environment?

\definemakeup[centered][pagestate=start,headerstate=start]

\starttext

\startmakeup[centered]

vertically centered?

\stopmakeup

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

[NTG-context] behavior of \vfill has changed in latest beta

2015-12-21 Thread Thomas A. Schmitz

Hi,

the behavior of \vfill has changed in the latest beta. In some of my 
setups, I used code like this to produce vertically centered content:


\starttext

\null\vfill

vertically centered?

\vfill\null

\stoptext

This works with the beta of 2015.11.19 19:13, but no longer with 
2015.12.21 12:16. Not sure if intended, side effect, or bug?


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
___

[NTG-context] beta

2015-12-21 Thread Hans Hagen

Hi,

A few words on luatex 0.87 and the beta. As we're progressing to the 
first stable luatex release (stable in the sense that functionality will 
become stable, after 1.0 we will continue anyway) a couple of changes 
take place. And as context is the primary testbed it gets adapted too.


(1) Luatex functionality gets finalized which means that some gets 
removed, some adapted and some extended. The last months not much 
changed in context in terms of functionality but adapting to luatex 
canhave temporary side effects as you might have noticed.


(2) Luatex functionality that was already present but not yet used gets 
applied and again this should normally not have side effects. It might 
result in new (or extended) features.


(3) Context code gets optimized but I must admit that there is not much 
room left for that. Some new luatex functionality makes it possible to 
code a bit less redundant (handy for tracing). That can result in left 
over bit and pieces, typos etc. Lucky us we have Wolfgang to check that.


(4) Performance should be a little better but also depends on the source 
and quality of styles. If you encounter bottlenecks and can prove that 
it's due to poor context core performance I can have a look at it.


(5) The new font loader is now used and still can have some issues but 
in general it behaves okay.


(6) There are still some mechanisms that need to be mkiv'd. For instance 
I'm looking at columnsets. Some of the oldest code (early luatex) 
probably needs to be checked.


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
___