[NTG-context] Diagnositics in LuaTeX

2020-12-28 Thread Henri Menke
Dear lists,

Recently I've been working a bit on PGF/TikZ and many times I wished I had
certain metrics that are available in regular programming languages.  In
particular I am missing:

- A callback that is triggered when a macro is defined.  This would allow me to
trap when a cs is defined in the wrong place.  That could probably be done by
overriding `\def` but there are some gotchas with prefixes, e.g. `\long\def`.

- A callback that is triggered when a token is expanded (or executed in the case
of primitives).  In conjunction with the previous request, this would allow me
to measure code coverage by comparing which macros are defined and which ones
are used.

- Switches to trap on certain pathological events.  For example I want to trap
when TeX inserts a frozen \relax because a number couldn't be read.  Another
thing I want to trap is `Missing character: There is no  in font !`.
There are probably more silent TeX errors that I currently don't have in mind.

Are these things possible in LuaTeX right now or could they be made possible in
the future?

Kind regards,
Henri

___
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] LuaMetaTeX: \hbox dir vs. direction

2020-12-17 Thread Henri Menke
Dear Hans,

In LuaMetaTeX the directional syntax for boxes

\hbox dir TLT {...}

is no longer supported.  Currently this is necessary for PGF because certain
things like shading have to always be typeset in TLT.  Is there a simple
workaround?

Cheers, Henri

See also: https://github.com/pgf-tikz/pgf/issues/958

___
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] Why is the textarea not centered by default?

2020-11-05 Thread Henri Menke
On Thu, 2020-11-05 at 11:28 +0100, Sylvain Hubert wrote:
> Dear List,
> 
> \starttext \showframe \showsetups \stoptext
> 
> This minimal example without further configuration shows that the default
> value for backspace, textwidth and paperwidth are 2.5cm, 15cm, 21cm resp.,
> which means that the textarea is horizontally 0.5cm off the center by default,
> and one can indeed see a clear extra margin on the right side.
> 
> This seems weird but I'm no expert of typesetting, so does anyone know why it
> has been set like that?

%D The default dimensions are quite old and will not change. The funny fractions
%D were introduced when we went from fixed dimensions to relative ones. Since
%D \CONTEXT\ is a dutch package, the dimensions are based on the metric system.
The
%D asymmetrical layout is kind of handy for short quick||and||dirty stapled
%D documents.

https://github.com/contextgarden/context-mirror/blob/343fdd99ef79884fca1f86b49c950e03939aeedf/tex/context/base/mkiv/page-lay.mkiv#L1373-L1377

> 
> Thanks.
> 
> Best,
> Sylvain
> __
> _
> 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] Adding built-in support for Serbian language

2020-10-30 Thread Henri Menke
> (PS: I would say that adding support for transliteration of the text
> from one script to the other would be a really nice feature. Then you
> could type your text for a book once and have it typeset in both
> versions without any extra effort :)

There is Philipp Gesang's transliterator package:
https://gitlab.com/phgsng/transliterator
https://modules.contextgarden.net/cgi-bin/module.cgi/ruid=199735311/action=view/id=50

Cheers, Henri
___
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] Join Foundation to Support ConTeXt for the next 50 Years

2020-10-18 Thread Henri Menke
On 17/10/20, 10:46, Suminda Sirinath Salpitikorala Dharmasena wrote:
> Hello,
> 
> In order to keep ConTeXt maintained for the very long term future, I am
> wondering if there a possibility to join a foundation like the Apache
> Software Foundation, Linux Foundation, etc.

https://group.contextgarden.net/

> Also perhaps more to a more liberal license so there can be commercial use
> of ConTeXt with some of it trickling to as code contributions, wider usage
> which may further translate to support and consultancy work for those
> familiar with ConTeXt. If commercial system uses ConTeXt as part of their
> system there is a chance that is it is in their best interest to maintain
> it also long as these systems are in operation.

The main application of ConTeXt is producing PDFs and since these
outputs are not “derived works” (using the wording of the GPL), the
license terms of ConTeXt do not apply to them.  I don't think anyone is
actually modifying the ConTeXt core and even then, as long as you don't
distribute binaries but only PDFs you don't have to publish the source.

