Re: [NTG-context] [tikz] pgfplotsreplacepdfmark error

2018-08-31 Thread Hans Hagen

On 8/31/2018 11:04 PM, Pierre-Francois Bonnefoi wrote:

Hello,


On 31 Aug 2018, at 22:03, Hans Hagen  wrote:

On 8/31/2018 9:52 PM, Pierre-Francois Bonnefoi wrote:

Hello,
I'm currently working on some graphs with pgfplots and tikz and got this error :

Undefined control sequence
\pgfplotsreplacepdfmark {pgfid7}{pgfid6}
---
This error occurs only in conjunction with :
\tikzstyle{every picture}+=[remember picture]
I use the standalone version of ConTeXt on OS X.
Do you have any idea to get rid of it ?

i dont' even have a clue what a pdf marks does (two decades ago it was 
something in postscript to add pdf related functionality like hyperlinks)

low level pdf jugling is likely to conflict with how context does things

just try this:

\let\pgfplotsreplacepdfmark\gobbletwoarguments



I've tried it and obviously the error is gone, as the possibility to get a 
named coordinate in a pgfplot graph that can be used to put an overlay on the 
graph.

The solution that I've found is to put the definition of the function 
pgfplotsreplacepdfmark in a place where the second pass of the luatex 
interpreter could find it.

I've put these lines, copied from the file 
'/texmf-modules/tex/generic/pgfplots/pgfplots.code.tex'  into the file 
'cont-yes.mkiv' :


that one will be overwritten next update .. better use cont-loc.mkiv in 
texmf-local/tex/context/user/ or so and add


\writestatus{}{pdfmark hack}

and keep an eye on tikz fixes


-
\unprotect
% Replaces the pdfmark for #1 by that of #2.
%
% Note that when this macro is executed (it resides in the .aux file),
% the pdfmark for #2 is typically UNDEFINED.
%
% #1: the pgfpictureid to modify
% #2: the pgfpictureid which contains the correct values
\def\pgfplotsreplacepdfmark#1#2{%
 \pgfsys@getposition{#1}{\pgfplots@loc@TMPa}%
 \ifx\pgfplots@loc@TMPa\relax
 % hm. strange. Perhaps the driver does not support it?
 \else
 % Ok, make a "lazy replace":
 \expandafter\let\expandafter\pgfplots@glob@TMPa\csname 
pgf@sys@pdf@mark@pos@#1\endcsname
 \expandafter\global\expandafter\let\csname 
pgf@sys@pdf@mark@pos@#1@old\endcsname=\pgfplots@loc@TMPa%
 %
 \expandafter\gdef\csname pgf@sys@pdf@mark@pos@#1\endcsname{%
 % this is the lazy replace, assuming knowledge about how
 % pgf calls its internal structures :-/
 %
 % If pgf changes its name, this macro will never be
 % called and we do not hurt someone.
 \pgfsys@getposition{#2}{\pgfplots@loc@TMPa}%
 \ifx\pgfplots@loc@TMPa\relax
 % oh - the picture if for #2 has no remembered name!?
 % Perhaps something failed?
 % try a fall-back. This will most fail (most
 % probably). Issue a warning?
 \csname pgf@sys@pdf@mark@pos@#1@old\endcsname
 \else
 % use #2:
 \pgfplots@loc@TMPa
 \fi
 }%
 \fi
}%

\protect

And now the overlay works as intended : I could draw a graph in a Tikz picture, 
compute some intersections and put an overlay on it from a second Tikz picture.

It seems that the order used by the parser to input files could be patched to 
correct this error.

Thank you very much for your support,
best regards,
Pierre-François.




--

-
  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] [tikz] pgfplotsreplacepdfmark error

2018-08-31 Thread Pierre-Francois Bonnefoi
Hello,

> On 31 Aug 2018, at 22:03, Hans Hagen  wrote:
> 
> On 8/31/2018 9:52 PM, Pierre-Francois Bonnefoi wrote:
>> Hello,
>> I'm currently working on some graphs with pgfplots and tikz and got this 
>> error :
>> 
>> Undefined control sequence
>> \pgfplotsreplacepdfmark {pgfid7}{pgfid6}
>> ---
>> This error occurs only in conjunction with :
>> \tikzstyle{every picture}+=[remember picture]
>> I use the standalone version of ConTeXt on OS X.
>> Do you have any idea to get rid of it ?
> i dont' even have a clue what a pdf marks does (two decades ago it was 
> something in postscript to add pdf related functionality like hyperlinks)
> 
> low level pdf jugling is likely to conflict with how context does things
> 
> just try this:
> 
> \let\pgfplotsreplacepdfmark\gobbletwoarguments
> 
> 
I've tried it and obviously the error is gone, as the possibility to get a 
named coordinate in a pgfplot graph that can be used to put an overlay on the 
graph.

