Re: [NTG-context] m-graph label

2022-07-21 Thread John Kitzmiller via ntg-context
> On Sat, 16 Jul 2022 13:21:06 -0400
> John Kitzmiller via ntg-context  wrote:
>
> > The horizontal axis label of mwe below has 0.0 (showing tenths; pdf
> > attached; filename is mwe.tex).
> >
> > I expected it to show -1, 0, 1, 2, 3, (integers only). Can this be
> > formatted?
> >
> > % -1 1
> > % 0 1
> > % 0 2
> > % 1 1
> > % 2 1
> > % 2 2
> > % 2 3
> > % 2 4
> > % 3 1
> > % 3 2
> >
> > \usemodule[m-graph]
> > \startMPpage[instance=graph, offset=5mm]
> > labeloffset:=3mm;
> > draw begingraph(8cm,4cm);
> >   setrange(-1.5,0.5,3.5,5);
> >   picture symbol ;
> >   symbol := image(draw fullcircle scaled 5mm withcolor red;);
> >   gdata("mwe.tex", v,
> >   clearxy;
> > glabel(symbol,v1,v2) ;
> >);
> > frame.bot shifted(0,-2mm) ;
> > autogrid(otick.bot,) shifted(0,-2mm);
> > endgraph;
> > \stopMPpage
> >
> > Thanks! John
>


> On Wed, Jul 20, 2022 at 9:48 AM Alan  wrote:
> % Autoform   is the format string used by autogrid
> % Autoform_X, Autoform_Y if defined, are used instead
>
> string Autoform ; Autoform = "%g";
>
> % string Autoform_X ; Autoform_X := "@.0e" ;
> % string Autoform_Y ; Autoform_Y := "@.0e" ;


Thanks Alan. I see those lines in the module listing, but could you provide
some guidance on usage? Can the (re)formatting be done from my input file,
or do I need to modify mp-grap.mpiv, or some other way?

(Apologies for double-dipping, but usage direction for the least-squares
fit extension in m-graph would be a gift.)
___
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] the system not working on Linux 32 with Context-lmtx

2022-07-21 Thread Hans Hagen via ntg-context

On 7/20/2022 3:31 PM, Jan Mikkelsen via ntg-context wrote:

Hi,

I had/have a very similar problem on FreeBSD with TeXLive 2021, with the same 
context.lua not found message, which I posted about a while ago.

I “resolved” it by setting TEXMF to point to my texmf-dist directory, in my 
case /usr/local/share/texmf-dist. It would be nice for it to work without 
setting TEXMF.

Without setting TEXMF, running "mtxrun —generate” guesses a little differently, 
then attempts to scan all of /usr, and then fails when parts have no read permission.

I suspect it is working when you are in /usr/share/texmf-dist because the 
“collapsepath” function in mtxrun is collapsing “/../..” from /usr/bin to “.” 
instead of “/“. (Which seems like a bug, but I’m not sure.)

If I run “TEXMF=/usr/local/share/texmf-dist context file.tex” things run 
correctly, and a ~/.texlive2021 directory is created. Running 
“TEXMF=/usr/local/shared/texmf-dist mtxrun —generate” runs without error but 
also doesn’t generate a ~/.texlive2021 directory.

The real problem seems to be that mtxrun doesn’t deal well with the filesystem 
layout case of “/top-level/bin/mtxrun” and “/top-level/share/texmf-dist”.

you should not run/mix lmtx with texlive

- we use luametatex as runner for both luametatex and luatex runs
- mtxrun.lua and context.lua are both in the bin path (as usual)
- mtxrun.exe and context.exe are symlinks to luametatex.exe

