[NTG-context] Re: How to use fonts without typescripts?

2024-05-15 Thread Henri Menke via ntg-context
On Wed, 2024-05-15 at 20:03 +0530, Shiv Shankar Dayal wrote:
> Hi,
> 
> Defining typescripts to use a font is very painful. How can I use a
> font
> without using a typescript?

Use \definefontfamily which is essentially the successor of the old
simplefonts module.

https://wiki.contextgarden.net/Command/definefontfamily

Cheers, Henri

> 
> _
> __
> If your question is of interest to others as well, please add an
> entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl /
> https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> _
> __

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: LuaMetaTeX code

2024-01-19 Thread Henri Menke via ntg-context
On Fri, 2024-01-19 at 13:56 +0530, Shiv Shankar Dayal wrote:
> Dear Hans,
> 
> I saw the C code of LuaMetaTeX and I saw a lot of gotos which is not
> good
> coding practice. These potions of code which have goto should be
> refactored.

https://xkcd.com/292/

> I am a C programmer, but I know very little of TeX. If you can point
> me
> towards where should I start for TeX(perhaps TeX Book or TeX for the
> Impatient), I can help with refactoring of code to make is more
> efficient/easier.
> 
> _
> __
> If your question is of interest to others as well, please add an
> entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl /
> https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> _
> __

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Triaging tikz error: Cannot parse this coordinate