The solution that I've found is to put the definition of the function 
pgfplotsreplacepdfmark in a place where the second pass of the luatex 
interpreter could find it.

I've put these lines, copied from the file 
'/texmf-modules/tex/generic/pgfplots/pgfplots.code.tex'  into the file 
'cont-yes.mkiv' :
-
\unprotect
% Replaces the pdfmark for #1 by that of #2.
%
% Note that when this macro is executed (it resides in the .aux file),
% the pdfmark for #2 is typically UNDEFINED.
%
% #1: the pgfpictureid to modify
% #2: the pgfpictureid which contains the correct values
\def\pgfplotsreplacepdfmark#1#2{%
\pgfsys@getposition{#1}{\pgfplots@loc@TMPa}%
\ifx\pgfplots@loc@TMPa\relax
% hm. strange. Perhaps the driver does not support it?
\else
% Ok, make a "lazy replace":
\expandafter\let\expandafter\pgfplots@glob@TMPa\csname 
pgf@sys@pdf@mark@pos@#1\endcsname
\expandafter\global\expandafter\let\csname 
pgf@sys@pdf@mark@pos@#1@old\endcsname=\pgfplots@loc@TMPa%
%
\expandafter\gdef\csname pgf@sys@pdf@mark@pos@#1\endcsname{%
% this is the lazy replace, assuming knowledge about how
% pgf calls its internal structures :-/
%
% If pgf changes its name, this macro will never be
% called and we do not hurt someone.
\pgfsys@getposition{#2}{\pgfplots@loc@TMPa}%
\ifx\pgfplots@loc@TMPa\relax
% oh - the picture if for #2 has no remembered name!?
% Perhaps something failed?
% try a fall-back. This will most fail (most
% probably). Issue a warning?
\csname pgf@sys@pdf@mark@pos@#1@old\endcsname
\else
% use #2:
\pgfplots@loc@TMPa
\fi
}%
\fi
}%

\protect 

And now the overlay works as intended : I could draw a graph in a Tikz picture, 
compute some intersections and put an overlay on it from a second Tikz picture.

It seems that the order used by the parser to input files could be patched to 
correct this error.

Thank you very much for your support,
best regards,
Pierre-François.

-- 
Bonnefoi Pierre-Francois|  E-mail : bonne...@unilim.fr 
http://p-fb.net/
Universite de Limoges, Laboratoire XLIM |   Tel : 06 28 18 03 38
123 av Albert Thomas|  Mrs. Peel, we're needed...
87060 Limoges CEDEX - FRANCE| The Avengers.

___
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] [tikz] pgfplotsreplacepdfmark error

2018-08-31 Thread Hans Hagen

On 8/31/2018 9:52 PM, Pierre-Francois Bonnefoi wrote:

Hello,

I'm currently working on some graphs with pgfplots and tikz and got this error :

Undefined control sequence
\pgfplotsreplacepdfmark {pgfid7}{pgfid6}
---

This error occurs only in conjunction with :
\tikzstyle{every picture}+=[remember picture]


I use the standalone version of ConTeXt on OS X.

Do you have any idea to get rid of it ?
i dont' even have a clue what a pdf marks does (two decades ago it was 
something in postscript to add pdf related functionality like hyperlinks)


low level pdf jugling is likely to conflict with how context does things

just try this:

\let\pgfplotsreplacepdfmark\gobbletwoarguments

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

[NTG-context] [tikz] pgfplotsreplacepdfmark error

2018-08-31 Thread Pierre-Francois Bonnefoi
Hello,

I'm currently working on some graphs with pgfplots and tikz and got this error :

Undefined control sequence
\pgfplotsreplacepdfmark {pgfid7}{pgfid6}
---

This error occurs only in conjunction with :
\tikzstyle{every picture}+=[remember picture]


I use the standalone version of ConTeXt on OS X.

Do you have any idea to get rid of it ?

best regards,
Pierre-François.
-- 
Bonnefoi Pierre-Francois|  E-mail : bonne...@unilim.fr 
http://p-fb.net/
Universite de Limoges, Laboratoire XLIM |   Tel : 06 28 18 03 38
123 av Albert Thomas|  Mrs. Peel, we're needed...
87060 Limoges CEDEX - FRANCE| The Avengers.