> Also perhaps it might be best than just depend on TeX maybe fork TeX and
> improve it in a ConTeXt dependent way. This way ConTeXt more feature-rich
> and easier to maintain than carrying the technical burden of TeX. There are
> system like SILE typesetter (https://sile-typesetter.org/) which are
> developed from the ground up and also The Tectonic Typesetting System (
> https://tectonic-typesetting.github.io/en-US/).

What are you even talking about?  ConTeXt has been using a forked TeX
engine for at least a decade.  LuaTeX is solely developed by and for the
ConTeXt people.

BTW, SILE is something completely different (and can't do math yet) and
Tectonic is just a thin wrapper around XeTeX.

Cheers, Henri

> This is just some ideas which I thought might be worthwhile considering.
> 
> Suminda

> ___
> 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] color problem

2020-10-02 Thread Henri Menke
On 01/10/20, 20:55, Susanne G. Loeber wrote:
> Dear Reader,
> 
> I have a colored section, text in another color and a TikZ picture with a
> differently colored node, following each other. However, either the node
> gets the wrong color or the following paragraph, see example below.
> 
> Is there something wrong with the section settings? How do I get all the
> colors right without using a paragraph in between?

From experience, this usually works:

\prependvalue{starttikzpicture}{\dontleavehmode\forcecolorhack}

Cheers, Henri

> 
> \setuphead[chapter]
> 
> [
> 
> style={\tfd},
> 
> color={A2plus},
> 
> ]
> 
> \setuphead[section]
> 
> [
> 
> style={\tfc},
> 
> color={A3plus},
> 
> ]
> 
> 
> \definecolor[A1plus][h=5CAF00]
> 
> \definecolor[A2plus][h=B6437E]
> 
> \definecolor[A3plus][h=606ABD]
> 
> \definecolor[A4plus][h=FFC700]
> 
> \definecolor[A5plus][h=D0202B]
> 
> \definecolor[A6plus][h=EF8600]
> 
> \definecolor[A7plus][h=0082AA]
> 
> 
> \setupcolors[textcolor=A1plus]
> 
> 
> \usemodule[tikz]
> 
> 
> 
> \starttext
> 
> 
> \startchapter[title={Colour test}, ref=colourtest]
> 
> 
> \startsection[title={Section}]
> 
> \starttikzpicture
> 
> \draw[text=A6plus] (0,0) rectangle (2,1) node[right] {node text should be
> orange};
> 
> \stoptikzpicture
> 
> 
> \par This a paragraph which gets the colour of the section for no reason.
> 
> 
> \stopsection
> 
> 
> \stopchapter
> 
> 
> \startchapter[title={Colour test 2}, ref=colourtest]
> 
> 
> \startsection[title={Another section }]
> 
> 
> \par This a paragraph in the appropriate text color (green).
> 
> 
> 
> \starttikzpicture
> 
> \draw[text=A6plus] (0,0) rectangle (2,1) node[right] {node text is orange};
> 
> \stoptikzpicture
> 
> 
> \stopsection
> 
> 
> \stopchapter
> 
> \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://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
___


[NTG-context] [BUG] \registerexternalfigure doesn't work

2020-08-19 Thread Henri Menke
Dear list,

To get properties of a figure without actually typesetting it, it is
handy to use \registerexternalfigure.  However, trying to use it fails.
Consider the following MWE:

\starttext
\registerexternalfigure[cow.pdf]
\stoptext

Looking at the definition in grph-inc.mkiv reveals that is it complete
bogus.

\unexpanded\def\registerexternalfigure
  {\dotripleempty\grph_include_register}

\def\grph_include_register[#1][#2][#3]%
  {\startnointerference
 \c_grph_include_test_only
 \setfalse\c_grph_include_flush % == test ?
 \externalfigure[#1][#2][#3]% or
 \externalfigure[#1][#2,\c!display=,\c!mask=,\c!object=\v!no]%
   \stopnointerference}

I guess this is not intentional and was left over at some point.  Could
you please fix this?

Cheers,
Henri
___
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] How to set pdfminorversion in LMTX?

2020-08-10 Thread Henri Menke
On 10/08/20, 01:20, Aditya Mahajan wrote:
> Hi,
> 
> How do I set pdfminorversion in LTMX. Both \pdfminorversion and \pdfvariable 
> minorversion fail with undefined control sequence.

Does lpdf.setversion(major, minor) work in LMTX?

Cheers, Henri

> 
> Thanks,
> Aditya
> ___
> 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] Checking existence of a macro (control sequence) by Lua

2020-05-28 Thread Henri Menke
On 28/05/20, 00:42, cont...@vivaldi.net wrote:
> Hello,
> 
> is it possible to check whether a macro exists (or - is it a non-\undefined
> control sequence) with Lua? Suppose:
> 
> 
> \starttext
>   \def\MyMacro{Ahoj}
>   \def\MyMac#1#2{Something}
> 
>   \startluacode
> IsDefined = function(ctl_seq)
>   print("CS " .. ctl_seq ..
> (tex.IsCS(ctl_seq) -- Or what to come here?
>"is defined" or "is
> unknown") .. ".")
> end
> 
> -- So the function should print to the console:
> 
> IsDefined("MyMacro") --> "CS MyMacro is defined."
> IsDefined("MyMac") --> "CS MyMac is defined."
> IsDefined("bf") --> "CS bf is defined."
> IsDefined("dummy") --> "CS dummy is unknown."
> 
>   \stopluacode
> \stoptext
> 
> 
> Is it possible?

Yes, that is what the token library is there for.

\starttext

\def\MyMacro{Ahoj}
\def\MyMac#1#2{Something}

\startluacode
local str = { [true] = "defined", [false] = "undefined" }
for _, macro in ipairs({ "MyMacro", "MyMac", "bf", "dummy" }) do
context(macro .. " is " .. str[token.is_defined(macro)] .. "\\par")
end
\stopluacode

\stoptext

Cheers, Henri

> 
> Best regards,
> 
> Lukas
> ___
> 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] PGFPlots does not work with LMTX

2020-04-24 Thread Henri Menke
That has already been reported on the pgfplots bugtracker
https://github.com/pgf-tikz/pgfplots/issues/350
and here on the mailing list
https://mailman.ntg.nl/pipermail/ntg-context/2020/097514.html

Here I quote Aditya's workaround:

I have no clue what pgfplotsbinary.data.code.tex does, but simply 
bypassing that works for the simple example above.

Simply create an empty file with the name pgfplotsbinary.data.code.tex in 
your current directory and compile your example.

Note that if your code uses any of the features which are provided by this 
file (and I am not sure what they are), then it will fail. But at least 
this "fix" works for the simple example above.

On 24/04/20, 20:23, Jairo A. del Rio wrote:
> I'm testing LMTX with documents I've written for ConTeXt MKIV. I've copied
> the third party module folder from ConTeXt and some of them work like a
> charm (t-vim, TikZ, etc.). Nonetheless, I find PGFPlots just doesn't work.
> I've tried with the minimal example:
> 
> \usemodule[pgfplots]
> \starttext
> Hola
> \stoptext
> 
> and LMTX gives the following error message (omitting spaces):
> 
> tex error   > tex error on line 42 in file
> pgfplotsbinary.data.code.tex: ! Undefined control sequence
> l.42 \catcode`\ =11^^I\expandafter\xdef\csname pgfp@bin@
> 
> \the\counter^^I\endcsname{^^20}\endgroup\advance\counter by1
> lua error:
> ?
> 
> The control sequence at the end of the top line of your error message was
> never
> \def'ed. You can just continue as I'll forget about whatever was undefined.
> 
> Why does it happen and how to make the code work?

> ___
> 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] Cannot build plain format

2020-04-16 Thread Henri Menke
On 16/04/20, 12:35, Hans Hagen wrote:
> On 4/16/2020 10:51 AM, Henri Menke wrote:
> > Dear list,
> > 
> > I'm trying to build the plain format but it fails with
> > 
> >  $ mtxrun --script plain --make
> >  [...]
> >  ! I can't find file `luatex-plain.tex'.
> > 
> > but mtxrun can find the file.
> > 
> >  $ mtxrun --find-file "luatex-plain.tex"
> >  
> > /opt/context/tex/texmf-context/tex/generic/context/luatex/luatex-plain.tex
> > 
> > What am I doing wrong?
> > 
> > Also another question: Does LMTX come with a plain format?
> 
> currently not but as i for now also have added luatex to it (as it's handy
> for testing) i can also add plain related files (these depend on luatex)

Thanks, but what about the first part of my email?  Why can't I build
the plain format in ConTeXt standalone (MkIV, not LMTX) even though
mtxrun can locate the file?

Cheers, Henri

> 
> Hans
> 
> (fwiw: I only use plain for an occasional test of the shipped generic font
> loader files.)
> 
> 
> -
>   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
> ___
___
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] Cannot build plain format

2020-04-16 Thread Henri Menke
Dear list,

I'm trying to build the plain format but it fails with

$ mtxrun --script plain --make
[...]
! I can't find file `luatex-plain.tex'.

but mtxrun can find the file.

$ mtxrun --find-file "luatex-plain.tex"
/opt/context/tex/texmf-context/tex/generic/context/luatex/luatex-plain.tex

What am I doing wrong?

Also another question: Does LMTX come with a plain format?

Cheers, Henri
___
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] Why does this example from the MetaFun manual not work?

2020-04-09 Thread Henri Menke
It would be really great if you'd stop wasting people's time by not
crossposting.

Cheers, Henri

On 09/04/20, 09:04, Gerben Wierda wrote:
> Nobody?
> 
> > On 8 Apr 2020, at 12:20, Gerben Wierda  wrote:
> > 
> > I would like to use the result of transparent() straight in my macros, so I 
> > can pass the colors with transparency using a single parameter. That should 
> > be possible if I understand the MetaFun manual (where I’ve copy-pasted this 
> > example from):
> > 
> > \starttext
> > \startMPpage[instance=doublefun]
> > 
> > vardef SampleText (expr t, c) =
> >   save p ; picture p ;
> >   p := image (draw t infont "\truefontname{Regular}") ;
> >   draw (p shifted (- xpart center p,0)) scaled 5 withcolor c;
> > enddef ;
> > SampleText ("Much Of This"   , transparent(1, .5, red  )) ;
> > SampleText ("Functionality"  , transparent(1, .5, green)) ;
> > SampleText ("Was Written", transparent(1, .5, blue )) ;
> > SampleText ("While Listening", transparent(1, .5, cmyk(1,0,0,0))) ;
> > SampleText ("To the CD's Of" , transparent(1, .5, cmyk(0,1,0,0))) ;
> > SampleText ("Tori Amos"  , transparent(1, .5, cmyk(0,0,1,0))) ;
> > 
> > \stopMPpage
> > \stoptext
> > 
> > But it results in:
> > 
> > system  > files > jobname 'testcolor', input './testcolor', result 
> > 'testcolor'
> > fonts   > latin modern fonts are not preloaded
> > languages   > language 'en' is active
> > open source > level 2, order 3, name './testcolor.tex'
> > fonts   > preloading latin modern fonts (second stage)
> > fonts   > 'fallback modern-designsize rm 12pt' is loaded
> > metapost> initializing instance 'doublefun:1' using format 
> > 'metafun' and method 'double'
> > metapost> loading 'metafun' as 
> > '/usr/local/context-osx-64/tex/texmf-context/metapost/context/base/mpiv/metafun.mpxl'
> >  using method 'double'
> > metapost> initializing number mode 'double'
> > metapost log> 
> > metapost log> loading metafun, including plain.mp version 1.004 for 
> > metafun iv and xl
> > metapost log> 
> > metapost log> ! Missing ')' has been inserted.
> > metapost log>  
> > metapost log>withprescript
> > metapost log> transparent->(1)withprescript
> > metapost log>  
> > "tr_alternative="_alternat...
> > metapost log> <*> ... ("Much Of This" , transparent(1, .5, red )
> > metapost log>   ) ; 
> > SampleText ("Functiona...
> > metapost log> 
> > backend > xmp > using file 
> > '/usr/local/context-osx-64/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
> > pages   > flushing realpage 1, userpage 1, subpage 1
> > close source> level 2, order 3, name './testcolor.tex'
> > close source> level 1, order 3, name 'cont-yes.mkiv'
> > 
> > For me, it is not about passing colour on to ConTeXt to typeset text, these 
> > are colors that normally would be drawn with “withcolor ca withtransparency 
> > (method,factor)” but that requires the passing of many more parameters and 
> > a lot more work in coding.
> > 
> > Does transparent() maybe produce a string that looks like “ca 
> > withtransparency (method,factor)” so something only usable in draw/fill/etc 
> > statements? But in that case how does that work without scantokens to parse 
> > the string?
> > 
> > Is there a way I can do this without having twice the parameters (and I 
> > have to pass multiple colours)  in my macros everywhere?
> > 
> > Thanks,
> > 
> > G
> > ___
> > 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   

Re: [NTG-context] Lmtx + pgfplots compilation error

2020-04-08 Thread Henri Menke
MINIMAL working example...

Cheers, Henri

On 08/04/20, 11:52, Fabrice Couvreur wrote:
> Hi Henri,
> This file works well with context but does not work with lmtx.
> 
> \usemodule[pgfplots]
> \usemodule[pgfpltstable]
> \pgfplotsset{compat=newest}
> \starttext
> \starttikzpicture
> \startaxis[
> title={\bf Relevé de notes chronologique},
> ymajorgrids=true,
> grid style={cyan!30},
> ymin=0,
> ymax=22,
> xmin=0,
> xmax=14,
> x=1cm,
> y=0.3cm,
> axis x line =bottom,
> axis y line =left,
> axis on top=true,
> axis line style =very thick,
> tick align=outside,
> tickwidth=0.12cm,
> tick style=very thick,
> xtick={\empty},
> ytick={0,2,...,18,20},
> extra x ticks={2,5,7,9,11,13},
> extra x tick labels={octobre,novembre,janvier,mars,avril, juin},
> extra x tick style={tick label style={rotate=45}},
> extra tick style={tick style={draw=none}},
> xlabel={Date},ylabel={Note},
> xlabel={Date},ylabel={Effectif},
>  every axis x label/.style={
>  at={(ticklabel* cs:1.01)},
>  anchor=west,
>  },
>  every axis y label/.style={
>  at={(ticklabel* cs:1.01)},
>  anchor=south,
>  },
>  samples=1000,
>  >=stealth,
> ]
> \addplot [color=green,only marks] coordinates {
>   (1,5)
>   (2,7)
>   (3,5)
>   (4,10)
>   (5,5)
>   (6,8)
>   (7,10)
>   (8,8)
>   (9,10)
>   (10,14)
>   (11,18)
>   (12,14)
>   (13,11)
> };
> \stopaxis
> \stoptikzpicture
> \stoptext
> 
> 
> open source > level 7, order 88, name 'pgfplotsbinary.data.code.tex'
> 
> tex error   > tex error on line 5 in file pgfplotsbinary.data.code.tex:
> ! Undefined control sequence
> 
> l.5 ...ode`\^0=11\expandafter\xdef\csname pgfp@bin@\the\counter
> \endcsname{^0
> 
> }\advance\counter by1
> lua error:
> 
> ?
> 
> 
> 
> 
> 
> 
> The control sequence at the end of the top line of your error message was
> never
> \def'ed. You can just continue as I'll forget about whatever was undefined.
> 
> 
> mtx-context | fatal error: return code: 256
> 
> TeX Output exited abnormally with code 1 at Wed Apr  8 11:49:56
> 
> 
> Le mer. 8 avr. 2020 à 11:21, Henri Menke  a écrit :
> 
> > Hi Fabrice,
> >
> > Could you provide a MWE, or maybe even open an issue on the bugtracker?
> > https://github.com/pgf-tikz/pgfplots/issues
> >
> > Cheers, Henri
> >
> > On 07/04/20, 14:22, Fabrice Couvreur wrote:
> > > Hi Henri,
> > > Thank you for answering me. We're entering an area that I don't really
> > know. I
> > > replaced all ^^ by ^ but I'm not sure I understood. I now have the
> > > following message :
> > > Thank you
> > > Fabrice
> > >
> > > tex error   > tex error on line 5 in file
> > pgfplotsbinary.data.code.tex:
> > > ! Undefined control sequence
> > >
> > > l.5 \catcode`\^00=11 \expandafter\xdef\csname pgfp@bin@\the\counter
> > > \endcsname{^0
> > >
> > >0}\advance\counter by1
> > > lua error:
> > >
> > > ?
> > >
> > >
> > >
> > > 
> > >
> > >
> > > The control sequence at the end of the top line of your error message was
> > > never
> > > \def'ed. You can just continue as I'll forget about whatever was
> > undefined.
> > >
> > >
> > > mtx-context | fatal error: return code: 256
> > >
> > > TeX Output exited abnormally with code 1 at Tue Apr  7 14:15:58
> > >
> > > Le mar. 7 avr. 2020 à 04:21, Henri Menke  a écrit
> > :
> > >
> > > > The problem is that pgfplots uses the ^^ syntax to access characters
> > but
> > > > this relies on ^ having catcode 7 which is not the case by default in
> > > > ConTeXt.  I had a similar issue in PGF before and that was fixed by
> > just
> > > > replacing the ^^ syntax with the ascii code constants from
> > > > syst-ini.mkxl.
> > > >
> > > > Cheers, Henri
> > > >
> > > > On 06/04/20, 22:23, Fabrice Couvreur wrote:
> > > > > Hi,
> > > > > Still with the idea of using lmtx, I get a compilation error when I
> > use
> > > > > pgfplots.
> > > > > Thank you.
> > > > > Fabrice
> > > > > 
> > > > > open source > level 9, order 92, name
> > 'pgfplotsbinary.data.code.tex'
> > &

Re: [NTG-context] Lmtx + pgfplots compilation error

2020-04-08 Thread Henri Menke
Hi Fabrice,

Could you provide a MWE, or maybe even open an issue on the bugtracker?
https://github.com/pgf-tikz/pgfplots/issues

Cheers, Henri

On 07/04/20, 14:22, Fabrice Couvreur wrote:
> Hi Henri,
> Thank you for answering me. We're entering an area that I don't really know. I
> replaced all ^^ by ^ but I'm not sure I understood. I now have the
> following message :
> Thank you
> Fabrice
> 
> tex error   > tex error on line 5 in file pgfplotsbinary.data.code.tex:
> ! Undefined control sequence
> 
> l.5 \catcode`\^00=11 \expandafter\xdef\csname pgfp@bin@\the\counter
> \endcsname{^0
> 
>0}\advance\counter by1
> lua error:
> 
> ?
> 
> 
> 
> 
> 
> 
> The control sequence at the end of the top line of your error message was
> never
> \def'ed. You can just continue as I'll forget about whatever was undefined.
> 
> 
> mtx-context | fatal error: return code: 256
> 
> TeX Output exited abnormally with code 1 at Tue Apr  7 14:15:58
> 
> Le mar. 7 avr. 2020 à 04:21, Henri Menke  a écrit :
> 
> > The problem is that pgfplots uses the ^^ syntax to access characters but
> > this relies on ^ having catcode 7 which is not the case by default in
> > ConTeXt.  I had a similar issue in PGF before and that was fixed by just
> > replacing the ^^ syntax with the ascii code constants from
> > syst-ini.mkxl.
> >
> > Cheers, Henri
> >
> > On 06/04/20, 22:23, Fabrice Couvreur wrote:
> > > Hi,
> > > Still with the idea of using lmtx, I get a compilation error when I use
> > > pgfplots.
> > > Thank you.
> > > Fabrice
> > > 
> > > open source > level 9, order 92, name 'pgfplotsbinary.data.code.tex'
> > >
> > > tex error   > tex error on line 42 in file
> > > pgfplotsbinary.data.code.tex: ! Undefined control sequence
> > >
> > > l.42 \catcode`\ =11^^I\expandafter\xdef\csname pgfp@bin@
> > >
> > > \the\counter^^I\endcsname{^^20}\endgroup\advance\counter by1
> > > lua error:
> > >
> > > ?
> > >
> > >
> > >
> > > 
> > >
> > >
> > > The control sequence at the end of the top line of your error message was
> > > never
> > > \def'ed. You can just continue as I'll forget about whatever was
> > undefined.
> > >
> > >
> > > mtx-context | fatal error: return code: 256
> > >
> > > TeX Output exited abnormally with code 1 at Mon Apr  6 22:19:01
> >
> > >
> > ___
> > > 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
> ___

___
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] Lmtx + pgfplots compilation error

2020-04-06 Thread Henri Menke
The problem is that pgfplots uses the ^^ syntax to access characters but
this relies on ^ having catcode 7 which is not the case by default in
ConTeXt.  I had a similar issue in PGF before and that was fixed by just
replacing the ^^ syntax with the ascii code constants from
syst-ini.mkxl.

Cheers, Henri

On 06/04/20, 22:23, Fabrice Couvreur wrote:
> Hi,
> Still with the idea of using lmtx, I get a compilation error when I use
> pgfplots.
> Thank you.
> Fabrice
> 
> open source > level 9, order 92, name 'pgfplotsbinary.data.code.tex'
> 
> tex error   > tex error on line 42 in file
> pgfplotsbinary.data.code.tex: ! Undefined control sequence
> 
> l.42 \catcode`\ =11^^I\expandafter\xdef\csname pgfp@bin@
> 
> \the\counter^^I\endcsname{^^20}\endgroup\advance\counter by1
> lua error:
> 
> ?
> 
> 
> 
> 
> 
> 
> The control sequence at the end of the top line of your error message was
> never
> \def'ed. You can just continue as I'll forget about whatever was undefined.
> 
> 
> mtx-context | fatal error: return code: 256
> 
> TeX Output exited abnormally with code 1 at Mon Apr  6 22:19:01

> ___
> 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] Puzzle (for me)

2020-03-31 Thread Henri Menke
On 01/04/20, 01:20, Gerben Wierda wrote:
> I have a string with double quotes that needs to become a text in a box in 
> METAPOST. METAPOST is used to create an image consisting of boxes and 
> connections.
> 
> Basically, the approach is now something like this:
> 
> TeX: calls Lua code with \ctxlua{filename}
> Lua: context.startMPpage
> Lua: read XML. String in XML in filename read by Lua
>   Here we know the dimensions in which the string must be typeset and wrapped 
> around because that is also in the XML
> Lua: A context() call contains METAPOST code that calls a METAPOST vardef 
> (‘draw box’) with the string as argument
> METAPOST: Draws box and call TeX to typeset string using textext(), returns 
> picture object
> TeX: Typeset string
> 
> In short:
> TeX, calls
>   Lua, reads XML and executes context( MP code) that gets executed on 
> stopMPpage
>   MP code calls TeX which typesets the string
> 
> But, if the string contains double quotes (”) this will fail in METAPOST 
> because the double quotes in the string will be printed in METAPOST code that 
> is created by Lua and thus mess up METAPOST.
> 
> So, what can I do?

To get a double quote in a MetaPost string like this

"embedded " double quote"
  ^
  |___ oeps

use the ditto variable which expands to a string containing the double
quote character like so

"embedded " & ditto & " double quote"

Cheers, Henri

> 
> G
> ___
> 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] Ignored spacings are ignored

2020-03-18 Thread Henri Menke
Dear Hans,

Thank you for the examples.  Usually glue is only set at the end of a
list and the last active glue will be used, so the \frozen mechanism is
a bit confusing maybe.  Anyway, is there an ETA for the release of the
luametatex source?  I'd really like to see how \frozen is implemented.

Kind regards,
Henri

On 17/03/20, 16:52, Hans Hagen wrote:
> Hi,
> 
> I forgot to add an example (the \Umathspacingmode will be in the next lmtx
> upload, but I'm not sure when that is).
> 
> 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
> ___

___
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] Ignored spacings are ignored

2020-03-17 Thread Henri Menke
Dear list,

Sorry for the stupid title, I couldn't resist. :-)

LuaTeX has the option to adjust spacing between different classes of
math atoms.  However, looking in the TeXbook, page 170, in the table for
spacings between adjacent atoms, we find that some of those spacing are
undefined (* in the table) and therefore, when TeX encounters this
combination, spacing is just skipped.

This also translates to the parameters in LuaTeX.  For example the
combination Open-Bin is skipped by TeX and therefore setting the
corresponding parameter just does nothing.

\Umathordrelspacing\textstyle=50mu
\Umathopenbinspacing\textstyle=50mu
$a = (-2)$
\bye

So my question is, what is the point of the parameters that describe
these skipped combinations?  Shouldn't they just be deleted?
Alternatively, they could actually be implemented to do something.

More context: https://tex.stackexchange.com/questions/532758

Kind regards,
Henri
___
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] Only-black emojis in LMTX

2020-03-10 Thread Henri Menke
On 3/11/20 11:35 AM, Alejo Barrio Blaya wrote:
> I'm trying to get emojis working. The examples that do, are only printing
> plain black emojis. Not colors, nor greyscales.
> I'm using the latest beta of LMTX.

See section 5.2.13 Color in the fonts manual.
http://www.pragma-ade.nl/general/manuals/fonts-mkiv.pdf

If you want more help, you have to provide a MWE.

Cheers, Henri

> 
> Thanks,
> Alejo
> 
> 
> ___
> 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] Install Tikz in LMTX tree

2020-03-10 Thread Henri Menke
On 10/03/20, 10:01, Hans Hagen wrote:
> On 3/9/2020 10:59 PM, Jorge Manuel wrote:
> 
> > \pgfutil@packageerror #1#2#3->\errhelp {#3}\errmessage {Package #1
> > Error: #2}
> > l.11   \pgfutil@packageerror{PGF}{PGF requires etex in extended mode}{}
> >                                                                       %
> > 
> > 
> > 
> > 
> > This error message was generated by an \errmessage command, so I can't
> > give any
> > explicit help. Pretend that you're Hercule Poirot: Examine all clues,
> > and deduce
> > the truth by order and method.
> > 
> > 
> > Anybody has a clue how to fix this?
> i'm surprised that there is (still) a check fot that because all tex's
> default to etex .. you can try to put this at the top of yuor file

There are still people trying to run TikZ on plain TeX with the Knuth
engine: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=920368

> 
> \newcount\eTeXversion  \eTeXversion  = 2000
> \newcount\eTeXrevision \eTeXrevision = 0020

Hm, I need something that *all* eTeX engines provide that I can check.
And these seem to have met that requirement.  I really don't want to
write a huge cascade of if-s to test for different engines.

> afaik there has never been a formal etex version 1 (in use) and never a
> fundamental revision ... in lmtx we no longer have these versions (pdftex,
> etex, omega, aleph, etc) as they serve no purpose
> 
> 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
> ___
___
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] Second derivative ''

2020-03-04 Thread Henri Menke
Looks like the ligature is broken.

\starttext

\startformula
\left(f\right)'' = f''
\stopformula

\startformula
\left(f\right)″ = f″
\stopformula

\stoptext

On 3/5/20 11:44 AM, Weber, Matthias wrote:
> Dear List,
> 
> \starttext
> \startformula
> \left(f\right)'' = f''
> \stopformula
> \stoptext
> 
> has the second apostrophe set too low. This is in MKIV on ConTeXt live as 
> well as in my slightly older version.
> What is the “right” way to typeset a second derivative?
> 
> Thanks,
> 
> Matthias
> ___
> 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] Third party modules in LMTX

2020-02-13 Thread Henri Menke
On 2/12/20 5:10 PM, jdh wrote:
> 
> 
> I would like to use Wolfgang's t-letter module, but need some help.
> 
> I found the following instructions:
> 
> "The ConTeXt suite only comes with Taco's t-bib module. If you want to 
> install a new module, say Wolfgang's t-letter module, you can use
> 
>  first-setup.sh --modules="t-letter"
> 
> 
> BUT, the LMTX standalone does not have any "first-setup.sh"  shell script.
> 
> Is there another way to install the "t-letter" module for use with LMTX?
> 

#!/bin/sh

# Install or update texmf-modules
# Requires: awk, rsync

# Check whether LuaMetaTeX is available
if ! command -v luametatex > /dev/null; then
echo "luametatex is not in PATH, so there likely won't be the correct 
mtxrun"
echo "Aborting..."
exit 1
fi

# Make the texmf-modules directory, just in case
TEXMFMODULES="$(mtxrun --resolve-path "\$TEXMFMODULES")"
mkdir -p "${TEXMFMODULES}/"

# Sync with the Garden
GARDENRSYNC="contextgarden.net::minimals/current/modules"
for module in $(rsync "${GARDENRSYNC}/*" | awk '{print $NF}'); do
echo "Syncing ${module}"
rsync -rpztlv --delete "${GARDENRSYNC}/${module}/" "${TEXMFMODULES}/"
done

> Any help is appreciated.
> 
> Thanks
>   Darel
> ___
> 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] Global \setup has no effect while ad-hoc setting does

2020-02-13 Thread Henri Menke


On 2/14/20 6:30 PM, Wolfgang Schuster wrote:
> On Fri, 14 Feb 2020 02:21:03 +0100
> Exp  wrote:
> 
>> Dear list,
>>
>> I want to prevent an overfull hbox caused by an inline typing by making the
>> alignment very tolerant, but it didn't work:
>>
>> ```
>> \setupframedtext[
>>   width=broad,
>>   align={verytolerant, stretch}
> 
> You need a command at the end of the argument because the line end adds a 
> space.
> 
> align={verytolerant, stretch},
> ^^^

This comes up like every other day.  I've documented this now in

https://wiki.contextgarden.net/Unexpected_behavior#Assignments

> 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://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] Metapost and TikZ color code equivalent

2020-02-13 Thread Henri Menke
On 2/14/20 10:45 AM, Fabrice Couvreur wrote:
> Hi,
> How to have the color defined by {yellow!60!black} with Metapost ?

\usemodule[tikz]
\starttext
\startMPcode
fill fullsquare scaled 1cm withcolor (.6yellow + black) ;
\stopMPcode

\starttikzpicture
\fill[yellow!60!black] (0,0) rectangle (1,1);
\stoptikzpicture
\stoptext


> Thank you.
> Fabrice
> 
> 
> ___
> 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] beta vs current

2020-01-30 Thread Henri Menke
On 1/31/20 8:37 AM, Aditya Mahajan wrote:
> On Thu, 30 Jan 2020, Hans Hagen wrote:
> 
>> Hi,
>>
>> Already for quite some years the 'current' context release is the one 
>> that ends up on texlive. The rest of the year we talk about betas and 
>> very rarely an alpha release. This distinction no longer makes sense.
>>
>> From now on there will be no alpha, beta or current (with latest begin 
>> the most recent of the three, when present): we only will have latest. 
>> Most users follow the latest anyway and keeping a copy of some tree is 
>> cheap.
>>
>> There will of course be the yearly tex live snapshots and these will 
>> have the year attached to them.
>>
>> So, effectively nothing changes, apart from the fact that we no longer 
>> use the labels (and distinction on the website).
> 
> I like this change.
> 
>> A more fundamental distinction is between the versions:
>>
>> pdftex|xetex : mkii (probaly not used that much any longer)
>> luatex|luajittex : mkiv (also the test for luatex dev)
>> luametatex   : lmtx (the (upcoming) real deal)
>>
>> Mojca and I are diuscussing / working on an upgrade of the context 
>> garden installations and repositories but more about that later,
> 
> Will lmtx be available on the next texlive?

Probably not, LuaMetaTeX sources are not public yet, so TeX Live can't
build it and I don't think they are going to just pull binaries into the
tree.  They are also very cautious with licensing, so unless something
is truly open source they won't pull it (e.g. https://ctan.org/pkg/pgf-pie).

Cheers, Henri

> Aditya
> ___
> 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 extra margins

2020-01-28 Thread Henri Menke
On 1/29/20 10:09 AM, Pablo Rodriguez wrote:
> Dear list,
> 
> I need to add a PDF page, but removing extra margins that it contains.
> 
> A sample would be:
> 
> \setupexternalfigures[location=default]
> \starttext
> \externalfigure[cow.pdf]
> \stoptext
> 
> How could I crop 2ex from the left and top margins in the code above?

https://wiki.contextgarden.net/Using_Graphics#Image_Clipping

> Many thanks for your help,
> 
> 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] Historic ligatures with lucidaot

2020-01-16 Thread Henri Menke
On 1/17/20 10:52 AM, Otared Kavian wrote:
> Hi all,
> 
> How can I add the so-called « historic ligatures », such as in st, ct, to a 
> font (assuming it has that feature)?
> 
> For instance
> 
> \setupbodyfont[lucidaot]
> 
> \starttext
> 
> construction
> 
> \stoptext
> 
> does not show the historic ligature in « st » and in « ct »: how can I get 
> them?

For these your font needs the hlig feature, which Lucida doesn't seem to have.

$ otfinfo -f "$(mtxrun --find-file LucidaBrightOT.otf)"
ligaStandard Ligatures
markMark Positioning
mkmkMark to Mark Positioning
onumOldstyle Figures
smcpSmall Capitals

Cheers, Henri

> 
> Best regards: OK
> ___
> 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] BUG: module loading is broken