that is the same for all platforms but in tex live on windows there is 
some small stub (i'm bot even sure what nowadays) that starts luatex in 
texlue mode  and then loads mtrun.lua; on unix it is supposed to shebang 
(therefore there mxrun.lua is just mtxrun).


no shebanging in lmtx: as said, just a symlink to the bin that then 
picks up mtxrun.lua : all operating systmes treated equal.


So, mixing these approaches in unlikelty to work unless one makes sure 
that before installing lmtx first all traces of mtxrun and context in 
the bin paths are gone ... even then I'm not sure but others who mix 
might know.


(btw, why not keep lmtx separate from your texlive installation)

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
___


Re: [NTG-context] formula reference link undefined

2022-07-21 Thread Hans Hagen via ntg-context

On 7/21/2022 8:42 PM, Pablo Rodriguez via ntg-context wrote:


I guess there has been no newer release since Hans anonunced that.


Indeed, for personal reasons no change yet to upload ... will happen one 
of these days (Mikael and I also need to check some things first).


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
___


Re: [NTG-context] formula reference link undefined

2022-07-21 Thread Pablo Rodriguez via ntg-context
On 7/21/22 19:48, Alan via ntg-context wrote:
> On Fri, 15 Jul 2022 09:10:07 +0200
> Hans Hagen via ntg-context  wrote:
>
>> there will be an update as soon as the mac intel bins are generated
>
> (still broken)

Sorry, Alan, but I get from
https://lmtx.pragma-ade.nl/install-lmtx/texmf-context.zip:

  Last-Modified: Wed, 06 Jul 2022 20:03:53 GMT

I guess there has been no newer release since Hans anonunced that.

I hope it helps,

Pablo
___
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] formula reference link undefined

2022-07-21 Thread Alan via ntg-context
On Thu, 21 Jul 2022 10:40:01 -0600
Alan via ntg-context  wrote:

> undefined link location
> MWE:
> 
> \setupinteraction [state=start]
> 
> \starttext
> 
> \placeformula [eq]
> \startformula
>  x = 0
> \stopformula
> 
> \page [yes]
> 
> \in{formula} [eq]
> 
> \stoptext

I see, already reported as "Interaction broken for formulas in LMTX"

On Fri, 15 Jul 2022 09:10:07 +0200
Hans Hagen via ntg-context  wrote:

> there will be an update as soon as the mac intel bins are generated

(still broken)
___
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] Metafun hexagons aren't hexagons

2022-07-21 Thread Alan via ntg-context
On Thu, 21 Jul 2022 18:51:23 +0200
Hans Hagen via ntg-context  wrote:

> On 7/21/2022 5:56 AM, Alan via ntg-context wrote:
> > On Wed, 20 Jul 2022 15:26:53 -0600
> > Max Chernoff via ntg-context  wrote:
> > 
> >> The recently added Metafun hexagons seem to be producing octagons
> >> instead:
> >>
> >> \startMPpage
> >> fill fullhexagon scaled 100;
> >> draw unithexagon scaled 50 withcolor white;
> >> \stopMPpage
> > 
> > Of course, for an MP circle is defined by 8 points.
> > 
> > draw textext(decimal length unitcircle) ;
> i'll change it to octagon (was only used for some envelope tracing 
> experiment)

\startMPcode
fullhexagon := for i=0 upto 5 : .5dir(60i) -- endfor cycle ;
unithexagon := fullhexagon shifted (.5,.5) ;

draw fullhexagon scaled 1cm ;
draw unithexagon scaled 1cm withcolor red ;
draw unitcircle  scaled 1cm withcolor red ;
draw fullcircle  scaled 1cm ;
\stopMPcode
___
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] Metafun hexagons aren't hexagons

2022-07-21 Thread Hans Hagen via ntg-context

On 7/21/2022 5:56 AM, Alan via ntg-context wrote:

On Wed, 20 Jul 2022 15:26:53 -0600
Max Chernoff via ntg-context  wrote:


The recently added Metafun hexagons seem to be producing octagons
instead:

\startMPpage
fill fullhexagon scaled 100;
draw unithexagon scaled 50 withcolor white;
\stopMPpage


Of course, for an MP circle is defined by 8 points.

draw textext(decimal length unitcircle) ;
i'll change it to octagon (was only used for some envelope tracing 
experiment)



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


[NTG-context] formula reference link undefined

2022-07-21 Thread Alan via ntg-context
undefined link location
MWE:

\setupinteraction [state=start]

\starttext

\placeformula [eq]
\startformula
 x = 0
\stopformula

\page [yes]

\in{formula} [eq]

\stoptext
___
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] How to switch off the numbering of a float in a CLDocument?

2022-07-21 Thread Taco Hoekwater via ntg-context


> On 21 Jul 2022, at 13:18, Willi Egger via ntg-context  
> wrote:
> 
> Hraban thank you for your answer.
> 
> I tried diffrent approaches in the meantime, however I am unable to get it 
> working.
> 
> What is wrong with this code? — The code woks a for the context.framedtext()
> 
> \setupexternalfigures[location={local,default}]
> 
> \startluacode
> 
>   function Foto_page() --thirddata
> 
>  context.startplacefigure({number="",textstyle="red",title="A Test"})
>context.externalfigure("{cow.pdf}",{width="0.5\\textwidth"}) 