___
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] luatex on the garden

2018-08-31 Thread Hans Hagen

On 8/31/2018 8:56 PM, Pablo Rodriguez wrote:

On 08/31/2018 10:27 AM, Hans Hagen wrote:

[...]
A lot of work went into this release and we hope that it's worth it. I
will rmove some older code paths in a few weeks (less code that way) so
then beta's will assume the new binary is used.


Many thanks for the new LuaTeX, Hans.

I have used for a document (http://blog.ousia.tk/0005/#context-source),
which hashes (with both SHA512 and SHA256) 38 external files.

With the previous beta, it took about 160s to completely generate the
PDF output (always with --purgeall). With the current beta, it only took
9.9s, which is a huge improvement.
I know that this might be the most favorable case for the new LuaTeX
improvements, but this is even faster than using the external binaries
that the OS (Linux64 in this case) provides.

This faster compilation could be also decreased when LuaJIT includes
bitwise operators, couldn’t it be?


it's unlikely that that will happen (basically luajit stays 5.2 so 
eventualy we might have to drop it) but if you do some extensive testing 
you will notice that mkiv with luatex is not that much slower than 
luajittex on regular documents (definitely the gap is becoming less)


luajit(tex) has some built in knowledge about its bit functions so it 
can optimize them (just like math functions, which is why these 
calculating benchmarks work out so well)


in context we use bitwise operators in luatex and the bit functions when 
in luajittex (these operators are not used that frequently yet) and you 
don't want to know the details



Many thanks for your excellent work again,

Thanks.

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
___

[NTG-context] Luatex 1.08.0 announcement

2018-08-31 Thread luigi scarso
==
LuaTeX 1.08 2018-08-28
==


(1) This release is a prelude to 1.10, the next stable iteration of LuaTeX
after version 1.00.

(2) Lua 5.3 is now considered to be default and we might use 5.4 in version
1.10. There are no real functional changed expected. You still need to
rename
the binary for 5.3!

(3) Binary mode is no longer available in MPlib but it is still available in
stand alone MetaPost. This simplifies compilation and reduces dependencies.

(4) The dependency on Poppler for pdf image inclusion has been removed. We
now use a small dedicated library written by Pawel Jakowski. We no longer
need c++ compilers. We're in the process of making it behave well on all
platforms. It has been tested on intel platforms.

(5) We know that there can be some (alignment) issues with the arm platform
but these are looked into. Therefore, later this year we will release 1.09.
Version 1.10 is planned for TeXlive. We hope that ffi works ok on intel and
arm platforms at that point.

(6) There have been some extensions to the Lua libraries and some callbacks
have been added. Also, a few new primitives have been introduced. The
documentation mentions the stable extensions.

(7) There are the usual bug fixes and cleanups but there have been no real
fundamental changes in the API.

The LuaTeX team
___
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] luatex on the garden

2018-08-31 Thread Pablo Rodriguez
On 08/31/2018 10:27 AM, Hans Hagen wrote:
> [...]
> A lot of work went into this release and we hope that it's worth it. I 
> will rmove some older code paths in a few weeks (less code that way) so 
> then beta's will assume the new binary is used.

Many thanks for the new LuaTeX, Hans.

I have used for a document (http://blog.ousia.tk/0005/#context-source),
which hashes (with both SHA512 and SHA256) 38 external files.

With the previous beta, it took about 160s to completely generate the
PDF output (always with --purgeall). With the current beta, it only took
9.9s, which is a huge improvement.

I know that this might be the most favorable case for the new LuaTeX
improvements, but this is even faster than using the external binaries
that the OS (Linux64 in this case) provides.

This faster compilation could be also decreased when LuaJIT includes
bitwise operators, couldn’t it be?

Many thanks for your excellent work again,

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
___

Re: [NTG-context] Adjust the dimensions of a sub-table in an extreme table ?

2018-08-31 Thread Fabrice Couvreur
Hi Pablo,
Thank you for the solution.
Fabrice

Le jeu. 30 août 2018 à 22:49, Pablo Rodriguez  a écrit :

> On 08/30/2018 10:16 PM, Fabrice Couvreur wrote:
> > Hello,
> > In the main table there are three sub-tables. How to adapt the
> > dimensions of the second and third sub-tables to that of the first
> > sub-table ?
>
> Hi Fabrice,
>
> I guess that \startxtable[option=stretch] is what you might need for
> your second and third nested tables.
>
> I hope it helps,
>
> 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] removing and reinstating xmlsetup's