2020-01-12 Thread Henri Menke
Here is a patch.

--- a/opt/context/tex/texmf-modules/tex/context/third/letter/base/s-cor-00.lua
+++ b/opt/context/tex/texmf-modules/tex/context/third/letter/base/s-cor-00.lua
@@ -85,7 +85,7 @@ end
 function correspondence.file(environment,name)
 local environment = environment
 local name= name
-commands.uselibrary {
+resolvers.uselibrary {
 name = name,
 patterns = patterns[environment],
 action   = action,

On 1/13/20 2:19 PM, Henri Menke wrote:
> Dear Hans,
> 
> Recent updates to ConTeXt broke my CV. This MWE
> 
> \usemodule[letter]
> \starttext
> \stoptext
> 
> fails with
> 
> ...texmf-modules/tex/context/third/letter/base/s-cor-00.lua:88: attempt to 
> call a nil value (field 'uselibrary')
> 
> Here are the steps by which I can reproduce on my machine:
> 
> rm -rf /opt/context/tex/texmf-cache
> mtxrun --generate
> context --make
> context test.mkvi
> 
> Same for LMTX.
> 
> Cheers, Henri
> 
___
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] BUG: module loading is broken

2020-01-12 Thread Henri Menke
Dear Hans,

Recent updates to ConTeXt broke my CV. This MWE

\usemodule[letter]
\starttext
\stoptext

fails with

...texmf-modules/tex/context/third/letter/base/s-cor-00.lua:88: attempt to call 
a nil value (field 'uselibrary')

Here are the steps by which I can reproduce on my machine:

rm -rf /opt/context/tex/texmf-cache
mtxrun --generate
context --make
context test.mkvi

Same for LMTX.

Cheers, Henri
___
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] LMTX for alpine linux (musl)

2020-01-02 Thread Henri Menke
On 1/3/20 8:23 PM, Mojca Miklavec wrote:
> On Thu, 2 Jan 2020 at 14:42, Martin Hasoň wrote:
>>
>> Hi all,
>>
>> I would like use the LMTX in alpine linux (musl). Is this version planned to 
>> be prepared?
> 
> What's the oldest version of Alpine that we would want to support?

Regular LuaTeX can be built on Alpine 3.1 or newer.  See also

https://github.com/TeX-Live/luatex/blob/trunk/.travis.yml

Cheers,
Henri

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


Re: [NTG-context] Entity to receive donations?

2019-12-26 Thread Henri Menke

On 12/27/19 4:49 PM, Jon Wong wrote:

Is there a formal entity for ConTeXt to receive donations? What about receiving 
earnings?


https://group.contextgarden.net/payment.shtml


___
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] Adjust kern for one character

2019-12-22 Thread Henri Menke



On 12/23/19 3:33 PM, Henri Menke wrote:

On 12/23/19 2:30 PM, Rik Kabel wrote:


On 12/22/2019 17:40, mf wrote:

Il 22/12/19 22:19, Rik Kabel ha scritto:

List,

Is there a way in ConTeXt to adjust the left-side kern for one
character? The cap J in the font I am using is being set too close to
the preceding characters and I would rather not insert a thinspace
before each. (Inserting a thinspace is sufficient, but finer control
is welcome.)