It is subtle, but you need:

   context.externalfigure({“cow.pdf"},{width="0.5\\textwidth"}) 

A “lua table” becomes [] stuff, a “lua string” becomes {} stuff. Your original 
resulted in

  \externalfigure{{cow.pdf}}[width={0.5\textwidth}]

Best wishes,
Taco

PS \enabletrackers[context.*]


>  --context.framedtext(
>   --  {frame="on",style="\\bfd"},
>   --  "{This is a test}")
>  context.stopplacefigure()
>   end
>   
> \stopluacode
> 
> \define\Test{\ctxlua{Foto_page()}}
> 
> \starttext
>   \strut
>   \Test
> \stoptext
> 
> KR
> Willi
> 
>> On 18 Jul 2022, at 20:56, Henning Hraban Ramm via ntg-context 
>>  wrote:
>> 
>> Am 18.07.22 um 20:31 schrieb Willi Egger via ntg-context:
>>> Hi all,
>>> I wanted to place a figure in a cld. The example in the cld manual does not 
>>> reveal how to influence bahavior except for the caption.
>>> context.placefigure(
>>> “caption”,
>>>   function() context.externalfigure({i}, { width = "\\textwidth" } ) end )
>>> Can anybody enlighten me?
>> 
>> Just use
>> 
>> context.startplacefigure({ option = "some", otheroption = "thing" })
>> ...
>> context.stopplacefigure()
>> 
>> Hraban
>> 
>> ___
>> 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
> ___

— 
Taco Hoekwater  E: t...@bittext.nl
genderfluid (all pronouns)



___
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] no greyscales in MetaFun any more?

2022-07-21 Thread Alan via ntg-context
On Sun, 17 Jul 2022 23:46:36 +0200
Hans Hagen via ntg-context  wrote:

> On 7/17/2022 9:52 PM, Henning Hraban Ramm via ntg-context wrote:
> > Hi Hans et al.,
> > 
> > all my greys are black:
> > 
> > % MWE:
> > \startMPpage
> > fill unitsquare scaled 10mm withcolor .5;
> > \stopMPpage
> > 
> > % real life example:
> > \startMPpage
> > % grayscale squares
> > for s=5 step 5 until 95:
> >    numeric c; c := s/100;
> >    fill unitsquare scaled 5mm shifted (0,(s-5)*mm) withcolor c;
> >    label.lft(100-s, (0, (s-2.5)*mm));
> > endfor;
> > \stopMPpage
> > 
> > This used to work with previous LMTX versions.
> fixed in next upload

Is this related?
(regression: uniqueMPgraphic drops color)


\startuniqueMPgraphic{red}
draw textext("red?") withcolor red ;
\stopuniqueMPgraphic

\starttext

\startMPcode
draw textext("red!") withcolor red ;
\stopMPcode

\uniqueMPgraphic{red}

\stoptext





Alan
___
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] overfull lines

2022-07-21 Thread Steffen Wolfrum via ntg-context
Hi,

the command \version[temporary] shows an overfullrule when lines are set 
overfull.

How does this work also in footnotes?

MWE:

\setuppapersize[A10]

\overfullrule5\points
%\version[temporary]

\starttext

\showframe

XX\footnote{xxx}

\stoptext


Steffen
___
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] Bug in startalign

2022-07-21 Thread Stefan Haller via ntg-context
Hi!

I (presumably) found a bug in the recent math changes of the latest
upload. If a cell of the startalign environment is empty, something
internally to the macro seems to be breaking.

Minimal example:

\starttext

\startformula
  \startalign
\NC   \NC a \NR
\NC b \NC c \NR
  \stopalign
\stopformula

\stoptext

Error: 
> tex error > tex error on line 5 in file ./test.tex: Missing number, treated 
> as zero
> 
> \23C>1
> 
> \math_next_in_eqalign \math_left_of_eqalign \mathbeginclass \csname 
> \??mathendclass \the \numexpr \c_math_eqalign_column -\plusone \relax 
> \endcsname
> \startforceddisplaymath \everycr \emptytoks
> 
> a
> 

Filling the empty cell with e.g. "d" makes it work. Using "\strut" or
"\quad" or similar also leads to the same error.

Best regards,
Stefan Haller
___
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] How to switch off the numbering of a float in a CLDocument?