2023-08-09 Thread Henri Menke via ntg-context
On 8/8/23 20:57, Hans Hagen wrote:
> On 8/8/2023 7:43 PM, Hans Hagen wrote:
>> On 8/8/2023 6:13 PM, Xavier B. wrote:
>>> After some time, I could write a minimal example with tikz with
>>> strange error: Cannot parse this coordinate.
>>>
>>> Can someone help me to find the bug?
>>>
>>> I attach the file and the log.
>>>
>>> Help very appreciate
>>> I run
>>   \starttikzpicture
>>     \foreach \p in {(6,2)}
>>     {
>>     \tracingall
>>   \startscope[shift={\p}]
>>  \draw[color=green!60, thick] (0,0) -- (1,1);
>>   \stopscope
>>     }
>>    \stoptikzpicture
>>
>> looks like some parsing issue, are you sure that you can assign \p to
>> shift this way?
> ok, i found it but i'm not going to make it custom to fix tikz
> 
> you need to use this:
> 
>  \normalexpanded{\noexpand\startscope[shift={\p}]}
> 
> instead of
> 
>   \startscope[shift={\p}]
> 
> this can be automated with (maybe we need a m-fixz module for that)
> 
> % fix
> 
> \appendtoks
>     \let\normaltikzstartscope\startscope
>     \def\startscope[#1]%
>   {\normalexpanded
>  {\noexpand\normaltikzstartscope[#1]}}%
> \to \everyinsidetikzpicture
> 
> % end of fix
> 
> but for that you need to use the attached module so that we hook it in
> aftert tikz sets itself up
> 
> the fix you can put in your style or in a cont-loc.mkxl in a local tree

This is likely going to break all kinds of stuff, because not everything
in \startscope[...] can always be expanded. Also the brackets are
optional in the original definition of \startscope, so a \dosingleempty
would at least be in order:

\appendtoks
\let\normaltikzstartscope\startscope
\def\dostartscope[#1]%
  {\normalexpanded
 {\noexpand\normaltikzstartscope[#1]}}%
\def\startscope{\dosingleempty\dostartscope}%
\to \everyinsidetikzpicture


In fact, pgfkeys has a handler for expanding keys before doing
assignment to work around exactly these situations:

\startscope[shift/.expanded={\p}]

No redefinition needed.

We could also do \edef or \romannumeral expansion in the shift key in
TikZ, but I'm not sure whether that would break someone's code.

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 / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

Re: [NTG-context] protected macro vs protected luacall

2023-01-27 Thread Henri Menke via ntg-context
On Fri, 2023-01-27 at 11:01 +0100, Hans Hagen via ntg-context wrote:
> On 1/27/2023 10:35 AM, Henri Menke via ntg-context wrote:
> 
> > Thanks, this is indeed the workaround that I currently use.
> > However,
> > the downside is that this has to tokenize the contents of
> > \directlua
> > every time (and is therefore susceptible to surrounding \catcode
> > shenanigans) and it expands in at minimum two steps, whereas a
> > luacall
> > always expands in a single step. But I guess that's what I will
> > have to
> > live with.
> on my 2018 laptop, with
> 
>function FoO() end
> 
> this
> 
>\directlua{FoO()}}
> 
> takes 0.014 seconds so probably the least of your worries
> compared 
> to other macro and lua magic

True, but then there is still the problem with the number of
expansions. With a nested \directlua I always need at least two steps
to get the result from Lua.


\directlua{
function TestCmd()
  tex.print("\string\\numexpr 17\string\\relax")
end
lua.get_functions_table()[999] = TestCmd
}
\let\:\expandafter % I'm lazy
\tt
\directlua{token.set_lua("test", 999)}
\:\def\:\x\:{\test}\meaning\x % macro:->\numexpr 17\relax

\protected\def\test{\directlua{TestCmd()}}
\:\def\:\x\:{\test}\meaning\x\par % macro:->\directlua {TestCmd()}
\:\:\:\def\:\:\:\x\:\:\:{\test}\meaning\x % macro:->\numexpr 17\relax

\bye


How much do you think would break if protected luacall were treated
like protected macros after \the in the engine?

That would probably need an extra branch in the switch(cur_cmd) in
scan_something_internal. Currently protected luacall just goes to the
default branch (You can't use ...).

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 / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> _
> __

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] protected macro vs protected luacall

2023-01-27 Thread Henri Menke via ntg-context
On Fri, 2023-01-27 at 10:30 +0100, Hans Hagen via ntg-context wrote:
> On 1/27/2023 10:13 AM, Henri Menke via ntg-context wrote:
> > On Thu, 2023-01-26 at 23:07 +0100, Hans Hagen via ntg-context
> > wrote:
> > > On 1/26/2023 9:33 PM, Henri Menke via ntg-context wrote:
> > > > \directlua{
> > > > userdata = userdata or {}
> > > > function userdata.test()
> > > >   tex.print("\string\\numexpr 17\string\\relax")
> > > > end
> > > > }
> > > > 
> > > > \tt
> > > > \protected\def\test{\directlua{userdata.test()}}
> > > > \meaning\test\par
> > > > \edef\x{\test}\meaning\x\par
> > > > \the\test
> > > > 
> > > > \directlua{
> > > > local t = lua.get_functions_table()
> > > > t[\string#t + 1] = userdata.test
> > > > token.set_lua("test", userdata.test, \string#t,
> > > > "protected")
> > > > }
> > > > \meaning\test\par
> > > > \edef\x{\test}\meaning\x\par
> > > > \the\test
> > > from the code it looks like we're talking plain luatex ...
> > > 
> > > \the is very selective and doesn't work for all primitives or
> > > macros
> > > 
> > > compare it to \number which accepts any number representation
> > > following
> > > it while \the doesn't work ok 123
> > > 
> > > that said, your set_lua is wrong and passes a function as well as
> > > an
> > > index
> > > 
> > > \directlua{
> > >  lua.get_functions_table()[999] = function()
> > >tex.print("\string\\numexpr 17\string\\relax")
> > >  end
> > >  token.set_lua("test", 999)
> > > }
> > > 
> > > \the\test % needs the \numexpr
> > > 
> > > \number \test % doesn't
> > > 
> > > \count0 \test % needs the \numexpr
> > > 
> > > \count0=\test % doesn't
> > > 
> > > etc
> > 
> > Thanks for pointing out my mistake. Your example works fine but now
> > the
> > luacall is no longer protected and will therefore fully expand in
> > \edef. So do I understand this correctly that there is no way to
> > make
> > the second \the\test work?
> > 
> > \directlua{
> >  lua.get_functions_table()[999] = function()
> >tex.pri
> > nt("\string\\numexpr 17\string\\relax")
> >  end
> > }
> > 
> > \tt
> > \directlua{token.set_lua("test", 999)}
> > \meaning\test\par % expandable luacall 999
> > \edef\x{\test}\meaning\x\par % macro:->\numexpr 17\relax
> > \the\test % 17
> > 
> > \directlua{token.set_lua("test", 999, "protected")}
> > \meaning\test\par % luacall 999
> > \edef\x{\test}\meaning\x\par % macro:->\test
> > \the\test % ! You can't use `luacall 999' after \the.
> > 
> > \bye
> you can do
> 
> \directlua{
> function TestCmd()
>   tex.print("\string\\numexpr 17\string\\relax")
> end
> }
> 
> \protected\def\test{\directlua{TestCmd()}}
> 
> or, more efficient:
> 
> \directlua{
> function TestCmd()
>   tex.print("17")
> end
> }
> 
> \protected\def\test{\numexpr\directlua{TestCmd()}\relax}

Thanks, this is indeed the workaround that I currently use. However,
the downside is that this has to tokenize the contents of \directlua
every time (and is therefore susceptible to surrounding \catcode
shenanigans) and it expands in at minimum two steps, whereas a luacall
always expands in a single step. But I guess that's what I will have to
live with.

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 / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> _
> __

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] protected macro vs protected luacall

2023-01-27 Thread Henri Menke via ntg-context
On Thu, 2023-01-26 at 23:07 +0100, Hans Hagen via ntg-context wrote:
> On 1/26/2023 9:33 PM, Henri Menke via ntg-context wrote:
> > \directlua{
> >userdata = userdata or {}
> >function userdata.test()
> >  tex.print("\string\\numexpr 17\string\\relax")
> >end
> > }
> > 
> > \tt
> > \protected\def\test{\directlua{userdata.test()}}
> > \meaning\test\par
> > \edef\x{\test}\meaning\x\par
> > \the\test
> > 
> > \directlua{
> >local t = lua.get_functions_table()
> >t[\string#t + 1] = userdata.test
> >token.set_lua("test", userdata.test, \string#t, "protected")
> > }
> > \meaning\test\par
> > \edef\x{\test}\meaning\x\par
> > \the\test
> from the code it looks like we're talking plain luatex ...
> 
> \the is very selective and doesn't work for all primitives or macros
> 
> compare it to \number which accepts any number representation
> following 
> it while \the doesn't work ok 123
> 
> that said, your set_lua is wrong and passes a function as well as an
> index
> 
> \directlua{
> lua.get_functions_table()[999] = function()
>   tex.print("\string\\numexpr 17\string\\relax")
> end
> token.set_lua("test", 999)
> }
> 
> \the\test % needs the \numexpr
> 
> \number \test % doesn't
> 
> \count0 \test % needs the \numexpr
> 
> \count0=\test % doesn't
> 
> etc

Thanks for pointing out my mistake. Your example works fine but now the
luacall is no longer protected and will therefore fully expand in
\edef. So do I understand this correctly that there is no way to make
the second \the\test work?


\directlua{
lua.get_functions_table()[999] = function()
  tex.pri
nt("\string\\numexpr 17\string\\relax")
end
}

\tt
\directlua{token.set_lua("test", 999)}
\meaning\test\par % expandable luacall 999
\edef\x{\test}\meaning\x\par % macro:->\numexpr 17\relax
\the\test % 17

\directlua{token.set_lua("test", 999, "protected")}
\meaning\test\par % luacall 999
\edef\x{\test}\meaning\x\par % macro:->\test
\the\test % ! You can't use `luacall 999' after \the.

\bye


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 / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> _
> __

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] protected macro vs protected luacall

2023-01-26 Thread Henri Menke via ntg-context
Dear list,

I have noticed a somewhat strange difference between protected macros
and protected luacalls, namely that the latter cannot be expanded by
\the.  In the example below I define a Lua function that prints
\numexpr 17\relax to the token stream and I call it once from a
protected TeX macro wrapping \directlua and once from a protected
luacall registered with token.set_lua.


\directlua{
  userdata = userdata or {}
  function userdata.test()
tex.print("\string\\numexpr 17\string\\relax")
  end
}

\tt
\protected\def\test{\directlua{userdata.test()}}
\meaning\test\par
\edef\x{\test}\meaning\x\par
\the\test

\directlua{
  local t = lua.get_functions_table()
  t[\string#t + 1] = userdata.test
  token.set_lua("test", userdata.test, \string#t, "protected")
}
\meaning\test\par
\edef\x{\test}\meaning\x\par
\the\test

\bye


However, the second \the\test fails with the following error:


! You can't use `luacall 0' after \the.
l.21 \the\test


Is this asymmetry between luacalls and regular macros intended? Is
there a workaround where I can have a luacall that doesn't expand
inside of \edef but still expands after \the?

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] pgfplots module wrecks in latest

2023-01-16 Thread Henri Menke via ntg-context
On Mon, 2023-01-16 at 11:56 -0500, Aditya Mahajan wrote:
> 
> On Mon, 16 Jan 2023, Hans Hagen via ntg-context wrote:
> 
> > just load tikz first so that the right loader helpers are there
> > 
> > \usemodule[tikz]
> > \usemodule[pgfplots]
> > 
> > \starttext
> > Hello
> > \stoptext
> > 
> > seems to work here
> 
> I did a fresh install of context and downloaded the latest version of
> pgf/tikz and pgfplots from ctan. Now, something is wrong with tikz:
> 
> \usemodule[tikz]
> 
> \starttext
> Hello
> \stoptext
> 
> gives the attached log file. Not sure what changed on the tikz end. 

That's most likely due to

https://github.com/pgf-tikz/pgf/issues/1062
https://github.com/pgf-tikz/pgf/pull/1073

but this MWE

\catcode`\@=11

\begingroup
  \lccode`\~=`\"
  \lowercase{\endgroup
\def\pgfmath@catcodes{%
  \catcode`\==12 %
  \catcode`\,=12 %
  \catcode`\|=12 %
  \catcode`\&=12 %
  \let~\pgfmath@char@quote
}}%

{\pgfmath@catcodes "}

\bye

works in Knuth TeX, so it's likely not our fault.

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Containerized ConTeXt

2022-12-14 Thread Henri Menke via ntg-context
The Island of TeX builds Docker images for ConTeXt weekly.

https://gitlab.com/islandoftex/images/context

registry.gitlab.com/islandoftex/images/context:lmtx

Cheers, Henri

On Tue, 2022-12-13 at 20:56 -0800, Thangalin via ntg-context wrote:
> Hi again,
> 
> I've added the start of a podman container for invoking ConTeXt that
> may be of interest:
> 
> https://github.com/DaveJarvis/keenwrite/tree/main/container
> 
> The Containerfile sets up ConTeXt to work with my themes:
> 
> https://github.com/DaveJarvis/keenwrite-themes
> 
> The manage.sh shell script is a wrapper around the podman command to
> help build, save, and load the container, as well as connect and run
> commands. It's a work-in-progress.
> 
> My goal is to simplify the setup and configuration of ConTeXt as well
> as make the instructions "cross platform" owing to containerization.
> From there, I want to call out to the container from KeenWrite to
> typeset PDF documents using one of the themes. Further, I'd like to
> have KeenWrite download and install ConTeXt automatically using
> podman. I believe this will make it easier for people to generate
> high-quality PDFs from (R) Markdown documents because they'd only
> have
> to download KeenWrite, then ask KeenWrite to download/configure
> ConTeXt automatically, in a cross-platform fashion.
> 
> Thoughts? Suggestions for improvement?
> _
> __
> If your question is of interest to others as well, please add an
> entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> _
> __

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Microtipography

2022-05-25 Thread Henri Menke via ntg-context
On Wed, 2022-05-25 at 15:51 +0200, Tommaso Gordini via ntg-context
wrote:
> Hello list,
> 
> here and there on the Net there are slightly different ways to
> activate the
> microtypography functionality in a ConTeXt document.
> 
>  My question is: what is the most correct and clean way to do it?

I do not claim that this is the cleanest way. Probably it's better to
define a separate font feature for microtypography rather than
overwriting the default set, but this definitely works:

   \definefontfeature[default][default]
 [protrusion=quality,
  expansion=quality]
   
   \setupbodyfont[modern] % or whatever
   
   \setupalign[hz,hanging]

Unfortunately the global alignment settings do not propagate into
certain structures. For example itemizations, captions, and
bibliographies just reset it and need special treatment:

   \setupitemize[each][align={hz,hanging}]
   \setupbtxlist[align={hz,hanging,tolerant}]
   \setupcaption[figure][align={justified,hz,hanging}]

I think captions are not justified by default, so that might or might
not matter to you. Bibliographies are usually full or names and
academic words that do not hyphenate well, so adding tolerant relaxes
that a little bit.

Cheers, Henri

> 
> Thanks in advance
> Tommaso
> _
> __
> 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] Syntax highlighting using LMTX

2021-12-02 Thread Henri Menke via ntg-context
On Thu, 2021-12-02 at 12:07 -0500, Aditya Mahajan via ntg-context
wrote:
> On Thu, 2 Dec 2021, Thangalin via ntg-context wrote:
> 
> > Hi all,
> > 
> > There are a few technical hurdles with using the t-vim module in
> > LMTX.
> > First, users need to install the module using externally defined
> > shell
> > scripts. Second, it's awkward to communicate to users how to install
> > it,
> > especially for Windows users. Third, it likely requires installing
> > vim, as
> > a separate step. Fourth, making general-purpose XML setups that
> > optionally
> > rely on syntax highlighting when it is an optional install is a
> > little
> > laborious.
> > 
> > If installing a module was as easy as "install.sh --module=t-vim"
> > then that
> > would leap over most hurdles. 
> 
> You can always install manually as follows:
> 
> cd $TEXMFHOME
> wget
> https://mirrors.ctan.org/macros/context/contrib/context-{filter,vim}.zip
> unzip context-{filter,vim}.zip
> 
> > Although there'd still be a dependency on installing vim. 
> 
> Yes, that's a trade-off that the vim module makes. But, last time I
> used Windows (some 10 years ago), installing vim was relatively easy.
> Download the install from vim's website, and click next a couple of
> times. 
> 
> > How would you go about creating a syntax highlighter for Java that
> > can work
> > with LMTX? 
> 
> I'll let others answer that. Had I known that, I wouldn't have written
> a module to do syntax highlighting :-) In the end, it also depends on
> how refined a syntax highlighter you want. Writing a simple keyword
> based highlighter is relatively easy. See, for example, scite-context-
> lexer-cpp.lua in the distribution, which is based on the CPP lexer in
> scite.

I wrote an answer here some time ago.
https://tex.stackexchange.com/questions/333508/custom-pretty-printer-in-context

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] Does the ConTeXt distro come with a PDFViewer?

2021-10-09 Thread Henri Menke via ntg-context
On Sat, 2021-10-09 at 18:47 +0200, Hans Hagen via ntg-context wrote:
> On 10/9/2021 3:07 PM, Ramkumar KB via ntg-context wrote:
> > Hello Community,
> > 
> > If my memory serves me correctly, I might have noticed (in one of the
> > presentations during the recent ConTeXt meeting) that the distro
> > comes 
> > with a PDFViewer. Is that a correct assumption?
> > 
> > I am currently using a VSCode extension for PDFViewing but it does
> > not 
> > work very reliably.
> just use an external one, normally it will update automatically (on 
> windows sumatrapdf is pretty ok, on linux i'd probably use okular 
> because mupdf has no real gui)

I know of two muPDF GUIs:

- llpp https://github.com/moosotc/llpp
- zathura https://pwmt.org/projects/zathura/

Both are fairly minimalistic, but if you only want to display pages
they do the job. Zathura also supports synctex.

> 
> 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] running tikz

2021-10-01 Thread Henri Menke via ntg-context
On Thu, 2021-09-30 at 14:52 -0400, Aditya Mahajan via ntg-context
wrote:
> On Thu, 30 Sep 2021, Henri Menke via ntg-context wrote:
> 
> > On Thu, 2021-09-30 at 11:57 +0200, Alain Delmotte via ntg-context
> > wrote:
> > > Hi!
> > > 
> > > I would like to use tikz to benefit of the package "pgf-soroban"
> > > I
> > > did write for LaTeX (after adapting it and before, later, to
> > > translate it to metapost).
> > > 
> > > I did try the sample program from the tikz manual, but I get an
> > > error
> > > saying that "t-pgf.tex" is not found; but it is in the tree of
> > > ConTeXt-lmtx.
> > > 
> > > How to make all the files in the distribution known to the
> > > compiler?
> > 
> > 
> > Note that there is currently no proper support for LMTX in
> > PGF/TikZ.
> > 
> > https://github.com/pgf-tikz/pgf/issues/990
> 
> Interesting... it seems that only a few features don't work. I
> regularly use pgfplots, and haven't noticed any compatibility issues
> in my examples.
> 
> What will be needed to add a LMTX "driver" for TikZ? Porting pgfsys-
> luatex.def to pgfsys-luametatex.def? Or is something else also
> needed?

Yes, there would have to be a pgfsys-luametatex.def and some detection
code to switch the driver appropriately but that latter part is easy.
I'm not too sure what is needed for the former though for LMTX.

When I last looked at it about a year ago it was completely unusable
with the LuaTeX driver because position tracking primitives were
removed (\pdflastxpos, \pdflastypos) and box keywords had changed
(\hbox dir TRT). Some catcode trickery in pgfplots also had stopped
working (https://github.com/pgf-tikz/pgfplots/pull/353).

As Hans mentioned in another message, the PDF resource management has
changed (if I understand it correctly), so things like shadings and
patterns would have to be adjusted.

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] running tikz

2021-09-30 Thread Henri Menke via ntg-context
On Thu, 2021-09-30 at 11:57 +0200, Alain Delmotte via ntg-context
wrote:
> Hi!
> 
> I would like to use tikz to benefit of the package "pgf-soroban" I
> did write for LaTeX (after adapting it and before, later, to
> translate it to metapost).
> 
> I did try the sample program from the tikz manual, but I get an error
> saying that "t-pgf.tex" is not found; but it is in the tree of
> ConTeXt-lmtx.
> 
> How to make all the files in the distribution known to the compiler?


Note that there is currently no proper support for LMTX in PGF/TikZ.

https://github.com/pgf-tikz/pgf/issues/990

Cheers, Henri

> 
> Thanks,
> 
> Alain
> 
> %% ConTeXt file
> 
> \usemodule[tikz]
> \starttext
> We are working on
> \starttikzpicture
> \draw (-1.5,0) -- (1.5,0);
> \draw (0,-1.5) -- (0,1.5);
> \stoptikzpicture.
> \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] Curiosity about math.random in LuaTeX

2021-08-23 Thread Henri Menke via ntg-context
On Mon, 2021-08-23 at 17:24 +0200, Hans van der Meer via ntg-context
wrote:
> I guess the underlying library calls are from Lua5.4? Then it is
> perhaps useful to know that between 5.3 and 5.4 there is mentioned a
> new implementation for math.random. Perhaps it changes the sequence of
> random values generated? Someone who knows?

https://tex.stackexchange.com/questions/468466/tikz-graphdrawing-differences-between-luatex-versions

Cheers, Henri

> 
> dr. Hans van der Meer
> 
> 
> > On 23 Aug 2021, at 17:13, Hans Hagen via ntg-context <
> > ntg-context@ntg.nl> wrote:
> > 
> > On 8/23/2021 4:46 PM, Thierry Horsin via ntg-context wrote:
> > > Hi everybody.
> > > I wonder how does math.random() work in context. I found that this
> > > subject was discussed more than ten years ago by Otared and Taco
> > > and Thomas. It is clear to me how to obtain new results upon
> > > typesetting the same file by changing the value of math.randomseed
> > > (with os.time()).
> > > If you don't change the seed, you get the same result upon each
> > > typesetting, and a seed is given in the .tuc file.
> > > For example I have this:
> > > ["randomseed"]=0x1.0741c18b8a4ep-6
> > > How do I use (and is it possible to) this value to have the same
> > > result of math.random() upon typesetting another file (with a
> > > different name) ?
> > > I could provide a same fixed seed in both files, but for some
> > > reasons I would like to re-use some previous results of
> > > math.random() for which no seed was initially given in another .tex
> > > file.
> > You have to go low level ...
> > 
> > % \ctxlua{utilities.randomizer.setseed(0x1.0741c18b8a4ep-6)}
> > % \ctxlua{utilities.randomizer.setseed(0x1.6822232009d5p-5)}
> > 
> > \setrandomseed{123}
> > 
> > \starttext
> >    test \randomnumber{1}{100}
> >    test \randomnumber{1}{100}
> >    test \randomnumber{1}{100}
> > \stoptext
> > 
> > btw, the 0x representation is lua's low level binary representation
> > of a double.
> > 
> > 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
> ___
> 


___
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] Curiosity about math.random in LuaTeX

2021-08-23 Thread Henri Menke via ntg-context
On Mon, 2021-08-23 at 16:46 +0200, Thierry Horsin via ntg-context
wrote:
> Hi everybody.
> 
> I wonder how does math.random() work in context. I found that this
> subject was discussed more than ten years ago by Otared and Taco and
> Thomas. It is clear to me how to obtain new results upon typesetting
> the same file by changing the value of math.randomseed (with
> os.time()).
> 
> If you don't change the seed, you get the same result upon each
> typesetting, and a seed is given in the .tuc file.
> 
> For example I have this:
> ["randomseed"]=0x1.0741c18b8a4ep-6
> 
> How do I use (and is it possible to) this value to have the same
> result of math.random() upon typesetting another file (with a
> different name) ?
> 
> I could provide a same fixed seed in both files, but for some reasons
> I would like to re-use some previous results of math.random() for
> which no seed was initially given in another .tex file.

You can immediately forget about that, because in the past Lua has
switched the random number generator (RNG) between releases and also
uses a different RNG depending on the operating system. In general it
is a really bad idea to depend on the exact sequence of random numbers.

As an alternative you can just pregenerate a list of random numbers and
copy that to other documents.

Cheers, Henri

> 
> Thank you
> Thierry
> _
> __
> 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] Unnecessary loading of lm-mono

2021-05-26 Thread Henri Menke
On 26/05/21, 15:14, Rik Kabel wrote:
> For a few revisions now, I have seen the following as the very first line of
> log files. It is not coming from my document. Is anybody else seeing it?
> 
>fonts   > beware: no fonts are loaded yet, using 'lm mono'
>in box
> 
> Here is an example document that generates it:
> 
>\setupbodyfont[libertinus,10pt]
>\starttext
>Hello world!
>\stoptext
> 
> It seems harmless, but it does result in loading an un-needed font.
> 
>mkiv lua stats  > loaded fonts: 4 files: lmmono10-regular.otf,
>libertinusmath-bold.otf, libertinusmath-regular.otf,
>libertinusserif-regular.otf

Looks like something is accidentally being typeset (maybe stored in a
box) before \starttext. You can reproduce this in MKIV with the
following

\writestatus{debug}{Before}
\setbox\scratchbox=\hbox{oeps}
\writestatus{debug}{After}
\starttext
Hello world!
\stoptext

and in the log you will find

debug   > Before
fonts   > beware: no fonts are loaded yet, using 'lm mono' in box
debug   > After

so it is definitely due to typesetting.

Cheers, Henri

> 
> -- 
> Rik
> 

> ___
> 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] Stack size for arguments too small in LMTX

2021-05-25 Thread Henri Menke
Dear list,

For some reason pgfplots has a \pgfkeys invocation where the argument
has more than 4000 lines. This crashes LuaMetaTeX with the message

tex error > tex error on line 4045 in file pgfplots.code.tex: TeX capacity 
exceeded, sorry [token memory size=100]

It doesn't seem to be an issue with LuaTeX, so my guess is that token
memory size is larger in LuaTeX.  Could you please increase the stack
size to make this edge case compile again?

This issue was originally reported on the pgfplots bugtracker:
https://github.com/pgf-tikz/pgfplots/issues/398

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] Running a couple of context statements in a linux bash shell heredocument?

2021-04-01 Thread Henri Menke
On Thu, 2021-04-01 at 16:23 +0200, Alexander Rosenstock wrote:
> Hi all,
>  
> is it possible running a couple of context statements as a
> heredocument integrated in a - for example linux bash - shellscript?
> Do you have any experience or idea or alternative solution?
>  

This will work, but only if file_that_does_not_exist (possibly with
additional file extensions) does not exist:

$ cat <<'EOF' | context file_that_does_not_exist
\starttext
Hello world!
\stoptext
EOF


Cheers, Henri

> If needed, I will deliver a - not yet runnable - minimal example
> here, of course ...
>  
> Thanks a lot in advance for any support!
>  
> Alexander
> _
> __
> 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] externalizing TikZ graphics

2021-01-25 Thread Henri Menke
On Mon, 2021-01-25 at 16:42 +0100, Henning Hraban Ramm wrote:
> Hi,
> 
> did anyone succeed in externalizing TikZ graphics with ConTeXt?

The external library is LaTeX-only and that unfortunately won't change because
it heavily relies on implementation detail of LaTeX's output routine.

> It’s about a project with hundreds of diagrams that (in the current state)
> clutter the main directory with cryptically-named PDFs (at least sorted by
> component name) and that on each ConTeXt run take a lot of runtime (I guess
> also the many log lines slow the process).
> 
> In 2013, Aditya said it wasn’t possible to externalize pgf/TikZ graphics as
> documented in the pgf manual, and "perhaps" it would make sense to use his
> filter module:

filter is your best bet, in my opinion.

> https://mailman.ntg.nl/pipermail/ntg-context/2013/071162.html
> 
> Did anyone try to do that? I didn’t find anything in this list’s archives.
> 
> The original pgf way is two-pass, and you’d need to call LaTeX with the
> intended graphics name as --jobname; that’s far too much of a hassle for that
> many graphics.
> 
> I generally like how the filter module works, as you can also define the name
> of every buffer, but my only experience with that is my LilyPond setup.
> 
> If nobody has better advice, I’ll try to come up with a filter setup. That
> would mean we’d avoid the tikz module, every TikZ diagram will get written to
> a buffer of configurable name, and that (with preamble setup) will get run
> through LaTeX. I read pgf had some restrictions in plain TeX mode, but perhaps
> we can also use LuaTeX in plain mode to avoid the LaTeX dependency.
> 
> Best, Hraban
> __
> _
> 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] 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
___


  1   2   3   4   5   >