\definecharacterspacing[distantJ]
\setupcharacterspacing[distantJ]["004A][left=.15,alternative=1] % 004A
is the unicode hex index of letter J
\starttext
    normal: AJB\par
    \setcharacterspacing[distantJ] more space on the left: AJB\par
    \resetcharacterspacing normal again: AJB\par
\stoptext


Thank you for that, Massi.

Unfortunately, that is too blunt an instrument in this case -- in
addition to the body font where the problem exists, it works on the
heading and titling font, which does not share the problem.

As Henri's answer hints, I was a bit unclear in my request. It is a kern
between a word space and the cap J that is the issue. Perhaps a font
feature file is the place to do such a thing.


\startluacode
fonts.handlers.otf.addfeature {
  name = "kern",
  type = "kern",
  data = {
  [" "] = {
  ["J"] = 1000 % exaggerated value


Should of course be a Lua comment

["J"] = 1000 -- exaggerated value


  }
  }
}
\stopluacode

\setupbodyfont[modern] % have to reload the font

\starttext

No Jokes!

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


Re: [NTG-context] Adjust kern for one character

2019-12-22 Thread Henri Menke

On 12/23/19 2:30 PM, Rik Kabel wrote:


On 12/22/2019 17:40, mf wrote:

Il 22/12/19 22:19, Rik Kabel ha scritto:

List,

Is there a way in ConTeXt to adjust the left-side kern for one
character? The cap J in the font I am using is being set too close to
the preceding characters and I would rather not insert a thinspace
before each. (Inserting a thinspace is sufficient, but finer control
is welcome.)


\definecharacterspacing[distantJ]
\setupcharacterspacing[distantJ]["004A][left=.15,alternative=1] % 004A
is the unicode hex index of letter J
\starttext
   normal: AJB\par
   \setcharacterspacing[distantJ] more space on the left: AJB\par
   \resetcharacterspacing normal again: AJB\par
\stoptext


Thank you for that, Massi.

Unfortunately, that is too blunt an instrument in this case -- in
addition to the body font where the problem exists, it works on the
heading and titling font, which does not share the problem.

As Henri's answer hints, I was a bit unclear in my request. It is a kern
between a word space and the cap J that is the issue. Perhaps a font
feature file is the place to do such a thing.


\startluacode
fonts.handlers.otf.addfeature {
name = "kern",
type = "kern",
data = {
[" "] = {
["J"] = 1000 % exaggerated value
}
}
}
\stopluacode

\setupbodyfont[modern] % have to reload the font

\starttext

No Jokes!

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


Re: [NTG-context] Adjust kern for one character

2019-12-22 Thread Henri Menke

On 12/23/19 10:19 AM, Rik Kabel wrote:

List,

Is there a way in ConTeXt to adjust the left-side kern for one 
character?


No, kerns always come in pairs.


The cap J in the font I am using is being set too close to
the preceding characters and I would rather not insert a thinspace 
before each. (Inserting a thinspace is sufficient, but finer control

is welcome.)


___
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] Bug: Segmentation fault

2019-12-10 Thread Henri Menke

On 12/11/19 12:23 PM, luigi scarso wrote:

On Wed, Dec 11, 2019 at 12:10 AM Hans Hagen  wrote:


On 12/11/2019 12:03 AM, luigi scarso wrote:



On Tue, Dec 10, 2019 at 9:27 PM Henri Menke mailto:henrime...@gmail.com>> wrote:

 Dear devs,

 The example below crashes LuaTeX with a segmentation fault.  It is
 reproducible
 with LuaTeX 1.10.1 7143 and LuaTeX 1.11.2 7226.  To this end I built
 7226 from
 source with --debugopt to get a backtrace, which can be found below
 as well.

 Cheers, Henri

 ---

 \directlua{token.set_macro(-1, "foo","\string\\,")}
 \show\foo
 \foo
 \bye


I guess that we have to check if catcodetable -1 is already defined...

i already sent you a patch, probbaly also ok for trunk




yes, seen




but one needs to be careful as fo rinstance \string\foo is seen as
oo so often one also needs to escape properly



  I always start with  [==[ ... ]==]  ie
\directlua{token.set_macro(-1, [==[foo]==],[==[\string\\,]==])}
  gdb reports this [==[\string\\,]==] string as
  ","
which is an array of char of length 3 ie {'\\','\\',','}

With \directlua{token.set_macro(-1, [==[foo]==],"\string\\,")}
gdb reports "\\,"
ie {'\\','\,'}

I always check which one is the correct one...


In this case I wanted to generate the thin space (\,).  My expectation
(which worked elsewhere) was that full expansion will turn "\string\\,"
into "\\," where the two backslashes have catcode 12 and will not be
expanded further.  Then the Lua string will turn the escape sequence \\
into a single backslash, therefore ending up with \, in the Lua string.
Demo below.

Cheers, Henri


$ luatex <(echo '\relax\directlua{print("\string\\,")}\bye')
This is LuaTeX, Version 1.11.2 (TeX Live 2020/dev)
 restricted system commands enabled.
(/dev/fd/63\,
)
warning  (pdf backend): no pages of output.
Transcript written on 63.log.




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


[NTG-context] Bug: Segmentation fault

2019-12-10 Thread Henri Menke

Dear devs,

The example below crashes LuaTeX with a segmentation fault.  It is reproducible
with LuaTeX 1.10.1 7143 and LuaTeX 1.11.2 7226.  To this end I built 7226 from
source with --debugopt to get a backtrace, which can be found below as well.

Cheers, Henri

---

\directlua{token.set_macro(-1, "foo","\string\\,")}
\show\foo
\foo
\bye

---

(gdb) run
Starting program: /usr/local/bin/luatex test.tex
This is LuaTeX, Version 1.11.2 (TeX Live 2020/dev)
 restricted system commands enabled.
(./test.tex
Program received signal SIGSEGV, Segmentation fault.
get_sa_item (head=0x41002, n=n@entry=92) at 
../../../source/texk/web2c/luatexdir/utils/managed-sa.c:65
65  if (head->tree != NULL) {
(gdb) bt full
#0  get_sa_item (head=0x41002, n=n@entry=92) at 
../../../source/texk/web2c/luatexdir/utils/managed-sa.c:65
No locals.
#1  0x005607d0 in get_cat_code (h=h@entry=-1, n=n@entry=92) at 
../../../source/texk/web2c/luatexdir/tex/textcodes.c:68
sa_value = 
s = 
#2  0x004d8a8c in set_macro (L=) at 
../../../source/texk/web2c/luatexdir/lua/lnewtokenlib.c:1204
p = 
q = 
t = 
se = 0x295bf9a ""
name = 
str = 
s = 
lname = 3
lstr = 2
cs = 743
cc = 
ct = -1
n = 
a = 0
nncs = 
#3  0x006dc924 in luaD_precall (L=L@entry=0x1202678, 
func=func@entry=0x2214490, nresults=nresults@entry=0)
at ../../../source/libs/lua53/lua53-src/src/ldo.c:434
n = 
f = 0x4d8890 
ci = 0x123c830
#4  0x006f62c2 in luaV_execute (L=L@entry=0x1202678) at 
../../../source/libs/lua53/lua53-src/src/lvm.c:1134
b = 
nresults = 0
i = 
ra = 0x2214490
ci = 0x12221c0
cl = 0x2952f00
k = 0x294ea40
base = 
#5  0x006dcef7 in luaD_call (nResults=, func=, L=0x1202678) at ../../../source/libs/lua53/lua53-src/src/ldo.c:499
No locals.
#6  luaD_callnoyield (L=0x1202678, func=, nResults=) at ../../../source/libs/lua53/lua53-src/src/ldo.c:509
No locals.
#7  0x006db78c in luaD_rawrunprotected (L=0x1202678, f=0x6d0800 
, ud=0x7fffdf80) at 
../../../source/libs/lua53/lua53-src/src/ldo.c:142
oldnCcalls = 0
lj = {previous = 0x0, b = {{__jmpbuf = {832, -3576387603206626035, 
18884312, 1, 18884216, 0, 3576387604335174925, -3576387282536356595},
  __mask_was_saved = 0, __saved_mask = {__val = {0, 18884312, 
18884216, 7198250, 35733824, 72057594037927937, 140737488346976, 0, 0, 0, 0, 0, 
0,
  0, 0, 0, status = 0}
#8  0x006dd3af in luaD_pcall (L=L@entry=0x1202678, func=func@entry=0x6d0800 
, u=u@entry=0x7fffdf80, old_top=832, ef=)
at ../../../source/libs/lua53/lua53-src/src/ldo.c:729
status = 
old_ci = 0x12026d8
old_allowhooks = 1 '\001'
old_nny = 1
old_errfunc = 0
oldtop = 
#9  0x006d3907 in lua_pcallk (L=0x1202678, nargs=nargs@entry=0, 
nresults=nresults@entry=0, errfunc=errfunc@entry=51, ctx=ctx@entry=0, 
k=k@entry=0x0)
at ../../../source/libs/lua53/lua53-src/src/lapi.c:969
c = {func = 0x2214480, nresults = 0}
status = 
func = 
#10 0x00463b5f in luatokencall (p=p@entry=9030, 
nameptr=nameptr@entry=0) at 
../../../source/texk/web2c/luatexdir/lua/luastuff.c:653
base = 51
ls = {s = 0x295e890 "\240܂\367\377\177", size = 0}
i = 0
l = 32
s = 0x0
lua_id = 
stacktop = 50
#11 0x00567a83 in conv_toks () at 
../../../source/texk/web2c/luatexdir/tex/textoken.c:2859
old_setting = 
p = 
q = 
save_scanner_status = 0
save_def_ref = 0
save_warning_index = 0
bool = 
s = 9030
sn = 0
u = 0
c = 
str = 
i = 0
#12 0x00503a25 in expand () at 
../../../source/texk/web2c/luatexdir/tex/expand.c:259
t = 
p = 
---Type  to continue, or q  to quit---
cur_ptr = 
cv_backup = 0
cvl_backup = 0
radix_backup = 0
co_backup = 0
backup_backup = 7961
save_scanner_status = 
#13 0x00503f85 in get_x_token () at 
../../../source/texk/web2c/luatexdir/tex/expand.c:501
No locals.
#14 0x00513ae5 in main_control () at 
../../../source/texk/web2c/luatexdir/tex/maincontrol.c:1014
No locals.
#15 0x0050f4ac in main_body () at 
../../../source/texk/web2c/luatexdir/tex/mainbody.c:567
pdftex_map = "pdftex.map"
bad = 
#16 0x00446d2e in main (ac=, av=) at 
../../../source/texk/web2c/luatexdir/luatex.c:609
No locals.
___
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 / 

Re: [NTG-context] Eofill extension (Metafun)

2019-12-08 Thread Henri Menke

On 12/9/19 10:02 AM, Fabrice Couvreur wrote:

Hello,
Is it possible to use the eofill extension in this code ? I tried without
success. Thank you.


No, eofill is basically just a frontend for the PDF primitive eofill,
which works on a single connected path that intersects itself.

If that wasn't enough, the numberstriped instruction does not return a
path but a picture and pictures are immutable.


Fabrice

\starttext
\startMPcode
path carre, disque;

carre = fullsquare scaled 200;
disque = fullcircle scaled 200;

draw carre numberstriped (.25,15,5) withcolor \MPcolor{magenta};
fill disque withcolor white;

draw carre  withcolor \MPcolor{orange};
draw disque  withcolor \MPcolor{orange};

path a[];
a1 = origin -- point 3.5 of carre;

interim ahangle := 30;
drawdblarrow a1 withpen pencircle scaled 1.5pt withcolor darkred;
label.top("$R$", point 1/2 of a1);
\stopMPcode
\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://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] Using ConTeXt with LuaTeX variants

2019-12-04 Thread Henri Menke

On 12/5/19 2:10 PM, Jairo A. del Rio wrote:

I want to know if it's possible use HarfTeX/LuaHBTeX with ConTeXt (MKIV),
mainly for what can be done with them (the "mode=harf" feature and Lua
language features).
Although this is pretty easy with LaTeX:

\usepackage{harfload}
\setmainfont{font}[RawFeature={mode=harf}]

I have no idea of how to make it work with context. I've tried the
following with a test file (a simple \starttext .. \stoptext document):

context tests.tex --engine=luahbtex

And this happens:

mtx-context | run 1: luahbtex
--fmt="/home/coragyps/.texlive2019/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en"
--jobname="tests"
--lua="/home/coragyps/.texlive2019/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en.lui"
--c:currentrun=1 --c:engine="luahbtex" --c:fulljobname="./tests.tex"
--c:input="./tests.tex" --c:kindofrun=1 --c:maxnofruns=9
--c:texmfbinpath="/usr/local/texlive/2019/bin/x86_64-linux" "cont-yes.mkiv"

This is LuaHBTeX, Version 1.11.2 (TeX Live 2020/dev)
  system commands enabled.

(Fatal format file error; I'm stymied)mtx-context | fatal error: return
code: 256

What should I do? Thank you in advance


First of all you should rebuild the format with the new engine.

context --make

Then you will have to write backend code that exposes the mode=harf
to the ConTeXt font loader.




___
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] Bug: \adjustspacing=1 does not disable expansion

2019-12-04 Thread Henri Menke

It actually seems as if the documentation of LuaTeX is wrong here,
because the behaviour of `\adjustspacing=1' is compatible with
`\pdfadjustspacing=1` in pdfTeX.  From the pdfTeX manual:

When \pdfadjustspacing is set to 1, font expansion is applied after
TeX’s normal paragraph breaking routines have broken the paragraph
into lines. In this case, line breaks are identical to standard TeX
behavior.

So maybe just copy this paragraph to the LuaTeX manual.

On 12/5/19 1:34 PM, Henri Menke wrote:

Possible patch (can be directly used with `git apply')

diff --git a/source/texk/web2c/luatexdir/tex/postlinebreak.c 
b/source/texk/web2c/luatexdir/tex/postlinebreak.c
index cbc77e556..9cd76b5fa 100644
--- a/source/texk/web2c/luatexdir/tex/postlinebreak.c
+++ b/source/texk/web2c/luatexdir/tex/postlinebreak.c
@@ -440,7 +440,7 @@ void ext_post_line_break(int paragraph_dir,
   }
   adjust_tail = adjust_head;
   pre_adjust_tail = pre_adjust_head;
-if (adjust_spacing > 0) {
+if (adjust_spacing > 1) {
   just_box = hpack(q, cur_width, cal_expand_ratio, paragraph_dir);
   } else {
   just_box = hpack(q, cur_width, exactly, paragraph_dir);

On 12/5/19 10:04 AM, Henri Menke wrote:

Dear devs,

The \adjustspacing register is described in the LuaTeX manual as
follows:

   When \adjustspacing has value 2, hz optimization will be applied to 
glyphs and kerns. When
   the value is 3, only glyphs will be treated. A value smaller than 2 
disables this feature.

However, setting \adjustspacing=1 will only disable shrink but not
stretch.  Please find a minimal example example, where I have used
exaggerated values for shrink and stretch to emphasize the issue.  It
can be reproduced with both mtxrun --script plain and luatex with
luaotfload.sty.

I have already checked linebreak.c but add_to_widths looks innocuous and
properly checks the adjust_spacing parameter.

Cheers, Henri

---

%\input luaotfload.sty
\directlua{
 fonts.expansions.setups.default.stretch = 2000
 fonts.expansions.setups.default.shrink = 2000
}
\adjustspacing=1
\font\1="file:lmroman10-regular.otf:expansion=default"
\hsize=5em
\1 \input lorem
\bye


___
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] Bug: \adjustspacing=1 does not disable expansion

2019-12-04 Thread Henri Menke

Possible patch (can be directly used with `git apply')

diff --git a/source/texk/web2c/luatexdir/tex/postlinebreak.c 
b/source/texk/web2c/luatexdir/tex/postlinebreak.c
index cbc77e556..9cd76b5fa 100644
--- a/source/texk/web2c/luatexdir/tex/postlinebreak.c
+++ b/source/texk/web2c/luatexdir/tex/postlinebreak.c
@@ -440,7 +440,7 @@ void ext_post_line_break(int paragraph_dir,
 }
 adjust_tail = adjust_head;
 pre_adjust_tail = pre_adjust_head;
-if (adjust_spacing > 0) {
+if (adjust_spacing > 1) {
 just_box = hpack(q, cur_width, cal_expand_ratio, paragraph_dir);
 } else {
 just_box = hpack(q, cur_width, exactly, paragraph_dir);

On 12/5/19 10:04 AM, Henri Menke wrote:

Dear devs,

The \adjustspacing register is described in the LuaTeX manual as
follows:

  When \adjustspacing has value 2, hz optimization will be applied to 
glyphs and kerns. When
  the value is 3, only glyphs will be treated. A value smaller than 2 
disables this feature.

However, setting \adjustspacing=1 will only disable shrink but not
stretch.  Please find a minimal example example, where I have used
exaggerated values for shrink and stretch to emphasize the issue.  It
can be reproduced with both mtxrun --script plain and luatex with
luaotfload.sty.

I have already checked linebreak.c but add_to_widths looks innocuous and
properly checks the adjust_spacing parameter.

Cheers, Henri

---

%\input luaotfload.sty
\directlua{
fonts.expansions.setups.default.stretch = 2000
fonts.expansions.setups.default.shrink = 2000
}
\adjustspacing=1
\font\1="file:lmroman10-regular.otf:expansion=default"
\hsize=5em
\1 \input lorem
\bye


___
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] Bug: \adjustspacing=1 does not disable expansion

2019-12-04 Thread Henri Menke

Dear devs,

The \adjustspacing register is described in the LuaTeX manual as
follows:

When \adjustspacing has value 2, hz optimization will be applied to glyphs 
and kerns. When
the value is 3, only glyphs will be treated. A value smaller than 2 
disables this feature.

However, setting \adjustspacing=1 will only disable shrink but not
stretch.  Please find a minimal example example, where I have used
exaggerated values for shrink and stretch to emphasize the issue.  It
can be reproduced with both mtxrun --script plain and luatex with
luaotfload.sty.

I have already checked linebreak.c but add_to_widths looks innocuous and
properly checks the adjust_spacing parameter.

Cheers, Henri

---

%\input luaotfload.sty
\directlua{
  fonts.expansions.setups.default.stretch = 2000
  fonts.expansions.setups.default.shrink = 2000
}
\adjustspacing=1
\font\1="file:lmroman10-regular.otf:expansion=default"
\hsize=5em
\1 \input lorem
\bye
___
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 incompatible with Lua

2019-11-20 Thread Henri Menke

Below I include a suggestion on how to do this sort of version agnostic.

Cheers, Henri

Live example on Wandbox:

https://wandbox.org/permlink/jEn9kNnPB0t5rwjP

---

#include 
#include 
#include 

#include 
#include 

static int (*lua_os_execute)(lua_State *L) = NULL;

static int os_execute(lua_State *L) {
// Do whatever
printf("Hello Hans!\n");

// Safeguard
assert(lua_os_execute != NULL);

// Return wrapped
return lua_os_execute(L);
}

LUAMOD_API int luaopen_oslibext(lua_State *L) {
lua_getglobal(L, "os");

// Get the address of the original function
if (lua_os_execute == NULL) {
lua_getfield(L, -1, "execute");
lua_os_execute = lua_tocfunction(L, -1);
lua_pop(L, 1);
}

// Push the new function to overwrite the old one
lua_pushcfunction(L, os_execute);
lua_setfield(L, -2, "execute");
return 1;
}

int main(void) {
lua_State *L = luaL_newstate();
luaL_openlibs(L);
luaopen_oslibext(L);

if (luaL_dostring(L, "os.execute([[date]])") != 0) {
fprintf(stderr, "%s", lua_tostring(L, -1));
lua_pop(L, 1);
}

lua_close(L);
}

On 11/21/19 8:17 PM, Henri Menke wrote:

Dear list,

The following Lua script behaves differently when executed in Lua vs.
LuaTeX.

  print(os.execute("date"))

It seems that the definition of os_execute in loslibext.c was copied
over from Lua 5.1 and not adapted to newer versions.

  $ lua5.1 test.lua
  0
  $ lua5.2 test.lua
  true  exit0
  $ lua5.3 test.lua
  true  exit0
  $ texlua test.lua
  0
  $ luajit test.lua
  0
  $ texluajit test.lua
  0

As you can see from the example, this comes with the additional
complication that LuaJIT has Lua 5.1 behaviour and should also retain
that.

Cheers, Henri


___
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 incompatible with Lua

2019-11-20 Thread Henri Menke

Dear list,

The following Lua script behaves differently when executed in Lua vs.
LuaTeX.

print(os.execute("date"))

It seems that the definition of os_execute in loslibext.c was copied
over from Lua 5.1 and not adapted to newer versions.

$ lua5.1 test.lua
0
$ lua5.2 test.lua
trueexit0
$ lua5.3 test.lua
trueexit0
$ texlua test.lua
0
$ luajit test.lua
0
$ texluajit test.lua
0

As you can see from the example, this comes with the additional
complication that LuaJIT has Lua 5.1 behaviour and should also retain
that.

Cheers, Henri
___
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] layers and \llap

2019-11-19 Thread Henri Menke
On 11/20/19 3:16 AM, Pablo Rodriguez wrote:
> Hi Hans,
> 
> this comes from a previous message about an issue with \llap and layers.
> 
> Here is the sample:
> 
> \defineviewerlayer[print][state=stop,printable=yes]
> \defineviewerlayer[view][state=start,printable=no]
> 
> \starttext
> \startviewerlayer[view]\color[red]{\TeX}\stopviewerlayer%
> \startviewerlayer[print]\llap{\ConTeXt}\stopviewerlayer%
> 
> \input zapf
> \stoptext
> 
> If the layer with \llap is placed last, disabling the view layer
> disables all the text.
> 
> Everything works fine if the layer with \llap is placed first.
> 
> I guess this might be a bug.

Works for me on both Evince and Foxit Reader.  I can't test Adobe because I'm
on Linux.

Try also \dontleavehmode\llap{\ConTeXt} because \llap by itself does not start
a paragraph.

Cheers,
Henri

> 
> Many thanks for your help,
> 
> 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] developer not verified error

2019-11-18 Thread Henri Menke
On 11/17/19 5:09 AM, Mojca Miklavec wrote> First I thought that we would have 
troubles with the binaries as soon
> as GateKeeper was introduced (not sure which macOS version started
> causing troubles), but somehow there were none, which at least came as
> a pleasant surprise to me. Maybe this has to do with the fact that
> anything running inside Terminal has somewhat higher permissions than
> regular app bundles. (I know that Audacity doesn't allow recording
> unless you run it from the Terminal, for example.)

In macOS Catalina Apple introduced “notarization”, i.e. anything you
install has to have Apple's blessing, otherwise it will refuse to
install and show you a message that it is malware.  Dick Koch,
maintainer of MacTeX ran into the same problems, as he presented at
TUG2019 and described in the corresponding TUGboat article:

http://tug.org/TUGboat/tb40-2/tb125koch-harden.pdf

> I'm curious if that will work. I don't yet dare to upgrade to Catalina
> (in some ways the OS is worse with each new version).

I don't use macOS myself, but it seems that the quality of the latest
release is absolutely abysmal.

https://tyler.io/broken/

Cheers, Henri
___
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] maths simplifying fractions

2019-11-13 Thread Henri Menke
On 11/14/19 12:28 AM, Martin Althoff wrote:
> Hi all, I am writing some maths exercises that include simplifying fractions. 
> For that
> reason I would like to cross out some numbers. Unfortunately overstrike 
> doesn't do the
> trick, eg with a 4 the overstrike is practically invisible.
> 
> Is there any way to get a diagonal stroke like the latex module "cancel" can 
> do?

This might help.
https://tex.stackexchange.com/questions/501056/equivalent-of-cancelto-in-context

> Thanks for any suggestions,
> Martin
> 
> \starttext
> \startformula
> \frac{\overstrike{2}}{\overstrike{4}} = \frac{1}{2}
> \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://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] Number format with lua

2019-11-09 Thread Henri Menke
On 11/9/19 10:38 PM, Fabrice Couvreur wrote:
> Hi,
> In the table below, how to have numbers with only three decimals ?
> Thank you.
> Fabrice
> 
> \starttext
> \startluacode
> local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" }
> local letters_2 = { "1", "Année", "1998", "1999", "2000", "2001", "2002",
> "2003", "2004", "2005","2006" }
> context.startxtable({"align={middle,lohi},
> width=1.2cm,offset=0.8ex,bodyfont=9pt"})
> 
> context.startxrow({"background=color,backgroundcolor=green"})
> context.startxcell({"background=color,backgroundcolor=white,frame=off"})
> context("")
> context.stopxcell()
> for _, letter in ipairs(letters_1) do
> context.startxcell()
> context(letter) context.stopxcell()
> end
> context.stopxrow()
> 
> context.startxrow()
> for _, letter in ipairs(letters_2) do
> context.startxcell() context(letter) context.stopxcell()
> end
> context.stopxrow()
> 
> context.startxrow()
> context.startxcell() context("2") context.stopxcell()
> context.startxcell({"width=2cm"}) context("Prix (kg)") context.stopxcell()
> for i=0,8 do
> context.startxcell() context("%0.5g",1.031^i) context.stopxcell()

Have you tried

context.startxcell() context("%0.3g",1.031^i) context.stopxcell()

?
Cheers, Henri

> end
> context.stopxrow()
> 
> context.stopxtable()
> \stopluacode
> \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://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
___


[NTG-context] Where is tex/texmf-context?

2019-10-16 Thread Henri Menke
Dear list,

Today I wanted to use ConTeXt MkIV instead of LMTX but when I ran
context, I obtained the error

mtxrun  | unknown script 'context.lua' or 'mtx-context.lua'

so I went to the installation directory /opt/context to check and
noticed that tex/textmf-context was missing.  I thought that obviously
something must have went wrong with the last update, so I deleted the
whole tree and ran the first-setup.sh again using

sh ./first-setup.sh --context=latest --engine=luatex --modules=all 
--fonts=all

but tex/texmf-context is still missing.  Is any of the options I'm using
for the install script broken?

Cheers, Henri
___
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] Column(set)s & overlapping lines

2019-10-01 Thread Henri Menke
This has been asked many times.
Columnsets need grid.

\setuplayout[grid=yes]

Cheers, Henri

On 10/1/19 7:16 PM, Procházka Lukáš Ing. wrote:
> Hello,
> 
> I have the following code:
> 
> 
> \definecolumnset[example][n=3,balancing=no]
> \definecolumnsetspan[wide][n=2]
> 
> \setupexternalfigures[location=default]
> 
> %
> 
> \starttext
>\startcolumnset[example]
>  \startcolumnsetspan[wide]
>%\externalfigure[hacker][width=120mm] % Produces overlapping last two 
> lines in the first column, too
>\vbox to80mm{}
>  \stopcolumnsetspan
> 
>  \input knuth
>\stopcolumnset
> \stoptext
> 
> 
> The last two lines in the first column overlap (it seems that the last line 
> is typeset a bit higher than the pre-last line) - how to avoid it?
> 
> Best regards,
> 
> Lukas
> 
> 
___
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] circuitikz meters

2019-09-30 Thread Henri Menke
Circuitikz uses \textbf inside, which is a LaTeX macro.  Unfortunately, this is
hardcoded within the ammeter and voltmeter nodes, so you can't easily change
it.  Instead you can simply provide a macro that does the correct thing.

\usemodule[circuitikz]
\let\textbf\bold % <---
\starttext
\starttikzpicture
\draw (0,0)to[ammeter, t=A, i=$i$] ++(3,0);
\draw (0,4) to[rmeter, t=V, v>=$v$] ++(3,0) ;
\draw (0,2) to[voltmeter, l=$U$] (++3,2);
\stoptikzpicture
\stoptext

Cheers, Henri

On 10/1/19 5:07 AM, Martin Althoff wrote:
> Hello ...
> 
> I am drawing some simple circuits for an electro-physics class I am teaching 
> using
> circuitikz. Using meters gives some effects I don't quite understand.
> 
> The MWE works as shown. The commented lines fail with "Undefined control 
> sequence". If I
> put the same 3 lines into Latex (via Texstudio on Linux), just the opposite 
> happens. The
> line with rmeter fails, the other two work. 
> 
> Why the difference? Some version issue? The "circuitikz manual version 
> 0.9.4.pdf" shows
> all 3 types of meters as choice. 
> 
> Actually I would prefer to use the "ammeter" and "voltmeter" within Context.
> 
> Thanks for any pointers.
> 
> Greetings, Martin
> 
> \usemodule[circuitikz]
> \starttext
> \starttikzpicture
> %\draw (0,0)to[ammeter, t=A, i=$i$] ++(3,0);
> \draw (0,4) to[rmeter, t=V, v>=$v$] ++(3,0) ;
> %\draw (0,2) to[voltmeter, l=$U$] (++3,2);
> \stoptikzpicture
> \stoptext
> 
> 
> Latex MWE, works as shown
> 
> \documentclass{article}
> \usepackage{circuitikz}
> \begin{document}
> \begin{circuitikz}
>   \draw (0,0) to[ammeter, t=A, i=$i$] ++(3,0);
>   %\draw (0,4) to[rmeter, t=V, v>=$v$] ++(3,0) ;
>   \draw (0,2) to[voltmeter, l=$U$] (++3,2);
> \end{circuitikz}
> \end{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://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
___


[NTG-context] SSL certificate expired

2019-09-30 Thread Henri Menke
Dear list,

$ curl https://mailman.ntg.nl/
curl: (60) SSL certificate problem: certificate has expired

Cheers,
Henri
___
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] This mailing list is not DKIM (DMARC) compatible

2019-09-16 Thread Henri Menke
I think this is better reported to Mailman.  I'm not sure to what extent list
administrators have control over DKIM settings.
https://gitlab.com/groups/mailman/-/issues

On 9/17/19 1:34 AM, Gerben Wierda wrote:
> In addition: Lists should keep the From address, the Subject, and the Message 
> totally unchanged. They should add a Sender header to indicate their relay 
> role, and set at least the List-Id and List-Unsubscribe headers for mailbox 
> rules and subscription management.
> 
> 
> Gerben Wierda
> Chess and the Art of Enterprise Architecture 
> Mastering ArchiMate 
> Architecture for Real Enterprises 
>  at 
> InfoWorld
> On Slippery Ice  at EAPJ
> 
>> On 16 Sep 2019, at 15:21, Gerben Wierda > > wrote:
>>
>> The footer that is added to each message in this list is not DKIM (and thus 
>> DMARC) compatible. DKIM requires the ability to create a signature on a set 
>> of headers and the body. By changing the body, the DKIM signature fails and 
>> the resulting messages sent by the mail list may in the future be blocked by 
>>  more and more mail servers.
>>
>> Gerben Wierda
>> Chess and the Art of Enterprise Architecture 
>> Mastering ArchiMate 
>> Architecture for Real Enterprises 
>>  at 
>> InfoWorld
>> On Slippery Ice  at EAPJ
>>
>> ___
>> 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
___


[NTG-context] Sidefloats inside framed

2019-09-14 Thread Henri Menke
Dear list,

Is there a way to get sidefloats working inside a frame?  I'm currently
designing a conference poster and I'm manually placing blocks using
\setlayerframed where inside those blocks I'd like to have sidefloats.  MWE is
below.

Cheers, Henri

---

\starttext

\startplacefigure[location={none,right}]
  \externalfigure[cow][width=.5\hsize]
\stopplacefigure
\samplefile{lorem}

\startframed
  [height=20\lineheight,
   width=\hsize,
   offset=0pt,
   align=width]
  \startplacefigure[location={none,right}]
\externalfigure[cow][width=.5\hsize]
  \stopplacefigure
  \samplefile{lorem}
\stopframed

\stoptext





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


Re: [NTG-context] context (lmtx) segfaults on x86_64 linux

2019-09-10 Thread Henri Menke
On 9/11/19 3:50 AM, Aditya Mahajan wrote:
> On Tue, 10 Sep 2019, Hans Hagen wrote:
> 
>> On 9/10/2019 4:11 PM, Vladimir Lomov wrote:
>>> Hello,
>>> today I updated lmtx and on simple
>>>
>>>$ context --version
>>>
>>> I get segfault (in the same time luametatex --version works fine).
>>> Running under gdb shows me that the problem might be in one of 'realloc'
>>> calls.
>>>
>>> The context from Context Suite (mkiv) works fine.
>>>
>>> P.S. I tested on two systems, both runs Archlinux x86_64.
>> can you completely wipe the texmf-cache directory and then run
>>
>> mtxrun --generate
>> context --make
>>
>> (there is a change in bytecode that gets not automatically noticed that 
>> can give that crash)
> 
> I had the same issue and completely wiping the texmf-cache fixes it.
> 
> @Vladimir: If you are using the luametatex package from AUR, then the 
> texmf-cache is located at $HOME/.cache/luametatex.

I'm receiving the super helpful error message:

! error (lua): function call: no

Maybe some sort of cache versioning is in order to at least give a better error.

Cheers, Henri

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



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


Re: [NTG-context] Pb with tikz, \pdfsavepos and friends

2019-09-10 Thread Henri Menke
On 9/11/19 7:45 AM, Hans Hagen wrote:
> On 9/10/2019 9:28 PM, Ulrike Fischer wrote:
>> Am Tue, 10 Sep 2019 20:04:58 +0200 schrieb Hans Hagen:
>>
 I checked the pgf versions in my ConTeXt installations from 20180913 and 
 20190909, they are the same : 3.0.1. So I suppose that the change comes 
 from ConTeXt itself, that’s why I report the problem here.
>>
>>> ok, for now i'll add these as aliases but savepos is not really related
>>> to pdf (in luatex)
>>
>> tikz/pgf knows about \savepos and does it correctly with lualatex.
>> So I would suggest a bug report at https://github.com/pgf-tikz/pgf.
> I just assume that Henri deals with it in due time.

For some reason TikZ tries to load the pdftex driver when used in
ConTeXt instead of the luatex driver.
https://github.com/pgf-tikz/pgf/issues/742

Cheers, Henri

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



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


Re: [NTG-context] Cross references to column numbers

2019-09-09 Thread Henri Menke
Bump

On 9/3/19 4:46 AM, Oliver von Criegern wrote:
> Dear list members,
> 
> is there any way to get a cross reference to a column in a two column layout?
> 
> At least, I would need to get some value that tells me whether the target is 
> in the left or in the right column. How to achieve this?
> 
> This is the more simplified version of the my previous question cited below.
> 
> Best regards,
> Oliver.
> 
> 
> Am 12.08.19 um 15:26 schrieb Oliver von Criegern:
>> Dear list members,
>>
>> how can I create cross references to column numbers?
>>
>> I have a two column layout with column numbers in the header instead of page 
>> numbers (actually, these column numbers are calculated from the page 
>> numbers). Now I want to create a cross reference that returns the column 
>> number of the target. How can I achieve this?
>>
>> Of course, I can get the page number with \pagereference (for the target) 
>> and \at (for the reference), but for calculating the column number 
>> (according to what I did in the header), I would also need to know whether 
>> the target is in the left or in the right column, and I can't see how I can 
>> get this information.
>>
>> For an example, see the question posted by me at stackexchange:
>> https://tex.stackexchange.com/questions/502944/context-cross-references-to-column-numbers
>>
>> Besides, I am wondering, regarding the generally very regular and consistent 
>> naming of commands in ConTeXt, why this is not so in the case of references. 
>> For example, to refer to a page, I need \pagereference (for the target) and 
>> \at (for the reference); to refer to a line, I need \someline (for the 
>> target) and \inline (for the reference), but only if I want it to 
>> automatically add the word "line" or something else before the number, 
>> otherwise I have to use \inlinerange. It took me some time to find that out. 
>> Wouldn't it be easier to have just one command for the target and another 
>> one for the reference, and everything else, as counters and headers to be 
>> returned, text to be added etc. to be configured by options?
>>
>> Best regards,
>> Oliver.
>>
>>
> ___
> 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] coloring the logfile

2019-08-29 Thread Henri Menke


On 29/08/19 5:35 PM, Henning Hraban Ramm wrote:
> 
>> Am 2019-08-28 um 21:54 schrieb Hans van der Meer :
>>
>> Is it possible to force lines  written in the log with \writestatus to have 
>> a specific color? The log can be very substantial and it would be nice to 
>> have some lines brought to attention by a different color.
> 
> As a text file, the log can’t have colors.
> 
> Only the output to your terminal could have ANSI color codes.
> I’d welcome this, too, but then we need additional configuration, color 
> breaks easily on some shells, the feature should adhere to the usual shell 
> variables etc. Don’t know it it would be worth the effort.

This will need engine support but is in principle dead easy.

#include 

if (isatty(fileno(stdout))) {
// color
} else {
// no color
}

> 
> Greetlings, Hraban
> ---
> https://www.fiee.net
> http://wiki.contextgarden.net
> https://www.dreiviertelhaus.de
> GPG Key ID 1C9B22FD
> 
> ___
> 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] The odd semantics of \begincsname

2019-08-17 Thread Henri Menke
On 17/08/19 8:48 PM, Hans Hagen wrote:
> On 8/17/2019 9:19 AM, Henri Menke wrote:
>> Dear list,
>>
>> According to the LuaTeX documentation:
>>
>>  “The \begincsname primitive is like \csname but doesn’t create a
>>  relaxed equivalent when there is no such name.”
>>
>> I thought it would be possible to use this fact to skip the \relax-ed
>> definition when \def-ining a new control sequence, but the following MWE
>> fails with \inaccessible:
>>
>>  \expandafter\gdef\csname yes\endcsname{}
>>  \expandafter\gdef\begincsname no\endcsname{}
>>  \bye
>>
>> Is this a bug or is this behaviour intended?  Could this be fixed by
>> making manufacture_csname aware whether it is in a def_cmd context or
>> not?
> [sorry to those who are not interested in these low level issues, just skip]
> 
> intended ... it expands to basically nothing so you get no token 
> representing a 'name' after the gdef .. the expansion is pushed in from 
> of whatever comes next (which could be another \expandafter for instance)
> 
> you suggest that if \begincsname could behave differently when it's 
> after a \def, \gdef, (and then quite some more definition related 
> commands), it could behave differently but it not an option
> 
> for instance (as mentioned) there can be more than one expansion going 
> on after these define commands, like expanding a macro that itself 
> expands to \csname so one has several \expandafters before the gdef 
> then); there is actually no looking back in scanning tokens unless a 
> token has been scanned already and looking forward would involve 
> expansion so a circular mess
> 
> an option could be not to push something on the save stack (a side 
> effect of creating the csname, which has a little impact on performance 
> and nesting) but removing that bit might give other side effects (e.g. 
> for successive reassignments inside a group, maybe even mixed local and 
> global); i did a quick test with that and it gives quite incompatible 
> output in ConTeXt so that's definitely a no-go (adding all kind fo 
> saveguards and checks in the engine doesn't pay off, especially not for 
> something that never was a problem)
> 
> some time ago i considered a convenience command \[e]defcsname, as it 
> saves a few tokens (no gain in performance as all the related things 
> still need to happen); but even that one would probably create the name 
> in the same way
> 
> so ... this is the way it is ... (i must admit that it never gave me any 
> issues so whatever triggered the question, there's probbaly a way around 
> it)

I can accept this answer.  Just for a little context, the question was
triggered by this:


https://tex.stackexchange.com/questions/504501/global-variant-of-csname-endcsname

In short: Having thousands of

\expandafter\gdef\csname foo\endcsname{}

inside a group (as happens for xmltex), can lead to a save_stack
overflow.  One way around it is to do

\begingroup\expandafter\endgroup\expandafter\gdef\csname foo\endcsname{}

The \expandafter inside the group will pull the evaluation of \csname
into the group which will discard the save_stack at the \endgroup, thus
avoiding the build-up.  However, this construction is a bit hard to
understand so I was wondering whether

\expandafter\gdef\begincsname foo\endcsname{}

could be used instead to elide the save_stack (which doesn't work
because \begincsname does not actually build a \csname).

Cheers, Henri

> 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] The odd semantics of \begincsname

2019-08-17 Thread Henri Menke
Dear list,

According to the LuaTeX documentation:

“The \begincsname primitive is like \csname but doesn’t create a
relaxed equivalent when there is no such name.”

I thought it would be possible to use this fact to skip the \relax-ed
definition when \def-ining a new control sequence, but the following MWE
fails with \inaccessible:

\expandafter\gdef\csname yes\endcsname{}
\expandafter\gdef\begincsname no\endcsname{}
\bye

Is this a bug or is this behaviour intended?  Could this be fixed by
making manufacture_csname aware whether it is in a def_cmd context or
not?

Cheers, Henri

___
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] metafun 2

2019-08-14 Thread Henri Menke
Dear Hans,

I just wanted to ask, will LMTX and MetaFun remain valid implementations
of TeX and MetaPost or do we have to expect incompatibilities?

Cheers, Henri

On 14/08/19 9:54 PM, Hans Hagen wrote:
> Hi,
> 
> In the process of providing an additional (more abstract) interface to 
> some of the old and also new MetaFun code we wonder what kind of 
> features users would like to see.
> 
> http://www.pragma-ade.com/general/magazines/mag-1104-mkiv.pdf
> 
> As a teaser I uploaded a MyWay document that shows some of what is 
> coming. All is experimental but it shows the direction. We're talking 
> ConTeXt LMTX here. For instance,
> 
>  draw lmt_outline [
>  content   = "hello",
>  kind  = "reverse",
>  fillcolor = "darkred",
>  drawcolor = "darkblue",
>  rulethickness = 1/2,
>  ] ysized h shifted (3.75h,-1.25h) ;
> 
> Wraps all the outline drawing in one macro with a set of options (there 
> will be xml interface definitions for that). Or take:
> 
>  draw lmt_followtext [
>  content = "How well does it work {\bf 1}! ",
>  path= (fullcircle scaled 4cm),
>  trace   = true,
>  spread  = true,
>  ] ysized 5cm ;
> 
> which is an easier interface to text along a curve. Arrows can be drawn 
> with
> 
>  draw lmt_arrow [
>  kind= "draw",
>  location= "middle",
>  alternative = "curved",
>  path= fullcircle
>  scaled  3cm
>  shifted (3.5cm,0cm),
>  ] withcolor "darkblue" ;
> 
> but of course the low level interface with its many variables for 
> tweaking stays around. Other examples are shown in the mentioned document.
> 
> So the question is: What do you miss in metapost support? Of course it 
> should fit within the concept, so 'artistic freehand drawings' is not 
> something that is likely to get interfaced. We are particularly 
> interested in educational applications, if only because ConTeXt started 
> out that way.
> 
> 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
> ___
> 

___
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] Wrong MetaPost text output

2019-08-11 Thread Henri Menke
On 8/11/19 10:51 AM, Hans Hagen wrote:
> I'll do this (lmtx):
> 
> metapost> use 'textext(.)' instead of 'btex . etex'
> metapost> rewrapping btex ... etex at the outer level [[dummy]]
> metapost> rewrapping btex ... etex at the outer level [["foo"]]
> metapost> rewrapping btex ... etex at the outer level [[bar]]
> 
> when this is seen
> 
> def drawtest =
> draw btex dummy etex shifted (0,0);
> draw btex "foo" etex shifted (1.5cm,0);
> draw btex bar   etex shifted (3cm,0);
> enddef;
> 
> rewrapping can work kind of ok, but it is still more fragile than textext 
> (which can also be used with variables and concatinated strings and such, 
> which probably is what one wants to do in macros)

Thank you for the quick repsonse.  This looks good to me.  However,
could you tell me a way to get the correct baseline with textext?  When
I use

\startMPpage
draw btex dummy etex shifted (0,0);
draw btex foo   etex shifted (1.5cm,0);
\stopMPpage

the baseline is the one that I would expect from TeX, i.e. at the depth
of the “y” is removed or otherwise correctly accounted for.  In contrast
when I use

\startMPpage
draw textext("dummy") shifted (0,0);
draw textext("foo")   shifted (1.5cm,0);
\stopMPpage

the baseline will be below the depth of the “y” which is sometimes
unwanted.

> 
> 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] Wrong MetaPost text output

2019-08-11 Thread Henri Menke
Dear devs,

There seems to be a bug in the MetaPost integration of ConTeXt.  The MWE
below should produce three different labels “dummy foo bar” but instead
produces “bar bar bar”.  The same example works correctly in plain
MetaPost.  Originally reported on


https://tex.stackexchange.com/questions/503773/strange-behaviour-of-the-btex-etex-construct

Cheers, Henri

---

\starttext
\startMPpage
def drawtest(expr i) = %i is not used here
draw btex dummy etex shifted (0,0);
draw btex foo   etex shifted (1.5cm,0);
draw btex bar   etex shifted (3cm,0);
enddef;
drawtest(5);
\stopMPpage
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Bug in LMTX: Color is lost after linebreak

2019-08-07 Thread Henri Menke
Dear devs,

there seems to be a bug in LMTX.  In the MWE below, the letter right
after the linebreak is black instead of gray.  I'm using the latest
beta.

mtx-context | main context file: 
/opt/context-lmtx/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2019.07.24 11:31
mtx-context | main context file: 
/opt/context-lmtx/tex/texmf-context/tex/context/base/mkiv/context.mkxl
mtx-context | current version: 2019.08.02 19:50

Cheers, Henri

---

\starttext

\startstandardmakeup[align=middle]

\tfd\setupinterlinespace
\color[middlegray]{%
  Why is the letter right after the linebreak not gray?}

\stopstandardmakeup

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


Re: [NTG-context] font switching commands

2019-07-18 Thread Henri Menke
On 19/07/19 11:45 AM, Atsuhito Kohda wrote:
> Hi all
> "Manuals-ConTeXt wiki" provides us very important and useful
> information and we find cont-eni.pdf in "overview".  In the manual,
> font switching commands \vi, \vii, \viii, \ix, \x, \xi, \xii are
> explained in p.113 but it seems they don't work except \vi and \xi.
> From my simple test with ConTeXt, \xi produces a greek letter "ξ"
> as in traditional TeX and \vi seems to do nothing.

This manual is for MKII (it is dated 2001).  The new font size switches
are \tfa, \tfb, \tfc, and so on (or \bfa for bold etc.).  Generally, you
want to use them very sparingly and only in setup code.  Your document
content should not contain any explicit size switches.

Cheers, Henri

> Is the above explanation obsolete or is additional setup necessary?
> I'd like to know what is the real situation of these commands.
> Thanks in advance.
> Best regards,
> Atsuhito Kohda
> 
> 
> ___
> 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] Side figure bug in mkiv?

2019-07-18 Thread Henri Menke
On 19/07/19 9:36 AM, Duncan Hothersall wrote:
> On Thu, 18 Jul 2019 at 22:30, Henri Menke  wrote:
> 
>>
>> Your formatting obscures the problem because compiling this example
>> works fine.  I think you are starting a new paragraph before {\bf ...}.
>> That is a well-known problem and there are posts about it on the mailing
>> list every once in a while.  The sidefigure mechanism uses \parshape to
>> make the paragraph flow around the figure.
>>
> 
> Very many thanks Henri for your patient explanation, and my apologies for
> inadvertently asking a FAQ. I had thought the effect hasn't happened with
> the same content in mkii but it must have been a happenstance of different
> formatting.

It is maybe an FAQ but I don't think it has been documented anywhere
properly.  I added my explanation to the Wiki page about unexpected
behaviour.

https://wiki.contextgarden.net/Unexpected_behavior#The_.E2.80.9Cparagraph_in_a_group.E2.80.9D_problem

Cheers, Henri

> 
> Thanks again for the clear solution.
> 
> Duncan
> 
> 
> ___
> 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] Side figure bug in mkiv?

2019-07-18 Thread Henri Menke
On 19/07/19 3:18 AM, Duncan Hothersall wrote:
> I think I have identified a bug in the side figure mechanism which is 
> demonstrated by the minimal example below. The {\bf …} construct causes the 
> para in which it appears to stop behaving properly with the side figure, and 
> the text overflows. The preceding and following paras which don't have {\bf 
> …} do behave properly.
> 
> I wondered if emphasis like \bf should be done differently (with a start/stop 
> mechanism?) in mkiv, but I found nothing to suggest it.
> 
> \starttext
> Blah blah.
> \placefigure[right,none]{}{\externalfigure[cow][width=0.30\makeupwidth]}
> Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah 
> blah blah blah blah blah blah blah blah blah blah blah. Blah blah blah blah 
> blah blah blah blah.
> {\bf Blah blah} blah blah blah blah blah blah blah blah blah blah blah blah 
> blah blah blah blah blah blah.
> Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah 
> blah blah blah blah blah blah.
> \stoptext

Your formatting obscures the problem because compiling this example
works fine.  I think you are starting a new paragraph before {\bf ...}.
That is a well-known problem and there are posts about it on the mailing
list every once in a while.  The sidefigure mechanism uses \parshape to
make the paragraph flow around the figure.  The \parshape primitive only
applies to a single paragraph, so ConTeXt communicates the current
\parshape settings to the next paragraph using \everypar.  However, when
a new paragraph starts in a group, i.e.

blah blah blah ...

{\bf Blah blah} blah ...

TeX inserts the \everypar tokens inside that group because only the
first letter starts the paragraph.  That is to say is effectively looks
like this

\everypar inserted inside the group
~|
 v
{\bf \the\everypar Blah blah} blah ...
^
|
Setting of \everypar are discarded again when leaving the group and
\parshape is lost.

You have to explicitly start a new paragraph before opening a group.
The easiest way to do this is

\dontleavehmode{\bf Blah blah} blah ...

Now the \everypar tokens are inserted directly after \dontleavehmode
outside the group and the problem goes away.

For what it's worth, the MKIV way to switch to bold face is \bold{text}
instead of {\bf text} but it also doesn't fix your problem because
neither of the two start a new paragraph before the first letter and
therefore \the\everypar is still inside a group.

Cheers, Henri

> 
> Thanks for any help.
> 
> Duncan
> 
> ___
> 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] Strange error updatng LMTX

2019-07-10 Thread Henri Menke
\c!compressdistance is defined in strc-lnt.mkvi which is loaded *after*
strc-flt.mkvi (where it is used) in context.mkiv.  This has to be fixed
by Hans.

Cheers, Henri

On 11/07/19 2:45 PM, Andres Conrado wrote:
> When updating my LMTX installation today, I got this:
> 
> tex error   > tex error on line 179 in file
> /home/conrado/Apps/lmtx/tex/texmf-context/tex/context/base/mkiv/strc-flt.mkvi:
> ! Undefined control sequence
> 
>  \c!compressdistance
> =\emwidth
> \mult_interfaces_get_parameters_item ...2->\if ,#1
>   ,\expandafter 
> \mult_interf...
> \mult_interfaces_get_parameters_indeed ...tem #1,]
>   ,
> \setup_float ...es_get_parameters {\??float :}[#1]
>   \the \everysetupfloat \fi 
> ...
>  \syst_helpers_double_empty_two_nop
> \par
> l.179
> 
> 
> 169\c!bottomoffset=\zeropoint,
> 170\c!freeregion=\v!yes,
> 171   %\c!local=,
> 172   %\c!bottombefore=, % e.g. \vfill
> 173   %\c!bottomafter=,
> 174   %\c!default=, % default location
> 175\c!sidethreshold=.5\strutdp, % set to "old" to check with old 
> method
> 176\c!numbering=\v!yes,
> 177\c!compress=\v!yes, % when possible pack floats when flushing
> 178\c!compressdistance=\emwidth]
> 179 >>
> 180 \setupfloatframed
> 181   [\c!frame=\v!off,
> 182\c!offset=\v!overlay,
> 183\c!strut=\v!no]
> 184
> 185 \appendtoks
> 186 
> \doifelse{\floatparameter\c!compress}\v!yes\settrue\setfalse\c_page_floats_pack_flushed
> 187 
> \d_page_floats_compress_distance\floatparameter\c!compressdistance\relax
> 188 \to \everysetupfloat
> 189
> 
> 
> The control sequence at the end of the top line
> of your error message was never \def'ed. If you have
> misspelled it (e.g., '\hobx'), type 'I' and the correct
> spelling (e.g., 'I\hbox'). Otherwise just continue,
> and I'll forget about whatever was undefined.
> 
> Seems to affect the floats mechanism.
> 
> Andrés Conrado Montoya
> http://chiquitico.org
> 
> 
> ___
> 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] feature request

2019-07-03 Thread Henri Menke
The existing definition of \pmatrix in math-pln.mkiv is the original
Plain TeX definition, because in the very early days ConTeXt used to be
compatible with Plain.  This tradition has prevailed until today.  You
will find other remnants of Plain TeX in ConTeXt, e.g. \eqalign, but it
is better not to use them.

Just like Plain TeX, ConTeXt does not provide \bmatrix and \vmatrix.
One reason is that they didn't exist in Plain, but another important
reason is that Hans is not a mathematician.  If I remember correctly
ConTeXt was originally developed for typesetting of primary school
textbooks and last I checked matrix algebra was not part of the
curriculum.

Other developers (Alan, Aditya, and others) have contributed math
typesetting macros over time, but these follow the ConTeXt philosophy of
providing strong defaults but trying to avoid feature creep.  Therefore
bmatrix, vmatrix, etc. are not defined by default, but as you saw from
my last message it is trivial to define these, especially because
templates (matrix:parentheses, etc.) for them already exist in the core.

It would sometimes be nice if you could just copy and paste LaTeX code
into a ConTeXt document and it just works™, but after all ConTeXt is not
LaTeX.

Cheers, Henri

On 4/07/19 5:18 PM, Atsuhito Kohda wrote:
> Hi Henri,
> Thanks for your suggestions, they are very instructive.
> However, my request is not a smart way of displaying matrices
> but to know why \bmatrix and \vmatrix are not provided
> in core part of ConTeXt although \pmatrix is provided already
> in math-pln.mkiv
> 
> About matrices, I first found commands in your first email in
> http://dl.contextgarden.net/myway/context-latex-math.pdf
> (like \startpmatrix \NC A\NC B\NR \NC C\NC D\NR\stoppmatrix)
> and then browsing ma-cb-en.pdf I noticed another command
> like \pmatrix{A\cr C\cr}.
> Now by your email, I know a command \pmatrix{A, B; C, D}
> 
> One might say ConTeXt is flexible but I've an impression
> that ConTeXt is in a state of confusion/disorder.
> 
> I think it is better if a standard command is provided
> by core ConTeXt or by a module etc.
> 
> Or is it ConTeXt way that each user defines his/her own commands
> in setup area and uses them in text area?
> I'm afraid consistency and/or portability is lost in such scenario.
> 
> BTW, I constantly convert Beamer documents into ConTeXt's
> simpleslide documents recently and it is very convenient
> if I can use \pmatrix{a\cr c\cr} style because it is similar
> to LaTeX documents.
> 
> 2019年7月3日(水) 15:42 Henri Menke :
> 
>>
>>
>> On 3/07/19 6:00 PM, Atsuhito Kohda wrote:
>>> I've used LaTeX quite a long time but recently I begin to use ConTeXt
>> too.
>>> So I'm very sorry if the following is well-known issue.
>>>
>>> I find an example of \pmatrix in p.21 of "ConTeXt Mark IV an excursion"
>>> (ma-cb-en.pdf).  And I notice it is defined in
>>> /usr/share/texmf/tex/context/base/mkiv/math-pln.mkiv (in Debian).
>>> But it seems \bmatrix, \vmatrix are not defined yet.
>>> Is there any reason why they are not defined?
>>> Similar commands or environments \begin{bmatrix}...\end{bmatrix},
>>> \begin{vmatrix}...\end{vmatrix} are very often used in mathematical
>>> LaTeX documents.
>>> It is very useful if we can use \bmatrix and \vmatrix in ConTeXt
>>> documents, so please add
>>> \unexpanded\def\bmatrix#1%
>>>   {\left[\matrix{#1}\right]}
>>> \unexpanded\def\vmatrix#1%
>>>   {\left|\matrix{#1}\right|}
>>> in math-pln.mkiv or somewhere.
>>
>> Ignore my other message, this is even better:
>>
>> \definemathmatrix
>>   [pmatrix]
>>   [matrix:parentheses]
>>   [simplecommand=pmatrix]
>>
>> \definemathmatrix
>>   [bmatrix]
>>   [matrix:brackets]
>>   [simplecommand=bmatrix]
>>
>> \definemathmatrix
>>   [vmatrix]
>>   [matrix:bars]
>>   [simplecommand=vmatrix]
>>
>> \definemathmatrix
>>   [Vmatrix]
>>   [left={\left\lVert\mskip\thinmuskip},
>>right={\mskip\thinmuskip\right\rVert},
>>align=middle,
>>simplecommand=Vmatrix]
>>
>> \starttext
>>
>> \startformula
>> \startpmatrix
>> \NC A \NC B \NR
>> \NC C \NC D \NR
>> \stoppmatrix
>> \quad
>> \startbmatrix
>> \NC A \NC B \NR
>> \NC C \NC D \NR
>> \stopbmatrix
>> \quad
>> \startvmatrix
>> \NC A \NC B \NR
>> \NC C \NC D \NR
>> \stopvmatrix
>> \quad
>> \startVmatrix
>> \NC A \NC B \NR
>> \NC C \NC D \NR
>> \stopVmat

Re: [NTG-context] feature request

2019-07-03 Thread Henri Menke


On 3/07/19 6:00 PM, Atsuhito Kohda wrote:
> I've used LaTeX quite a long time but recently I begin to use ConTeXt too.
> So I'm very sorry if the following is well-known issue.
> 
> I find an example of \pmatrix in p.21 of "ConTeXt Mark IV an excursion"
> (ma-cb-en.pdf).  And I notice it is defined in
> /usr/share/texmf/tex/context/base/mkiv/math-pln.mkiv (in Debian).
> But it seems \bmatrix, \vmatrix are not defined yet.
> Is there any reason why they are not defined?
> Similar commands or environments \begin{bmatrix}...\end{bmatrix},
> \begin{vmatrix}...\end{vmatrix} are very often used in mathematical
> LaTeX documents.
> It is very useful if we can use \bmatrix and \vmatrix in ConTeXt
> documents, so please add
> \unexpanded\def\bmatrix#1%
>   {\left[\matrix{#1}\right]}
> \unexpanded\def\vmatrix#1%
>   {\left|\matrix{#1}\right|}
> in math-pln.mkiv or somewhere.

Ignore my other message, this is even better:

\definemathmatrix
  [pmatrix]
  [matrix:parentheses]
  [simplecommand=pmatrix]
 
\definemathmatrix
  [bmatrix]
  [matrix:brackets]
  [simplecommand=bmatrix]

\definemathmatrix
  [vmatrix]
  [matrix:bars]
  [simplecommand=vmatrix]

\definemathmatrix
  [Vmatrix]
  [left={\left\lVert\mskip\thinmuskip},
   right={\mskip\thinmuskip\right\rVert},
   align=middle,
   simplecommand=Vmatrix]

\starttext

\startformula
\startpmatrix
\NC A \NC B \NR
\NC C \NC D \NR
\stoppmatrix
\quad 
\startbmatrix
\NC A \NC B \NR
\NC C \NC D \NR
\stopbmatrix
\quad
\startvmatrix
\NC A \NC B \NR
\NC C \NC D \NR
\stopvmatrix
\quad
\startVmatrix
\NC A \NC B \NR
\NC C \NC D \NR
\stopVmatrix
\stopformula

\startformula
\pmatrix{A, B; C, D}
\quad 
\bmatrix{A, B; C, D}
\quad 
\vmatrix{A, B; C, D}
\quad 
\Vmatrix{A, B; C, D}
\stopformula

\stoptext

> 
> By the way, I think it is critical to set
> \setupmathematics[ampersand=normal]
> to use \matrix above but I can't find this setting in ma-cb-en.pdf
> It is great if this is added in  ma-cb-en.pdf
> 
> 
> ___
> 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] feature request

2019-07-03 Thread Henri Menke


On 3/07/19 6:00 PM, Atsuhito Kohda wrote:
> I've used LaTeX quite a long time but recently I begin to use ConTeXt too.
> So I'm very sorry if the following is well-known issue.
> 
> I find an example of \pmatrix in p.21 of "ConTeXt Mark IV an excursion"
> (ma-cb-en.pdf).  And I notice it is defined in
> /usr/share/texmf/tex/context/base/mkiv/math-pln.mkiv (in Debian).
> But it seems \bmatrix, \vmatrix are not defined yet.
> Is there any reason why they are not defined?
> Similar commands or environments \begin{bmatrix}...\end{bmatrix},
> \begin{vmatrix}...\end{vmatrix} are very often used in mathematical
> LaTeX documents.
> It is very useful if we can use \bmatrix and \vmatrix in ConTeXt
> documents, so please add
> \unexpanded\def\bmatrix#1%
>   {\left[\matrix{#1}\right]}
> \unexpanded\def\vmatrix#1%
>   {\left|\matrix{#1}\right|}
> in math-pln.mkiv or somewhere.

\definemathmatrix
  [pmatrix]
  [left={\left(},right={\right)}]
 
\definemathmatrix
  [bmatrix]
  [left={\left[},right={\right]}]

\definemathmatrix
  [vmatrix]
  [left={\left\lvert},right={\right\rvert}]

\definemathmatrix
  [Vmatrix]
  [left={\left\lVert},right={\right\rVert}]

\starttext

\startformula
\startpmatrix
\NC A \NC B \NR
\NC C \NC D \NR
\stoppmatrix
\quad 
\startbmatrix
\NC A \NC B \NR
\NC C \NC D \NR
\stopbmatrix
\quad
\startvmatrix
\NC A \NC B \NR
\NC C \NC D \NR
\stopvmatrix
\quad
\startVmatrix
\NC A \NC B \NR
\NC C \NC D \NR
\stopVmatrix
\stopformula

\stoptext

> 
> By the way, I think it is critical to set
> \setupmathematics[ampersand=normal]

This should not be necessary in general.  Just use \NC and \NR.

> to use \matrix above but I can't find this setting in ma-cb-en.pdf
> It is great if this is added in  ma-cb-en.pdf
> 
> 
> ___
> 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] [OT] rasperry 4

2019-06-25 Thread Henri Menke
On 25/06/2019, 09:15:43, luigi scarso wrote:
> On Tue, Jun 25, 2019 at 12:15 AM Henri Menke  wrote:
> 
> > On 25/06/19 12:30 AM, luigi scarso wrote:
> > > just seen
> > > https://www.raspberrypi.org/products/raspberry-pi-4-model-b/
> > >
> > > I would like to know your impressions
> >
> > Does it still need proprietary binary blobs in the kernel?
> 
> 
> dunno
> 

From the page you linked:

Raspberry Pi packages
[...]
- linux-firmware-raspi2 - GPU firmware bootloader files and pi 3 wifi 
firmware file
- linux-raspi2 (linux-image-raspi2) - Linux kernel with patches from 
https://github.com/raspberrypi/linux
- u-boot-rpi - Provides u-boot.bin
- flash-kernel - Automatically copies the latest kernel, dtb file and 
u-boot script to the pi's fat formatted GPU firmware partition 

So yes, there is a whole bunch of non-free stuff required to even boot
the system.

> 
> >
> > so it is as useless as all the models before because it can only
> > run their custom Raspbian distro.
> >
> 
> 
> https://wiki.ubuntu.com/ARM/RaspberryPi
> 18.04.2 both 32bit and 64bit work
> 
> -- 
> luigi

> ___
> 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] [OT] rasperry 4

2019-06-24 Thread Henri Menke
On 25/06/19 12:30 AM, luigi scarso wrote:
> just seen
> https://www.raspberrypi.org/products/raspberry-pi-4-model-b/
> 
> I would like to know your impressions

Does it still need proprietary binary blobs in the kernel?  Probably
yes, so it is as useless as all the models before because it can only
run their custom Raspbian distro.

> 
> 
> ___
> 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] Old version of luatex for alpine linux (musl)

2019-06-08 Thread Henri Menke
On 6/8/19 7:02 PM, Martin Hasoň wrote:
> Dear Mojca,
> 
> musl LuaTeX binary is out of date again:
> 
> This is LuaTeX, Version 1.09.2 (TeX Live 2019/dev)  (INITEX)
>  system commands enabled.
> (/usr/share/tex/texmf-context/tex/context/base/mkiv/cont-en.mkiv
> (/usr/share/tex/texmf-context/tex/context/base/mkiv/context.mkiv
> (/usr/share/tex/texmf-context/tex/context/base/mkiv/syst-ini.mkiv) :
> Your luatex binary is too old, you need at least version 1.10!))
> 
> Would it be possible to update automatically LuaTeX?

For the time being you can grab the latest binaries from here:
https://github.com/TeX-Live/luatex/releases
Download the luatex-bin-x86_64-musl.tar.gz archive.

> 
> Best regards
> Martin
> 
> pá 26. 10. 2018 v 14:08 odesílatel Mojca Miklavec <
> mojca.miklavec.li...@gmail.com> napsal:
> 
>> Dear Martin,
>>
>> On Tue, 23 Oct 2018 at 15:24, Mojca Miklavec wrote:
>> > On Tue, 23 Oct 2018 at 13:37, Martin Hasoň wrote:
>> > >
>> > > I want to use the last beta version of standalone ConTeXt distribution
>> in alpine linux (musl). The installation was OK, but an error occurred
>> while compiling the file:
>> >
>> > Eeeem, my fault, sorry. I did not update LuaTeX for musl as it comes
>> > from another source
>>
>> Can you please try again if it works now?
>>
>> Thanks to Henri I fetched the binary of LuaTeX 1.09 (but did not yet
>> set up automation to do that in the future, please give me some more
>> time :).
>>
>> Henri, thanks a lot.
>>
>> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Remove italics from bibliography list

2019-05-17 Thread Henri Menke
You asked the same question on TeX.SX but also without MWE, so I have no idea
what is going on.  The MWE below works.

Cheers, Henri

---

\usebtxdefinitions[apa]
\usebtxdataset[default][samples.bib]
\definebtxrendering[default][apa]
\setupbtx
[apa:list:title:book]
[style=]

\starttext

\nocite[Tufte:1990:EI:78223]
\placelistofpublications[criterium=all]

\stoptext

On 17/05/19 10:41 PM, Dmitry Starostin wrote:
> I tried several variants, but I cannot find where exactly the switch
> happens.
> 
> \definebtx[apa:list:title:incollection][apa:list:title][style=]
> \definebtx[apa:list:title:book][apa:list:title][style=]
> 
> \definebtx[apa:list:journal][apa:list][style=]
> 
> 
> ___
> 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] Styles

2019-05-16 Thread Henri Menke
On 5/16/19 9:16 PM, Dmitry Starostin wrote:
> 1. If I need square brackets in apa instead of parentheses, is there an
> easy switch?
For example

\setupbtx
  [apa:cite:authornum]
  [left=,right=]

> 
> 2. There was a suggestion to write one's own style. But where can one look
> in the standalone ConTeXt distribution for the aps or apa style file to
> modify it? At least, what is the file extension?

tex/texmf-context/tex/context/base/mkiv/publ-imp-apa.lua
tex/texmf-context/tex/context/base/mkiv/publ-imp-apa.mkvi

> 
> 
> ___
> 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] Inline math with \int and \sum exhibits nonstandard behaviour

2019-05-16 Thread Henri Menke
On 16/05/19 7:46 AM, Eric Scmidt wrote:
> Thank for your efforts to help me.  This time I used the exact code snippet 
> you 
> wrote, but the results for inline math is still not what I would like to have 
> since I do see a clear difference in the limits placement. Please see this 
> image 
> where I have tried to make more clear what I really want to achieve and what 
> the 
> code gives me:  https://i.imgur.com/AEfHxBh.png
> It might be a font issue, since examining the context and pdflatex output 
> files,  I see differences in fonts, alghough the actual glyphs look pretty 
> much 
> the same. I don't really know.

Yes, it is a different font.  If you want to use the same font in LaTeX as in
ConTeXt, you have to load the unicode-math package and use LuaLaTeX.

\documentclass{article}
\usepackage{unicode-math}
\begin{document}
$\sum_{k=1}^{n} a_k$
\[
\sum\nolimits_{k=1}^{n} a_k
\]
\end{document}

Cheers, Henri


> -Eric
> 
> 
> ___
> 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] Inline math with \int and \sum exhibits nonstandard behaviour

2019-05-12 Thread Henri Menke
To me the following two MWEs look pretty much the same:

\setupbodyfont[10pt] % same font size as LaTeX
\starttext
$\sum_{k=1}^{n} a_k$
\startformula
\sum\nolimits_{k=1}^{n} a_k
\stopformula
\stoptext


\documentclass{article}
\begin{document}
$\sum_{k=1}^{n} a_k$
\[
\sum\nolimits_{k=1}^{n} a_k
\]
\end{document} 

I tried that with versions of ConTeXt from TeX Live 2016, 2017, 2018, and 2019,
as well as the latest beta, all with the same result.

You refer to ma-cb-en page 19, but which of the two equations, the first or the
second one?  Keep in mind that the first one uses

\sum_{n=1}_^{m}

where you are using

\sum\nolimits_{k=1}^{n}

Cheers, Henri

On 11/05/19 7:42 AM, Eric Scmidt wrote:
> Hello everyone!
> So, I have some inline math in my document,and it's looking too big or 
> "airy"; a 
> bit like when \nolimits is specified in display mode but smaller. The limits 
> are 
> placed next to the symbol when using for example pdflatex, and I prefer this 
> tight way for inline math. Is the "airier" way a (new) Context standard or a 
> bug, and if it is just a standard how can I achieve the tighter style 
> (could't 
> find any pointers anywhere)? At least the latest beta exhibits this behaviour 
> (for what it is worth, Context mark IV an excursion by Ton Otten, the version 
> produced by LuaTeX-1.06.0 , has the style I want on page 19, and no special 
> tricks are discussed). All help is greatly appreciated.
> \starttext
> $\sum_{k=1}^{n} a_k$
> \startformula
> \sum\nolimits_{k=1}^{n} a_k
> \stopformula
> \stoptext
> -Eric
> 
> 
> ___
> 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] adjusting tikz pictures

2019-04-25 Thread Henri Menke
On 26/04/19 1:29 AM, Mojca Miklavec wrote:
> On Wed, 24 Apr 2019 at 12:51, Gour wrote:
>>
>> Hello,
>>
>> I believe that using GeoGebra for drawing, exporting to TikZ is the most
>> approachable method for me to be able to create mathematic-related
>> material like exams for the children in the primary school, but need some
>> info how to adjust GeoGebra's TikZ output (suitable for LaTeX) for
>> ConTeXt?
> 
> Ideally someone should fix Geogebra to allow outputting
> ConTeXt-friendly TikZ images.

Apparently you can already do that.  In the source there is a switch to use 
ConTeXt.
https://github.com/geogebra/geogebra/blob/15e0fccd656e4b8628daa29ebdba975828de27f8/common/src/main/java/org/geogebra/common/export/pstricks/GeoGebraToPgf.java#L77

> 
> The differences should be small enough that this should be doable.
> 
> 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://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
___


[NTG-context] Formula number misplaced

2019-04-23 Thread Henri Menke

Dear list,

The problem I describe does not make itself apparent in all situations,
but sometimes the formula number, which is placed by
\start...\stopplaceformula, is misplaced and there appears a gap between
it and the right margin.  The MWE below reproduces the problem in the
latest beta and lmtx.  It can be "fixed", however, by replacing
\start...\stopTEXpage by \start...\stoptext, so this might not represent
the most generic incarnation.

Cheers, Henri

---


\startTEXpage

\samplefile{ward} Thus
\startplaceformula
\startformula
\int_a^b f(x) \, \diff x = F(b) - F(a) .
\stopformula
\stopplaceformula

\stopTEXpage
___
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] Strange behavior with \usetikzlibrary [matrix]

2019-04-18 Thread Henri Menke
On 4/18/19 10:22 PM, Fabrice Couvreur wrote:
> Hi Henry,
> This has no effect, the problem is the same.

ConTeXt  ver: 2019.04.16 08:54 MKIV beta

PDF is attached.

> Fabrice
> 
> Le jeu. 18 avr. 2019 à 12:17, Henri Menke  a écrit :
> 
>> In ConTeXt the ampersand is not an alignment character but has catcode
>> 12 by default.  Use the "ampersand replacement" option.
>>
>> \usemodule[tikz]
>> \usetikzlibrary[matrix,decorations.pathreplacing, calc, positioning,fit]
>> \starttext
>>
>> \starttikzpicture[>=stealth,thick,baseline,
>> every right delimiter/.append style={name=rd},
>> ]
>> \matrix [matrix of math nodes,
>> left delimiter=(,
>> right delimiter=),
>> ampersand replacement=\&
>> ](A){
>> a_{1,1} \& a_{1,2} \& \dots  \& a_{1,j} \& \dots \& a_{1,n}\\
>> a_{2,1} \& a_{2,2} \& \dots  \& a_{2,j} \& \dots \& a_{2,n}\\
>> \vdots  \& \vdots  \&  \& \vdots  \&  \& \vdots\\
>> a_{i,1} \& a_{i,2} \& \dots  \& a_{i,j} \& \dots \& a_{i,n}\\
>> \vdots  \& \vdots  \&  \& \vdots  \&  \& \vdots\\
>> a_{n,1} \& a_{n,2} \& \dots  \& a_{n,j} \& \dots \& a_{n,n}\\
>> };
>>
>> \draw[<-] (rd)--++(0:6mm) node[right]{$i$-ième colonne};
>> \draw[<-] (A.south-|A-1-4.center) --++(-90:6mm) node[below]{$j$-ième
>> colonne};
>>
>> \stoptikzpicture
>> \stoptext
>>
>>
>>
>> On 4/18/19 9:26 PM, Fabrice Couvreur wrote:
>> > Hi,
>> > If I compile the following code, the result is not the one expected.
>> >
>> > \usemodule[tikz]
>> > \usetikzlibrary[matrix,decorations.pathreplacing, calc, positioning,fit]
>> > \starttext
>> >
>> > \starttikzpicture[>=stealth,thick,baseline,
>> > every right delimiter/.append style={name=rd},
>> > ]
>> > \matrix [matrix of math nodes,
>> > left delimiter=(,
>> > right delimiter=),
>> > ](A){
>> > a_{1,1} & a_{1,2} & \dots  & a_{1,j} & \dots & a_{1,n}\\
>> > a_{2,1} & a_{2,2} & \dots  & a_{2,j} & \dots & a_{2,n}\\
>> > \vdots  & \vdots  &  & \vdots  &  & \vdots\\
>> > a_{i,1} & a_{i,2} & \dots  & a_{i,j} & \dots & a_{i,n}\\
>> > \vdots  & \vdots  &  & \vdots  &  & \vdots\\
>> > a_{n,1} & a_{n,2} & \dots  & a_{n,j} & \dots & a_{n,n}\\
>> > };
>> >
>> > \draw[<-] (rd)--++(0:6mm) node[right]{$i$-ième colonne};
>> > \draw[<-] (A.south-|A-1-4.center) --++(-90:6mm) node[below]{$j$-ième
>> > colonne};
>> >
>> > \stoptikzpicture
>> > \stoptext
>> >
>> > Thank you
>> > Fabrice
>> >
>> >
>> >
>> ___
>> > 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
> ___
> 



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


Re: [NTG-context] Strange behavior with \usetikzlibrary [matrix]

2019-04-18 Thread Henri Menke
In ConTeXt the ampersand is not an alignment character but has catcode
12 by default.  Use the "ampersand replacement" option.

\usemodule[tikz]
\usetikzlibrary[matrix,decorations.pathreplacing, calc, positioning,fit]
\starttext

\starttikzpicture[>=stealth,thick,baseline,
every right delimiter/.append style={name=rd},
]
\matrix [matrix of math nodes,
left delimiter=(,
right delimiter=),
ampersand replacement=\&
](A){
a_{1,1} \& a_{1,2} \& \dots  \& a_{1,j} \& \dots \& a_{1,n}\\
a_{2,1} \& a_{2,2} \& \dots  \& a_{2,j} \& \dots \& a_{2,n}\\
\vdots  \& \vdots  \&  \& \vdots  \&  \& \vdots\\
a_{i,1} \& a_{i,2} \& \dots  \& a_{i,j} \& \dots \& a_{i,n}\\
\vdots  \& \vdots  \&  \& \vdots  \&  \& \vdots\\
a_{n,1} \& a_{n,2} \& \dots  \& a_{n,j} \& \dots \& a_{n,n}\\
};

\draw[<-] (rd)--++(0:6mm) node[right]{$i$-ième colonne};
\draw[<-] (A.south-|A-1-4.center) --++(-90:6mm) node[below]{$j$-ième
colonne};

\stoptikzpicture
\stoptext



On 4/18/19 9:26 PM, Fabrice Couvreur wrote:
> Hi,
> If I compile the following code, the result is not the one expected.
> 
> \usemodule[tikz]
> \usetikzlibrary[matrix,decorations.pathreplacing, calc, positioning,fit]
> \starttext
> 
> \starttikzpicture[>=stealth,thick,baseline,
> every right delimiter/.append style={name=rd},
> ]
> \matrix [matrix of math nodes,
> left delimiter=(,
> right delimiter=),
> ](A){
> a_{1,1} & a_{1,2} & \dots  & a_{1,j} & \dots & a_{1,n}\\
> a_{2,1} & a_{2,2} & \dots  & a_{2,j} & \dots & a_{2,n}\\
> \vdots  & \vdots  &  & \vdots  &  & \vdots\\
> a_{i,1} & a_{i,2} & \dots  & a_{i,j} & \dots & a_{i,n}\\
> \vdots  & \vdots  &  & \vdots  &  & \vdots\\
> a_{n,1} & a_{n,2} & \dots  & a_{n,j} & \dots & a_{n,n}\\
> };
> 
> \draw[<-] (rd)--++(0:6mm) node[right]{$i$-ième colonne};
> \draw[<-] (A.south-|A-1-4.center) --++(-90:6mm) node[below]{$j$-ième
> colonne};
> 
> \stoptikzpicture
> \stoptext
> 
> Thank you
> Fabrice
> 
> 
> ___
> 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] Adjust kerning with superscript

2019-04-15 Thread Henri Menke


On 15/04/19 9:06 PM, Hans Hagen wrote:
> On 4/15/2019 9:50 AM, Henri Menke wrote:
>> Dear list,
>>
>> I am unhappy with how some fonts kern particular subscripts.  For example in
>> the default Latin Modern, subscripts to the Greek capital gamma could use 
>> some
>> negative kerning.  Because I can't (and don't want to) fix the font, I 
>> thought
>> that I could patch the font on-the-fly in ConTeXt.
>>
>> The usual approach with fonts.handlers.otf.addfeature works well in math 
>> mode,
>> but does not extend into subscripts (MWE below).  Is there a method to adjust
>> subscript kernings?  Could this be done using mathkerns?  Latin Modern 
>> doesn't
>> have any but maybe they can be added on the fly.
>>
>> Cheers, Henri
>>
>> ---
>>
>> \startluacode
>> fonts.handlers.otf.addfeature {
>>  type = "kern",
>>  name = "kern",
>>  data = { [0x0393] = { [0x0030] = -200 } }
>> }
>> \stopluacode
>>
>> \setupbodyfont[modern]
>>
>> \starttext
>> $\Gamma0$ % works fine :)
>>
>> $\Gamma_0$ % doesn't work :(
>> \stoptext
> see pagella-math.lfg

Thanks for the hint.  Is there a possibility to do this without goodies?  They
are not available in generic.

Cheers, Henri

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

___
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] Adjust kerning with superscript

2019-04-15 Thread Henri Menke
Dear list,

I am unhappy with how some fonts kern particular subscripts.  For example in
the default Latin Modern, subscripts to the Greek capital gamma could use some
negative kerning.  Because I can't (and don't want to) fix the font, I thought
that I could patch the font on-the-fly in ConTeXt.

The usual approach with fonts.handlers.otf.addfeature works well in math mode,
but does not extend into subscripts (MWE below).  Is there a method to adjust
subscript kernings?  Could this be done using mathkerns?  Latin Modern doesn't
have any but maybe they can be added on the fly.

Cheers, Henri

---

\startluacode
fonts.handlers.otf.addfeature {
type = "kern",
name = "kern",
data = { [0x0393] = { [0x0030] = -200 } }
}
\stopluacode

\setupbodyfont[modern]

\starttext
$\Gamma0$ % works fine :)

$\Gamma_0$ % doesn't work :(
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Undefined symbol lua_gettop

2019-04-06 Thread Henri Menke
On 4/7/19 6:02 AM, Aditya Mahajan wrote:
> Hi,
> 
> I am experimenting with using lua libraries with lmtx. I tried the
> following:
> 
> 1. Download the lcomplex library (from
> http://webserver2.tecgraf.puc-rio.br/~lhf/ftp/lua/ar/lcomplex-100.tar.gz)
> 
> 2. Untar and modify the Makefile so that LUA_TOPDIR points to the right
> location (/usr in my case).
> 
> 3. Run make. This creates a complex.so file in the current directory.
> 
> 4. Create a test file (and put complex.so in the same directory)
> 
> \starttext
> \startluacode
>   local complex=require("complex")
> 
>   z = complex.new(1,1);
>   context("The absolute value of $z=%f + j%f$ is $%f$",
>    z:real(), z:imag(), z:abs());
> \stopluacode
> \stoptext
> 
> This file runs correctly with mkiv, but when I try to run it with lmtx,
> I get the error
> 
> lua error   > lua error on line 8 in file
> /home/adityam/Software/lcomplex/lcomplex-100/test.tex:
> 
> ...etatex/texmf-context/tex/context/base/mkiv/l-package.lua:325: error
> loading module 'complex' from file './complex.so':
>     ./complex.so: undefined symbol: lua_gettop
> 
> Any idea why this is happening and what I can do to fix it?

Lua is linked statically into LuaTeX and when the executable is stripped
and lua_gettop has not been referenced anywhere, it will be removed.

> 
> Aditya
> ___
> 
> 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] How to update LMTX?

2019-04-04 Thread Henri Menke
On 5/04/19 9:32 AM, Alan Braslau wrote:
> One just runs ./install.sh at any time to update.

Yes, just like ./first-setup.sh for ConTeXt standalone, but how to update
./install.sh and mtxrun without downloading the whole zip every time?

Cheers, Henri

> 
> Alan
> 
> 
> On Fri, 5 Apr 2019 09:27:15 +1300
> Henri Menke  wrote:
> 
>> Dear list,
>>
>> With ConTeXt standalone there was an easy way to update the install script 
>> and
>> the distrivution using
>>
>> rsync -ptv rsync://contextgarden.net/minimals/setup/first-setup.sh .
>> sh ./first-setup.sh --context=latest --engine=luatex --modules=all 
>> --fonts=all
>>
>> For LMTX it seems that I have to download the zip from
>> http://www.pragma-ade.nl/install.htm, extract it and then run install.sh to
>> account for possibly updated installation scripts.  Is there a resource 
>> where I
>> can download the (unzipped) install script and binaries via rsync directly?
>>
>> On another note, it seems that I can't install modules and fonts in LMTX.  
>> When running
>>
>> mtxrun --script mtx-install.lua --help
>>
>> I can see the options --modules and --fonts but running
>>
>> bin/mtxrun --script ./bin/mtx-install.lua --update --server="..." 
>> --instance="..." --modules=all --fonts=all
>>
>> seems to have no effect.  How do I install modules and fonts?
>>
>> Cheers, Henri
>>
>> ___
>> 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
___


[NTG-context] How to update LMTX?

2019-04-04 Thread Henri Menke
Dear list,

With ConTeXt standalone there was an easy way to update the install script and
the distrivution using

rsync -ptv rsync://contextgarden.net/minimals/setup/first-setup.sh .
sh ./first-setup.sh --context=latest --engine=luatex --modules=all 
--fonts=all

For LMTX it seems that I have to download the zip from
http://www.pragma-ade.nl/install.htm, extract it and then run install.sh to
account for possibly updated installation scripts.  Is there a resource where I
can download the (unzipped) install script and binaries via rsync directly?

On another note, it seems that I can't install modules and fonts in LMTX.  When 
running

mtxrun --script mtx-install.lua --help

I can see the options --modules and --fonts but running

bin/mtxrun --script ./bin/mtx-install.lua --update --server="..." 
--instance="..." --modules=all --fonts=all

seems to have no effect.  How do I install modules and fonts?

Cheers, Henri

___
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] lmtx doesn't search texmf-local

2019-04-02 Thread Henri Menke
On 3/04/19 10:19 AM, Taco Hoekwater wrote:
> My guess: drop the '/opt/context-lmtx/bin' from your PATH.

That works, thank you.  Then install.sh has to be adjusted because it told me to

export 
PATH=/opt/context-lmtx/tex/texmf-linux-64/bin:/opt/context-lmtx/bin:/opt/context-lmtx/tex/texmf-linux-64/bin:...

Cheers, Henri

> 
> Best wishes,
> Taco
> 
>>> Op 2 apr. 2019 om 23:02 heeft Hans Hagen  het volgende 
>>> geschreven:
>>>
>>> On 4/2/2019 10:46 PM, Henri Menke wrote:
>>>
>>> resolvers | resolving | warning: no lua configuration files found
>>
>> ^
>>
>> -
>> 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
>> ___
> 
> ___
> 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
___


[NTG-context] lmtx doesn't search texmf-local

2019-04-02 Thread Henri Menke
Dear list,

I have installed LMTX into /opt/context-lmtx/ and placed my favourite fonts
into /opt/context-lmtx/tex/texmf-local/ as I also did in ConTeXt standalone.  I
would expect LMTX to find the newly installed otf files after regenerating the
file tree but that is not the case, see my terminal log below.  Do I have to do
it differently for LMTX?

Cheers, Henri

---

$ ls 
/opt/context-lmtx/tex/texmf-local/fonts/opentype/bh/lucidaot/LucidaBrightOT.otf 
/opt/context-lmtx/tex/texmf-local/fonts/opentype/bh/lucidaot/LucidaBrightOT.otf
$ mtxrun --generate
resolvers   | resolving | variable 'SELFAUTOLOC' set to 
'/opt/context-lmtx/bin'
resolvers   | resolving | variable 'SELFAUTODIR' set to '/opt/context-lmtx'
resolvers   | resolving | variable 'SELFAUTOPARENT' set to '/opt'
resolvers   | resolving | variable 'TEXMFCNF' set to ''
resolvers   | resolving | variable 'TEXMF' set to ''
resolvers   | resolving | variable 'TEXOS' set to 'context-lmtx'
resolvers   | resolving |
resolvers   | resolving | using configuration specification 
'home:texmf/web2c;selfautoparent:/texmf-local/web2c;selfautoparent:/texmf-context/web2c;selfautoparent:/texmf-dist/web2c;selfautoparent:/texmf/web2c'
resolvers   | resolving |
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/home/henri/texmf/web2c' from specification 'home:texmf/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/opt/texmf-local/web2c' from specification 'selfautoparent:/texmf-local/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/opt/texmf-context/web2c' from specification 
'selfautoparent:/texmf-context/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/opt/texmf-dist/web2c' from specification 'selfautoparent:/texmf-dist/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/opt/texmf/web2c' from specification 'selfautoparent:/texmf/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/home/henri/texmf/web2c' from specification 'home:texmf/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/opt/texmf-local/web2c' from specification 
'selfautoparent:/texmf-local/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/opt/texmf-context/web2c' from specification 
'selfautoparent:/texmf-context/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/opt/texmf-dist/web2c' from specification 
'selfautoparent:/texmf-dist/web2c'
resolvers   | resolving | looking for fallback 'contextcnf.lua' on given 
path '/opt/texmf/web2c' from specification 'selfautoparent:/texmf/web2c'
resolvers   | resolving |
resolvers   | resolving | warning: no lua configuration files found
resolvers   | resolving | no texmf paths are defined (using TEXMF)
resolvers   | resolving |
mtxrun  |
mtxrun  | elapsed lua time: 0.011 seconds

$ mtxrun --find-file LucidaBrightOT.otf


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

2019-04-02 Thread Henri Menke


On 3/04/19 9:19 AM, Hans Hagen wrote:
> On 4/2/2019 10:11 PM, Henri Menke wrote:
>>
>>
>> On 2/04/19 10:05 PM, Hans Hagen wrote:
>>> Hi,
>>>
>>> So, for those who hesitate to check out lmtx, here is some information.
>>>
>>> - In order to achieve long term stability context will use a lean and
>>> mean variant of luatex (although for now context will keep running on
>>> luatex too; i might drop support for luajittex). Eventually the source
>>> code will be part of the context distribution so that one can always
>>> compile a binary that matches an archived context version.
>>>
>>> - This version also permits us to experiment (even very extreme) without
>>> interupting the parent program luatex, which is now used by other macro
>>> packages too and therefore needs to be frozen in functionality. Some
>>> features might trickle back into luatex eventually (unless it breaks
>>> compatibility).
>>>
>>> - As a direct effect it means that context does a bit more: creating the
>>> pdf file (already most is done anyway in mkiv), dealing with font
>>> embedding, handling image inclusion, etc. For sure there can be issues
>>> with that but it has run on my machine already for quite a while.
>>>
>>> - It is hard to be conclusive about performance but for instance the
>>> luatex manual processes a bit faster with lmtx as does the test suite. A
>>> gain in performance on very demanding documents is also observed by Alan
>>> and Thomas. Normally one can expect a similar performance. However, the
>>> memory footprint could be a bit smaller.
>>>
>>> - The current somewhat hybrid codebase of context will stepwise be
>>> adapted so that at some point we can start experimenting with some
>>> pending ideas. (Which is why i sometimes answer "later this year".)
>>
>> Where can I find the C sources for the luametatex engine?
> nowhere ... as i mentioned these will become part of the context 
> distribution around the ctx meeting (when we also have the compile 
> infrastructure ready)

Hm.  But luatex is released under GPLv2 and I reckon luametatex is based on
luatex, i.e. it is a derived work which means that you legally *have* to
publish the source.

> 
> what we offer now is an experimental test release
> 
> 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] lmtx

2019-04-02 Thread Henri Menke


On 2/04/19 10:05 PM, Hans Hagen wrote:
> Hi,
> 
> So, for those who hesitate to check out lmtx, here is some information.
> 
> - In order to achieve long term stability context will use a lean and 
> mean variant of luatex (although for now context will keep running on 
> luatex too; i might drop support for luajittex). Eventually the source 
> code will be part of the context distribution so that one can always 
> compile a binary that matches an archived context version.
> 
> - This version also permits us to experiment (even very extreme) without 
> interupting the parent program luatex, which is now used by other macro 
> packages too and therefore needs to be frozen in functionality. Some 
> features might trickle back into luatex eventually (unless it breaks 
> compatibility).
> 
> - As a direct effect it means that context does a bit more: creating the 
> pdf file (already most is done anyway in mkiv), dealing with font 
> embedding, handling image inclusion, etc. For sure there can be issues 
> with that but it has run on my machine already for quite a while.
> 
> - It is hard to be conclusive about performance but for instance the 
> luatex manual processes a bit faster with lmtx as does the test suite. A 
> gain in performance on very demanding documents is also observed by Alan 
> and Thomas. Normally one can expect a similar performance. However, the 
> memory footprint could be a bit smaller.
> 
> - The current somewhat hybrid codebase of context will stepwise be 
> adapted so that at some point we can start experimenting with some 
> pending ideas. (Which is why i sometimes answer "later this year".)

Where can I find the C sources for the luametatex engine?

> 
> Anyway, it might not look like it, but it is a conceptual change in how 
> context evolves.
> 
> 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
> ___
> 

___
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] Spurious space in \startnarrower

2019-03-31 Thread Henri Menke
On 1/04/19 9:22 AM, Hans Hagen wrote:
> On 3/31/2019 10:13 PM, Henri Menke wrote:
>> I see that the patch has been applied in current, but could you please also
>> apply it in beta (which is what I and probably most others use daily)?
> some time next week we continue with betas as curren tis now frozen for 
> tex live (there is also 'latest' which is always alpha, beta or current 
> depending on what is most recent

That's good to know.  Maybe that should be the default for first-setup.sh.
Currently it runs mtx-update.lua with --context=beta.

Anyway, I switched to latest now.

Thanks, Henri

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

___
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] Spurious space in \startnarrower

2019-03-31 Thread Henri Menke
I see that the patch has been applied in current, but could you please also
apply it in beta (which is what I and probably most others use daily)?

Cheers, Henri

On 6/03/19 12:12 PM, Henri Menke wrote:
> Patch for the core file is attached.
> 
> Cheers, Henri
> 

___
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] Can't use MetaFun with mplib anymore

2019-03-14 Thread Henri Menke
On 3/14/19 8:49 PM, Hans Hagen wrote:
> On 3/14/2019 5:56 AM, Henri Menke wrote:
>>
>> Dear list,
>>
>> Something has changed in MetaFun and it can no longer be used in plain
>> LuaTeX,
>> with neither of
>>
>>  luatex test.tex
>>  mtxrun --script plain test.tex
>>
>> This is the error:
>>
>>  >> LUATEXFUNCTIONALITY
>>  >> "mp.print(LUATEXFUNCTIONALITY)"
>>  ! Equation cannot be performed (numeric=string).
> 
> hm, that can be
> 
> mp.print(LUATEXFUNCTIONALITY or 0)
> 
> but ... i'm surprised you can use metafun in plain at all ... i never
> test that and to be honest am not too motivated to support mpiv code in
> generic either .. better use

Until TeX Live 2018, MetaFun worked in plain (at least the subset I'm
using).  It would be a shame if the support would end.  I also think
that there are quite a number of users.  The number of posts on TeX
Stack Exchange mentioning luamplib with metafun is not negligible.
https://tex.stackexchange.com/search?q=mplibsetformat

I (and probably a lot of other people) would really appreciate if you
could apply Luigi's fix, so we can continue do enjoy MetaFun, even
outside ConTeXt.

Cheers, Henri

> 
> \startMPpage
> \stopMPpage
> 
> with context and then include the pdf
> 
> Hans
> 
>> MWE is below, as always.
>>
>> Cheers, Henri
>>
>> ---
>>
>> \directlua{
>> local mpkpse = kpse.new(arg[0], "mpost")
>>
>> local function finder(name, mode, ftype)
>>  if mode == "w" then
>>  return name
>>  else
>>  return mpkpse:find_file(name,ftype)
>>  end
>> end
>>
>> local mpx = mplib.new {
>>  find_file = finder
>> }
>> local ret = mpx:execute[[
>> boolean mplib ; mplib := true ;
>> input metafun.mp ;
>> ]]
>>
>> print(ret.log)
>> }
>> \bye
>>
>> ___
>>
>> 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
___


[NTG-context] Can't use MetaFun with mplib anymore

2019-03-13 Thread Henri Menke

Dear list,

Something has changed in MetaFun and it can no longer be used in plain LuaTeX,
with neither of

luatex test.tex
mtxrun --script plain test.tex

This is the error:

>> LUATEXFUNCTIONALITY
>> "mp.print(LUATEXFUNCTIONALITY)"
! Equation cannot be performed (numeric=string).

MWE is below, as always.

Cheers, Henri

---

\directlua{
local mpkpse = kpse.new(arg[0], "mpost")

local function finder(name, mode, ftype)
if mode == "w" then
return name
else
return mpkpse:find_file(name,ftype)
end
end

local mpx = mplib.new {
find_file = finder
}
local ret = mpx:execute[[
boolean mplib ; mplib := true ;
input metafun.mp ;
]]

print(ret.log)
}
\bye

___
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] Empty \margintext causes Lua error

2019-03-06 Thread Henri Menke
Dear list,

MWE:

\starttext
\margintext{}
\stoptext

Error:

...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:736: table index is 
nil

Please fix.
Cheers, Henri

___
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] Spurious space in \startnarrower

2019-03-05 Thread Henri Menke
Patch for the core file is attached.

Cheers, Henri
diff --git a/tex/context/base/mkiv/spac-hor.mkiv b/tex/context/base/mkiv/spac-hor.mkiv
index 32b7f06fb..24c7c7893 100644
--- a/tex/context/base/mkiv/spac-hor.mkiv
+++ b/tex/context/base/mkiv/spac-hor.mkiv
@@ -717,7 +717,7 @@
\global\s_spac_narrower_left  \zeropoint
\global\s_spac_narrower_right \zeropoint
\global\s_spac_narrower_middle\zeropoint
-   \edef\askednarrower{#1}
+   \edef\askednarrower{#1}%
\ifx\askednarrower\v!reverse
  \ifconditional\s_spac_narrower_last_swap
\leftskip \s_spac_narrower_right_last
___
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] TeX Live 2019: attempt to call a nil value (upvalue 'isfile')

2019-02-28 Thread Henri Menke
Hm, it looks like the macro code hasn't been updated from 2018 yet, because
after fixing isfile it crashes when trying to load the old pdfe library.

Cheers, Henri

On 1/03/19 12:14 PM, Henri Menke wrote:
> Dear list,
> 
> I just installed TeX Live 2019 pretest and running context --make fails with
> 
> error in callback: 
> ...xlive/2019/texmf-dist/tex/context/base/mkiv/luat-cod.lua:194: attempt to 
> call a nil value (upvalue 'isfile')
> 
> This can easily be fixed by replacing in luat-cod.lua
> 
> local isfile = lfs.isfile
> 
> with
> 
> local isfile = function(file) return lfs.attributes(file,"mode") == 
> "file" end
> 
> This should probably be fixed before the release.
> 
> Cheers, Henri
> 

___
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] TeX Live 2019: attempt to call a nil value (upvalue 'isfile')

2019-02-28 Thread Henri Menke
Dear list,

I just installed TeX Live 2019 pretest and running context --make fails with

error in callback: 
...xlive/2019/texmf-dist/tex/context/base/mkiv/luat-cod.lua:194: attempt to 
call a nil value (upvalue 'isfile')

This can easily be fixed by replacing in luat-cod.lua

local isfile = lfs.isfile

with

local isfile = function(file) return lfs.attributes(file,"mode") == "file" 
end

This should probably be fixed before the release.

Cheers, Henri

___
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] horizontal headalternatives ignore indentnext

2019-02-27 Thread Henri Menke
Dear list,

If I choose the headalternative to be of horizontal type, e.g. “text”, the head
placement will ignore the indentnext option.  This can be traced back to the
\strc_rendering_stop_placement macro where there is a check

   \ifconditional\headisdisplay
 \useindentnextparameter\headparameter
   \else
 \ignoreparskip
 \noindentation % recently added, was a bug
   \fi

If the headalternative is vertical, \headdisplay is true, if it is horizontal,
\headdisplay is false.  It is easy to see that indentnext is not treated on
equal footing for these two, in fact, indentation is generally ignored for
horizontal headalternatives.  Commenting out \noindentation at least gives
indentation in the following paragraph but that is not a proper solution.

Below you can find a MWE with the fix from above applied.  Try commenting in
and out the \noindentation and see what happens to the second paragraph after
the heading.

Cheers, Henri

---

\unprotect

\def\strc_rendering_stop_placement
  {\n_strc_rendering_hang_lines\zerocount
   \ifconditional\headisdisplay
 \strc_rendering_initialize_line_hang
 % kind of special, we want to snap heads also according to local specs 
local
 \setbox\b_strc_rendering_head\hbox
   
{\hskip\dimexpr\d_strc_rendering_local_leftoffset+\headparameter\c!margin\relax
\box\b_strc_rendering_head
\getheadsyncs % a latelua why not in the box
}%
 \ifgridsnapping
   \applygridmethod
 {\headparameter\c!grid}%
 {\ifconditional\headisdisplay

\strc_rendering_initialize_style_and_color_display\c!textstyle\c!textcolor
  \fi}%
 {\box\b_strc_rendering_head}
 \else
   \box\b_strc_rendering_head
 \fi
 \flushnotes % new, not really needed
 \endgraf
 \ifvmode
   \ifnum\n_strc_rendering_hang_lines>\zerocount
 
\dorecurse\n_strc_rendering_hang_lines{\nointerlineskip\dosomebreak\nobreak\strut\endgraf}%
 to be checked
   \fi
   \nointerlineskip
   \dosomebreak\nobreak
 \fi
%  \getheadsyncs % a latelua why not in the box
   \else
 % somehow this goes ok even when we push in the margin probably because we 
gobble pars
 % in the process of collecting index entries etc
 \strut
 \flushnotes % new, here since we're in par mode
 \unhbox\b_strc_rendering_head
 \getheadsyncs % a latelua
 \ifconditional\headissomewhere
   \strc_sectioning_stay_on_this_line % test case: alternative=margintext 
and \startparagraph ..
 \else
  
%\hskip\headnumberdistance\s!plus\headnumberdistance\s!minus.25\dimexpr\headnumberdistance\relax
   \hskip\headtextdistance\relax
   \strc_sectioning_inject_continuous_signal
 \fi
   \fi
   \ifconditional\headisdisplay
 \ifvmode
   \ifgridsnapping % important, font related depth, see comment
 \prevdepth\strutdp
   \else
 \prevdepth\d_strc_rendering_local_depth
   \fi
 \fi
   \fi
   \synctexpopline
   \egroup
   \egroup
   \ifconditional\headisdisplay
 \useindentnextparameter\headparameter
   \else
 \ignoreparskip
 % \noindentation % recently added, was a bug
   \fi}

\protect

\setupindenting[yes,big]
\setuphead[section][alternative=text,indentnext=yes]
\starttext
\section{Introduction}
\input knuth
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


  1   2   3   4   5   >