2022-07-21 Thread Willi Egger via ntg-context
Hraban thank you for your answer.

I tried diffrent approaches in the meantime, however I am unable to get it 
working.

What is wrong with this code? — The code woks a for the context.framedtext()

\setupexternalfigures[location={local,default}]

\startluacode

function Foto_page() --thirddata

  context.startplacefigure({number="",textstyle="red",title="A Test"})
context.externalfigure("{cow.pdf}",{width="0.5\\textwidth"}) 
  --context.framedtext(
--  {frame="on",style="\\bfd"},
--  "{This is a test}")
  context.stopplacefigure()
end

\stopluacode

\define\Test{\ctxlua{Foto_page()}}

\starttext
\strut
\Test
\stoptext

KR
Willi

> On 18 Jul 2022, at 20:56, Henning Hraban Ramm via ntg-context 
>  wrote:
> 
> Am 18.07.22 um 20:31 schrieb Willi Egger via ntg-context:
>> Hi all,
>> I wanted to place a figure in a cld. The example in the cld manual does not 
>> reveal how to influence bahavior except for the caption.
>> context.placefigure(
>> “caption”,
>>function() context.externalfigure({i}, { width = "\\textwidth" } ) end )
>> Can anybody enlighten me?
> 
> Just use
> 
> context.startplacefigure({ option = "some", otheroption = "thing" })
> ...
> context.stopplacefigure()
> 
> Hraban
> 
> ___
> 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] If a Font Has Ligature Glyphs But No Feature?

2022-07-21 Thread Hans Hagen via ntg-context

On 7/20/2022 9:40 PM, Bruce Horrocks via ntg-context wrote:




On 20 Jul 2022, at 05:31, Michael Urban via ntg-context  
wrote:

Aside from purchasing a real font product from Linotype at enormous expense and 
hoping it is better equipped, is there a way to coerce ConTeXt into using the 
ligature glyphs for fi and fl?


Yes - I had to do the same for a font called Venetian 301 for which I found 
these 4 files:

FilenameName as it appears to MacOS
--
Venetian301BT-Roman.otf Venetian 301 Regular
Venetian301BT-Italic.otfVenetian 301 Italic
Venetian301BT-Bold.otf  Venetian 301 Bold
venetian-301-demi-bt.ttfVenetian Dm BT Demi

They each had the fi and fl ligatures, but at different character positions 
depending on which file, and they weren't recognised by default. So I used the 
following code to add them (and add en and em dash substitution as well).

%%  start
\startluacode
 fonts.handlers.otf.addfeature {
 name = "v1", -- these character substitutions will be applied to 
venetian-301-demi-bt
 type = "ligature",
 data = {
 [0xF001] = { "f", "i" },
 [0xF002] = { "f", "l" },
 }
 }
 fonts.handlers.otf.addfeature {
 name = "v2", -- these character substitutions will be applied to 
Venetian301BT
 type = "ligature",
 data = {
 [0xFB01] = { "f", "i" },
 [0xFB02] = { "f", "l" },
 }
 }
 fonts.handlers.otf.addfeature {
 name = "v3", -- these character substitutions will be applied to both
 type = "ligature",
 data = {
 [0x2013] = { "-", "-" },  -- en dash
 [0x2014] = { "-", "-", "-" }, -- em dash
 }
 }
\stopluacode
\definefontfeature [venetian-301-demi-ligatures] [v1=yes,v3=yes]
\definefontfeature [venetian-301-BT-ligatures]   [v2=yes,v3=yes]

\starttypescript [serif] [myBookFont]
   \definefontsynonym [Serif]   [file:venetian-301-demi-bt] 
[features=venetian-301-demi-ligatures]
   \definefontsynonym [SerifBold]   [file:Venetian301BT-Bold]   
[features=venetian-301-BT-ligatures]
   \definefontsynonym [SerifItalic] [file:Venetian301BT-Italic] 
[features=venetian-301-BT-ligatures]
\stoptypescript
%%  end

Note that the names v1, v2 and v3 are entirely arbitrary. Also, the 
\starttypescript section sets the font features to be just those I've defined - 
potentially losing whatever 'default' would provide. But since the font doesn't 
seem to have a lot of features in the first place I've so far not noticed any 
problems. I'm sure a real expert could tell you how to retain 'default' and add 
the ligatures, if needed.

just name them 'liga' and default will then do them


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