2018-08-31 Thread Hans Hagen

On 8/30/2018 10:11 AM, Hans van der Meer wrote:


On 30 Aug 2018, at 00:53, Hans Hagen > wrote:


On 8/29/2018 5:54 PM, Hans van der Meer wrote:

Doing: \xmlremovesetup{SETUP}
does not seems to have an effect.
Is it possible to deactivate a xml setup and reinstate at at a later 
point in time?

normally one uses modes for that (inside the setup)

ir you can decide for explicit filtering (\xmlfilter)


I cannot imagine how to accomplish it that way, given my intentions.

Solved it with a global if (not so happy with global code, but could not 
think of a neater, local solution).

All other solutions I tried typeset multiple copies of 








\startxmlsetups process:topnode  (structures the output, collects all 
s here)

\global\topleveltrue
\xmlall{#1}{subsubnode}
\global\toplevelfalse
\stopxmlsetups
\startxmlsetups process:subsubnode
\iftoplevel
…
\fi
\stopxmlsetups

\startxmlsetups process:topnode
\globalenablemode[toplevel]
\xmlall{#1}{subsubnode}
\globaldisablemode[toplevel]
\stopxmlsetups

\startxmlsetups process:subsubnode
\doifmode {toplevel} {
…
}
\stopxmlsetups

you can also filter, i.e. explcitly apply setups

\startxmlsetups process:topnode
\xmlfilter{#1}{subsubnode/command(xml:foo)}
\stopxmlsetups

if they are really topnodes you can do (watch the /):

\startxmlsetups process:topnode
\xmlfilter{#1}{/subsubnode/command(xml:foo)}
\stopxmlsetups



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

[NTG-context] luatex on the garden

2018-08-31 Thread Hans Hagen

Hi,

We now have a new version of luatex on the garden. This is the anual 
context meeting release which is a prelude to next years 1.10 version 
for texlive. The version number is 1.08 (as 1.09 will be out in a few 
months and mostly concerns some fixes needed for arm).


For the average user there are no real differences (luatex 1.10 will 
basically be functionality complete). Of course we use lua 5.3 (1.10 
might actually use 5.4). You can expect (depending on usage) a bit 
better performance as i wrapped some (yet) unsupported stuff into 
fallback functions.


Things to watch out for: context now uses a one-pass mp approach which 
so far worked ok (alan an i tested it in regular usage). This might 
boost performance in case where extensive mp embedding takes place.


Poppler is gone and replaced by pplib by Pawel Jakowski written for us. 
Currently he and luigi are finetuning the c code for portability. Users 
should not notice this (but it removes a dependency). More on some of 
the consequences later. It also makes the binary smaller.


The binary mode in mplib is not available in luatex. It has no real 
benefits (and is probably not used, not even by alan) apart from 
research. This removes a large dependency on foreign code (we try to 
minimlize that) and again makes the binary smaller. We might introduce 
64 bit scaled at some point (luigi will look into that next year).


There are some changes in terms of efficiency that kick in now. I only 
tested on my setup but it's probably ok. Don't expect drastic 
improvements wrr to average performsance from now on. For those on 
windows: i noticed a performance difference between the native and mingw 
binaries (with native being slower, mostly due to format saving and 
loading).


A lot of work went into this release and we hope that it's worth it. I 
will rmove some older code paths in a few weeks (less code that way) so 
then beta's will assume the new binary is used.


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] Font Awesome

2018-08-31 Thread Hans Hagen

On 8/30/2018 9:43 PM, Willi Egger wrote:

Hraban, thank you! I got it working.

Willi


On 30 Aug 2018, at 12:44, Henning Hraban Ramm  wrote:

Am 2018-08-30 um 11:13 schrieb Willi Egger :


I would like to use symbols form the Font Awesome. However I see that in 
symb-imp-fontawesome.mkiv all symbols except the [wheelchair] are commented. - 
What is the reason?


Ah, that’s why they don’t work anymore. I didn’t look into that file...

You can use my version that works with current Fontawesome 5.1.1 fonts:
https://github.com/fiee/ConTeXt/tree/master/symbols
Download the fonts from https://fontawesome.com/

What if you just process

   context symb-imp-fontawesome.mkiv

it should show list with symbols (but it might depend on the oft file 
uses at it changed).


We might need to add some fancy synonyms but not 700 names of which most 
can be picked up from the font.


(It's up to Wolfgang to decide that.)

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
___