Re: [NTG-context] update

2023-04-27 Thread Hans Hagen via ntg-context

On 4/27/2023 7:11 AM, Max Chernoff via ntg-context wrote:

Hi Lynx, Aditya,



New to conTeXt, have not performed a specific update prior to this.

My conTeXt installation is part of TeXlive-2023 (under Linux OS). Will
the updates to ConTeXt be handled by tlmgr ?


No. Usually, texlive updates context once a year.


This is correct in general, but this specific update *will* end up in
TL2023 due to the engine changes that Hans mentioned. It's not in TL
yet, but we're actively working on it, so it should show up within a
week or so (hopefully).
Correction: Luigi and I are still discussing how to make it work because 
there is some init order issue and we want to be sure that context (and 
its scripts) keep working. It would be sort of weird if context (where 
luatex originates) would stop working as expected. Keep in mind that 
luatex is also a lua engine. and I assume that the texlive team also has 
some tests to perform (apart from getting all platforms updated which 
for some is more work, like apple signing).


The issue (disabling socket by default) is not that pressing as socket 
has been with us for right fromn the start) and security wise there are 
plenty ways tex can mess up your system if someone wants.


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

2023-04-27 Thread Hans Hagen via ntg-context

On 4/27/2023 2:50 AM, lynx--- via ntg-context wrote:

Re: performing update(s)

New to conTeXt, have not performed a specific update prior to this.

My conTeXt installation is part of TeXlive-2023 (under Linux OS). Will 
the updates to ConTeXt be handled by tlmgr ?
Basically tex live is the yearly snapshot. I actually dont' know the 
rules for updating texlive but there are definitely updates. But as much 
relates there (like engines shared between macro packages) it can be 
that only macros get updated and not engines (also relates to multiple 
platforms) so fundamental changes to luatex as engine .. hard to predict.


But you can just install the lmtx installation alongside (it's small 
compared to tex live) and have the best of both worlds. The lmtx 
installation also has mkiv. It also comes with the fonts that match what 
we expect in context (as fonts get updated or changed).


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

2023-04-26 Thread Max Chernoff via ntg-context
Hi Lynx, Aditya,


> > New to conTeXt, have not performed a specific update prior to this. 
> > 
> > My conTeXt installation is part of TeXlive-2023 (under Linux OS). Will
> > the updates to ConTeXt be handled by tlmgr ? 
> 
> No. Usually, texlive updates context once a year. 

This is correct in general, but this specific update *will* end up in
TL2023 due to the engine changes that Hans mentioned. It's not in TL
yet, but we're actively working on it, so it should show up within a
week or so (hopefully).

Thanks,
-- Max
___
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] update

2023-04-26 Thread Aditya Mahajan via ntg-context
On Wed, 26 Apr 2023, lynx--- via ntg-context wrote:

> Re: performing update(s) 
> 
> New to conTeXt, have not performed a specific update prior to this. 
> 
> My conTeXt installation is part of TeXlive-2023 (under Linux OS). Will
> the updates to ConTeXt be handled by tlmgr ? 

No. Usually, texlive updates context once a year. 

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

2023-04-26 Thread lynx--- via ntg-context
Re: performing update(s) 

New to conTeXt, have not performed a specific update prior to this. 

My conTeXt installation is part of TeXlive-2023 (under Linux OS). Will
the updates to ConTeXt be handled by tlmgr ? 

Thanks, 

On 2023-04-26 14:55, Hans Hagen via ntg-context wrote:

> Hi,
> 
> I uploaded a new version with some new features discussed at the end of this 
> mail.
> 
> - A next version of luatex will break context (format making etc) but the 
> change is unavoidable because of other macro package demands wrt security 
> (context does that differently). The low level start up command
> has been adapted so unless you update indepdently thinsg should work ok.  Of 
> course this has no consequences for lmtx.
> 
> - I've done a bit of callback cleanup (like getting rid of some mkiv luatex 
> left-overs). It should have no effect on regular usage.
> 
> - There again a few improvements wrt math (this time dealing with accents 
> artifacts in some fonts). We check all the free math fonts for potential 
> issues and then try to fix it (read: deal with it). It's a lot of work but 
> we're getting there.
> 
> - A few reported buglets have been fixed.
> 
> - The biggest addition is however a new number model. In metapost one can now 
> use 'posit' (positfun instance) as number mode which will use (currently 32 
> bit but at some point 64 bit) posit unums. It's also bit of a playground 
> because 32 bit posits are not more accurate than 64 bit doubles. It anyhow 
> exposed some potential issues that we'll look into.
> 
> - There's also a (again currently 32 bit) posit library at the Lua end as 
> playground.
> 
> - However, 32 bit posits come in handy at the tex end because they pack 
> better accuracy in 32 bits than floats and it makes it possible to have 
> native floats, so we have:
> 
> \newfloat  (uses \floatdef, register like \dimendef is used in \newdimen)
> 
> \newposit  (uses \positdef, like \dimensiondef etc)
> 
> \floatexpr (like \numexpr)
> 
> \iffloat   (like \ifnum) (also \ifabsfloat and i'll add the others too)
> 
> Actually it adds an extra range of registers so it bumps memory usage a bit. 
> I'm considering lowering the number of registers (currently 64K per category) 
> because after all, if 64K is not enough then we can as well stick to 32K or 
> 16K (for some even less). There's always Lua for unlimited storage of 
> quantities.
> 
> So,
> 
> \newfloat\fooA
> 
> \scratchdimen=123.456pt\relax[\type{dim:} 
> \the\scratchdimen==123.456pt]\par
> \fooA=123.456\relax  [\type{pos:} \the\fooA ==123.456]  \par
> \fooA=\scratchdimen\relax[\type{pos:} \the\fooA ==123.456]  \par
> \scratchdimen=\fooA\relax[\type{dim:} 
> \the\scratchdimen==123.456pt]\par
> \scratchdimen\dimexpr\fooA+10pt\relax[\type{dim:} 
> \the\scratchdimen==133.456pt]\par
> 
> produces
> 
> [dim: 123.456pt==123.456pt]
> [pos: 123.45600128173828==123.456]
> [pos: 123.45599365234375==123.456]
> [dim: 123.456pt==123.456pt]
> [dim: 133.456pt==133.456pt]
> 
> As you can see dimens will get mapped onto floats not as integers (scaled 
> points) but in pt units. Counts stay numbers. I need to handle glue too (not 
> yet done).
> 
> In the future I might use this for fractions but there might be some rough 
> ends so for now it's experimental.
> 
> Hans
> 
> -
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl [1] | www.pragma-pod.nl [2]
> -
> ___
> 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
> ___

 

Links:
--
[1] http://www.pragma-ade.nl
[2] http://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] Idea for a shared repository.

2023-04-25 Thread Henning Hraban Ramm via ntg-context

Am 25.04.23 um 17:13 schrieb Aditya Mahajan via ntg-context:

On Tue, 25 Apr 2023, Pawel Urbanski via ntg-context wrote:


What about creating a repository called: 'templates' or 'resources' - we can
figure out the exact name later.


Why not use the wiki for such documents? For fonts, there is already a wiki 
page collecting typescripts:

https://wiki.contextgarden.net/Typescripts_examples

There are also a collection of templates which are already on the wiki:

https://wiki.contextgarden.net/Category:Sample_documents



It is not about duplicating the Context garden site but to collect code in a
place where we could gradually fix possible errors or introduce improvements.


This can be done on the wiki as well.


I agree that it makes most sense to keep examples and (font) setups in 
the wiki.


Projects with several files, like modules, should have their own (git) 
repositories. (The scripts at modules.contextgarden.net can pull 
releases directly from a repository.)


I think it’s better to have (and manage) your own account somewhere and 
link to it from the wiki than to use the “official” account for stuff 
that is not part of ConTeXt proper.


My stuff is at https://codeberg.org/fiee/; some of that would also make 
(more) sense in the wiki.


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
___


Re: [NTG-context] Kaktovik numerals

2023-04-19 Thread Hans Hagen via ntg-context

On 4/19/2023 10:45 PM, Willi Egger via ntg-context wrote:

Hello Gavin,

thank you so much for your input. — Indeed you are right. Please find attached 
the corrected version.



Willi


On 19 Apr 2023, at 20:58, Gavin via ntg-context  wrote:

Hi Willi,

What fun! I think I found a couple math items to correct.

1) The second line of the tables at the top of page 2 should be:
1000' 100, 10, 1; 8000, 400, 20, 1

2) For the year conversion: 2023 = 5x20^2 + 1x20 + 3. (Your 0 should be my 1). 
This will give a three digit Kaktovik numeral. You have 4 digit Kaktovik 
numerals for 2023, with both a 0 and a 1.
je kunt direct dat nummer converteren maar blijkbaar gaf ik de verkeerde 
volgorde uit:


\useMPlibrary[kaktovik] % de officiele manier

\definefontfeature
  [default]
  [default]
  [metapost=kaktovik]

\setupbodyfont[dejavu]

\starttext
 2023 \kaktoviknumerals{5}\kaktoviknumerals{1}\kaktoviknumerals{3}

\kaktoviknumerals{2023} % deze split dus voor je, order fixed

\stoptext


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
%D \module
%D   [   file=meta-imp-kaktovik,
%Dversion=2023.04.18,
%D  title=\METAPOST\ Graphics,
%D   subtitle=Kaktovik Numbers,
%D author=Hans Hagen,
%D   date=\currentdate,
%D  copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

%D Just a quick hack for Hraban (after a post on the mailing list).

\startMPcalculation{simplefun}

path kaktovik_glyphs[] ;

def InitializeKaktovik =

save p, d, u ;

pair p[] ; numeric d ; d := .1 ; numeric u ; u := .15 ;

  % d := getparameterdefault "mpsfont" "d" .10 ;
  % u := getparameterdefault "mpsfont" "u" .15 ;

p[0] := (0,1) ;
p[1] := (1,0) ;
p[2] := (2,1 -  d) ;
p[3] := (3,0) ;
p[4] := (4,1 - 2d) ;

p[5] := (4,1 +  u) ;
p[6] := (0,1 + 2u) ;
p[7] := (4,1 + 4u) ;

kaktovik_glyphs[0] := (1,1)  { right } .. { left } (2,1/2) { left } .. 
{ right } (3,1);

for i= 1 upto 4 :
kaktovik_glyphs[i] := p[0] for j=1 upto i : -- p[j] endfor ;
endfor ;

kaktovik_glyphs[ 5] := p[5] -- p[0] ;for i= 6 upto  9 : 
kaktovik_glyphs[i] := p[5] -- kaktovik_glyphs[i-5] ; endfor ;
kaktovik_glyphs[10] := p[6] -- kaktovik_glyphs[ 5] ; for i=11 upto 14 : 
kaktovik_glyphs[i] := p[6] -- kaktovik_glyphs[i-5] ; endfor ;
kaktovik_glyphs[15] := p[7] -- kaktovik_glyphs[10] ; for i=16 upto 19 : 
kaktovik_glyphs[i] := p[7] -- kaktovik_glyphs[i-5] ; endfor ;

enddef ;

vardef Kaktovik(expr i) =
draw image (
draw kaktovik_glyphs[i]
xscaled (10/20 -1/20)
yscaled (25/20 -2/20)
withpen (pencircle xscaled 1/20 yscaled 5/20) rotated -(2*20)
  % withpen (pencircle xscaled 1/40 yscaled 5/40) rotated -(2*20)
  % withpen (pencircle xscaled 2.5/40 yscaled 5/40) rotated -(2*20)
;
) shifted (2/20,2/20)
enddef ;

lmt_registerglyphs [
name = "kaktovik",
units= 2,
usecolor = true,
width= 2,
height   = 2,
depth= 0,
preamble = "InitializeKaktovik"
] ;

for i=0 upto 19 :
lmt_registerglyph [
category = "kaktovik",
unicode  = 119488 + i, % "0x1D2C0"
code = "Kaktovik(" & decimal i & ")"
] ;
endfor ;

\stopMPcalculation

\startluacode
interfaces.implement {
name  = "kaktoviknumerals",
arguments = "integer",
actions   = function(n)
local digits = { }
local count  = 1
while true do
digits[count] = utf.char(0x1D2C0 + (n % 20))
n = n // 20
if n == 0 then
break;
end
count = count + 1
end
table.reverse(digits)
context("%t",digits)
end
}
\stopluacode

\unprotect

\permanent\def\kaktoviknumerals#1{\clf_kaktoviknumerals\numexpr#1\relax}

\defineconversion [kaktoviknumerals] [\kaktoviknumerals]
\defineconversion [K][\kaktoviknumerals]

\definefontfeature
  [kaktovik]
  [metapost=kaktovik]

\protect

\continueifinputfile{meta-imp-kaktovik.mkxl}

\definefontfeature
  [default]
  [default]
  [metapost=kaktovik]
% [metapost={category=kaktovik,u

Re: [NTG-context] xmlsetentity on the fly?

2023-04-19 Thread Hans van der Meer via ntg-context
After some experiments I am now fairly convinced that the entities are 
substituted BEFORE the typesettting actually starts. And thus changing the 
entity on the fly will have no effect. Is there a flag that can be set in order 
to delay the substitution until the actual moment of typesetting that part of 
the input? I examined files lxml-ent.lua and lxml-tex.lua but could not find 
how to this.

dr. Hans van der Meer

> On 17 Apr 2023, at 18:11, Hans van der Meer via ntg-context 
>  wrote:
> 
> I tried 
> \directlua{xml.registerentity("DATE","NEWDATE")}
> 
> but neither does effect a change in the entity.
> 
> Why is that entry not set in the Lua-table entities? (file xml-ent.lua) has 
> as that function:
> 
> function xml.registerentity(key,value)
> entities[key] = value
> if trace_entities then
> report_xml("registering entity %a as %a",key,value)
> end
> end
> 
> 
>> On 17 Apr 2023, at 12:32, Hans van der Meer  wrote:
>> 
>> I would like to change an entity 'on the fly'. Example
>> 
>> \def\DATE{THEDATE}\expanded{\xmlsetentity{DATE}{\DATE}}
>> 
>> \startxmlsetups typ:event
>> 
>>  \def\DATE{NEWDATE}\expanded{\xmlsetentity{DATE}{\DATE}}
>> 
>> Using  within the .
>> 
>> \stopxmlsetups
>> 
>> However, using  inside an  always results in THEDATE and never 
>> in NEWDATE.
>> 
>> How can I change the value of the entity inside the xmlsetups?
>> 
> 
> dr. Hans van der Meer
> ___
> 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] Kaktovik numerals

2023-04-18 Thread Hans Hagen via ntg-context

On 4/18/2023 10:57 AM, Henning Hraban Ramm via ntg-context wrote:
I just came across this thread about the base-20 system of the Inuit 
people and the numerals invented for it in the 1990s:

https://mathstodon.xyz/@johncarlosbaez/110215432175491555

This makes simple calculations just beautiful.

interesting ... quick hack attached

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
-


meta-imp-kaktovik.pdf
Description: Adobe PDF document
%D \module
%D   [   file=meta-imp-kaktovik,
%Dversion=2023.04.18,
%D  title=\METAPOST\ Graphics,
%D   subtitle=Kaktovik Numbers,
%D author=Hans Hagen,
%D   date=\currentdate,
%D  copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

%D Just a quick hack for Hraban (after a post on the mailing list).

\startMPcalculation{simplefun}

path kaktovik_glyphs[] ;

def InitializeKaktovik =

save p, d, u ;

pair p[] ; numeric d ; d := .1 ; numeric u ; u := .15 ;

  % d := getparameterdefault "mpsfont" "d" .10 ;
  % u := getparameterdefault "mpsfont" "u" .15 ;

p[0] := (0,1) ;
p[1] := (1,0) ;
p[2] := (2,1 -  d) ;
p[3] := (3,0) ;
p[4] := (4,1 - 2d) ;

p[5] := (4,1 +  u) ;
p[6] := (0,1 + 2u) ;
p[7] := (4,1 + 4u) ;

kaktovik_glyphs[0] := (1,1)  { right } .. { left } (2,1/2) { left } .. 
{ right } (3,1);

for i= 1 upto 4 :
kaktovik_glyphs[i] := p[0] for j=1 upto i : -- p[j] endfor ;
endfor ;

kaktovik_glyphs[ 5] := p[5] -- p[0] ;for i= 6 upto  9 : 
kaktovik_glyphs[i] := p[5] -- kaktovik_glyphs[i-5] ; endfor ;
kaktovik_glyphs[10] := p[6] -- kaktovik_glyphs[ 5] ; for i=11 upto 14 : 
kaktovik_glyphs[i] := p[6] -- kaktovik_glyphs[i-5] ; endfor ;
kaktovik_glyphs[15] := p[7] -- kaktovik_glyphs[10] ; for i=16 upto 19 : 
kaktovik_glyphs[i] := p[7] -- kaktovik_glyphs[i-5] ; endfor ;

enddef ;

vardef Kaktovik(expr i) =
draw image (
draw kaktovik_glyphs[i]
xscaled (10/20 -1/20)
yscaled (25/20 -2/20)
withpen (pencircle xscaled 1/20 yscaled 5/20) rotated -(2*20)
  % withpen (pencircle xscaled 1/40 yscaled 5/40) rotated -(2*20)
  % withpen (pencircle xscaled 2.5/40 yscaled 5/40) rotated -(2*20)
;
) shifted (2/20,2/20)
enddef ;

lmt_registerglyphs [
name = "kaktovik",
units= 2,
usecolor = true,
width= 2,
height   = 2,
depth= 0,
preamble = "InitializeKaktovik"
] ;

for i=0 upto 19 :
lmt_registerglyph [
category = "kaktovik",
unicode  = 119488 + i, % "0x1D2C0"
code = "Kaktovik(" & decimal i & ")"
] ;
endfor ;

\stopMPcalculation

\startluacode
interfaces.implement {
name  = "kaktoviknumerals",
arguments = "integer",
actions   = function(n)
local digits = { }
local count  = 1
while true do
digits[count] = utf.char(0x1D2C0 + (n % 20))
n = n // 20
if n == 0 then
break;
end
count = count + 1
end
context("%t",digits)
end
}
\stopluacode

\unprotect

\permanent\def\kaktoviknumerals#1{\clf_kaktoviknumerals\numexpr#1\relax}

\defineconversion [kaktoviknumerals] [\kaktoviknumerals]
\defineconversion [K][\kaktoviknumerals]

\definefontfeature
  [kaktovik]
  [metapost=kaktovik]

\protect

\continueifinputfile{meta-imp-kaktovik.mkxl}

\definefontfeature
  [default]
  [default]
  [metapost=kaktovik]
% [metapost={category=kaktovik,u=.25,d=.20,x=}]

\setupbodyfont[dejavu]

% \nopdfcompression

\startTEXpage[offset=1ts,width=3es]

\start
\showglyphs
KAKTOVIK
\dostepwiserecurse{0}{19}{1}{\kaktoviknumerals{#1}\space }
\stop

kaktovik \start
\red\glyphxscale 700
\dostepwiserecurse{0}{19}{1}{\kaktoviknumerals{#1}\space }
\stop

\startitemize[packed,K][color=orange,stopper=]
\startitem first  \stopitem
\startitem second \stopitem
\startitem third  \stopitem
\stopitemize

KAKTOVIK \start
\red  \kaktoviknumerals{2023} --
\green\kaktoviknumerals{4}--
\blue \kaktovikn

Re: [NTG-context] Software upgrade for ntg and contextgarden server 6 April

2023-04-16 Thread Carlos via ntg-context
On Sat, Apr 15, 2023 at 10:57:15AM +0200, Hans Hagen via ntg-context wrote:
> On 4/15/2023 3:23 AM, Carlos via ntg-context wrote:
> 
> > thank you Taco, Hans, and Aditya, Mikael, et
> > 
> > Hans, I was just curious about your git strategy and wanted to ask you 
> > about something.
> 
> I have no strategy. I see it as just an offline repository and archive.

It's a strategy. It may not be the fanciest  but you wrote earlier:

>it's sort of the original git archive and our backup plan.
>   
>
>  https://github.com/contextgarden/context 

‹backup plan› has the same meaning there than a master plan (no pun
intended with git) hence the association with a strategy. 

But when I wrote ‹strategy› it was not written with the intention
to convey a message of exhaustive calculations to get or divise the
plan of plans.  NO. Rather more like what the definition says about it

a plan of action or policy designed to achieve a major or overall aim.

what is the backup plan of git as an archive but just a backup
strategy. 
> 
> The luametatex repos sort of resembles what I have on my machine but even
> then I always use intermediate 'compare before merge' steps that predate
> git. Git (or svn) is nice for seeing changes but I admit that I never
> roll-back using git. When I have to integrate something in e.g. luametatex
> that comes from git I always diff (winmerge) and "manually merge". So much
> for stragety: not that fancy.

I agree 
> 
> The context updates are assembled from a completely different dev structure
> (think also of temporary files, runtime files for manuals etc that don't
> belong in something git) and turning that modus operandi into something git
> would make my way of doing things pretty inefficient, so unless very little
> changes etc happen i won't change that.
> 

But it's good for the memory Hans. It's good for us. Studies on humans
have revealed that learning or adapting  to new methods might prove
beneficial in the long run.

> All the git magic is maintained by Mojca and occassionally we discuss how to
> move on (we have some pending install-from-git stuff but that might take a
> while before being promoted).

> 
> I'm not really interested in al the additional stuff like chats, pull
> requests, keeping track of comments in git, all these (for me useless)
> statistics. I don't want to end up in an endless 'check this or that' noose,
> so for me email and communicating (could be visual) with some involved does
> it well; more fun too.

I agree with you there. But who said anything about messages, chats, and
the interactive social gitclub as gitlab, github and its ilk have
suddenly become part of 

> 
> For some other projects git(hub|lab) is a communication method, basically an
> on-line storage.
> 
> > Did you guys ever consider having a cgit interface and hosting it.
> > 
> > A bunch of projects have done it
> > 
> > heck. Even git, which is where everything solely depends on in the end, is 
> > running it.
> > 
> > https://git.kernel.org/pub/scm/git/git.git/
> > 
> > https://git.zx2c4.com/cgit/about/
> There is not much to gain with adding yet another interface to what we have
> now. It only works if one or more people commit (no git pun intended)
> themselves long-term to it which relates to ie beging used.
> 

It's just an interface much more simpler than what the git archive
backup interface currently in use presumably undergoes. Git is sort
of big as-is and that's not even counting all its remote helpers
by which all those places depend on (gitlab, github, bitbucket),
which makes it even bigger. 

I've just seen that interface in a few projects and thought it was nice
that the devs have somehow implemented it. 



> (Keep in mind that it's all volunteer work.)
> 
> 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] Using project-local fonts

2023-04-13 Thread Rik Kabel via ntg-context


On 2023-04-13 11:28, Kalouguine Andre via ntg-context wrote:


Hi,


i'm not familiar with that approach so can't see what interferes
The most important change is that I can't update it and I can't put 
stuff in the system directory nor the user one.

So I only have access to the project folder, it has to be self-contained.
\definefontfamily [ebgaramond] [serif] [ebgaramond] 
[features=eb-garamond-normal]
Apologies, my fault, I forgot a part of my email. I don't want the c-t 
and s-t ligatures (supposed to be in `hlig`). But I do want the T-h 
ligature which is supposed to be in `dlig`. So as far as I understand, 
TeXlive comes with an old version of EB Garamond in which all of them 
are in `dlig`. Hence my question about self-contained projects with fonts.

Best regards,
Andre



Andre (and list),

EB Garamond is hopelessly broken with respect to hlig and dlig, and has 
been for quite a while.


I reported the problem 
(https://github.com/octaviopardo/EBGaramond12/issues/20) over five years 
ago, and the maintainer (if there is one) has done nothing. See also #4 
in that issues list 
(https://github.com/octaviopardo/EBGaramond12/issues/4). There are a 
couple of forks, but there is no established reference implementation 
that I can see. The Google Fonts implementation is similarly challenged, 
perhaps worse.


--
Rik

___
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] Using project-local fonts

2023-04-13 Thread Hans Hagen via ntg-context

On 4/13/2023 5:28 PM, Kalouguine Andre via ntg-context wrote:

Hi,


i'm not familiar with that approach so can't see what interferes
The most important change is that I can't update it and I can't put 
stuff in the system directory nor the user one.

So I only have access to the project folder, it has to be self-contained.
\definefontfamily [ebgaramond] [serif] [ebgaramond] 
[features=eb-garamond-normal]
Apologies, my fault, I forgot a part of my email. I don't want the c-t 
and s-t ligatures (supposed to be in `hlig`). But I do want the T-h 
ligature which is supposed to be in `dlig`. So as far as I understand, 
TeXlive comes with an old version of EB Garamond in which all of them 
are in `dlig`. Hence my question about self-contained projects with fonts.
You can put the font in the local directory but i have no clue how that 
works with your setup because in the end the font cache is used and does 
a user have a local one? YOu can maybe rename the font,. put it in the 
work directory and make a typescript that refers to that one.


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] Using project-local fonts

2023-04-13 Thread Kalouguine Andre via ntg-context
Hi,

> i'm not familiar with that approach so can't see what interferes

The most important change is that I can't update it and I can't put
stuff in the system directory nor the user one. 
So I only have access to the project folder, it has to be
self-contained. 

> \definefontfamily [ebgaramond] [serif] [ebgaramond] 
> [features=eb-garamond-normal]

Apologies, my fault, I forgot a part of my email. I don't want the c-t
and s-t ligatures (supposed to be in `hlig`). But I do want the T-h
ligature which is supposed to be in `dlig`. So as far as I understand,
TeXlive comes with an old version of EB Garamond in which all of them
are in `dlig`. Hence my question about self-contained projects with
fonts. 

Best regards,
Andre___
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] /usr/bin/env texlua no such file or directory; ~/context/tex is not a valid TEXROOT path; no file plain.tex

2023-04-11 Thread Carlos via ntg-context
On Tue, Apr 11, 2023 at 12:20:32PM +0200, Hans Hagen via ntg-context wrote:
> On 4/11/2023 12:00 PM, Carlos via ntg-context wrote:
> 
> > and belongs to TeX Live?
> 
> well, i suppose there is a non-empty copy in texlive but an empty one can go
> indeed
> 
> > > > Here we go! Back to point A where we were at before
> > > as alan pointed out: just install with the lmtx installer in a path 
> > > separate
> > > from tex live, set the path and you're done; don't try to mix texlive 
> > > with a
> > > adapted of standalone, texlive has its own context package and updates 
> > > etc;
> > > keep them separated
> > 
> > alright. That's fine. That's what I thought.
> > 
> > So copy over the mtxrun binary on texmf-linux-64/bin to context and call it 
> > a
> > day?
> as long as the five mentioned files are there (and best hand mtxrun, context
> and luametatex the same so use links) ... luametatex is the engine as well
> as stub runner (runs the luatex file in the same path with the same name and
> suffix lua)
> 

thank you for the clarification. I was going over path to make sure that
anything under /opt/texlive/2022/bin/x86_64-linux/ returns no binaries from
there 

But where is actually luametatex under the standalone sources

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

-- 
As soon as we started programming, we found to our surprise that it wasn't
as easy to get programs right as we had thought.  Debugging had to be
discovered.  I can remember the exact instant when I realized that a large
part of my life from then on was going to be spent in finding mistakes in
my own programs.
-- Maurice Wilkes, designer of EDSAC, on programming, 1949

___
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] /usr/bin/env texlua no such file or directory; ~/context/tex is not a valid TEXROOT path; no file plain.tex

2023-04-11 Thread Hans Hagen via ntg-context

On 4/11/2023 1:58 AM, Carlos via ntg-context wrote:

I'm just following some of the standalone installation instructions
as per the wiki alongside  a TeX Live installation,  but there are a
few things that don't add up or I can't seem to add them up :).

first, while I was trying to mtxrun --generate it returned

/usr/bin/env texlua no such file or directory

So I thought heck, perhaps by creating a symbolic link we'll call it
a day, but that wasn't enough, nope.


That # line will go away or change because per 2023 we assume that the 
script is run by luametatex and we're in a sort of transition



This is is circa 21st century ladies and gentlemen!


And tex survived more that 4 decades so ... it operates in an eco system 
(tds, installations) ... todays fashion is not yesterdays and tomorrows



so I thought, alright, since there seems ot be a a problem with texlua,
let's also add it to path somehow.


i'm not sure what you installed but the stand alone installer installs 
luametatex / luatex and therefore has


luametatex
mtxrun -> luametatex
context -> luametatex
mtxrun.lua
context.lua

in the same path (the links are stubs, not uncommon in the tex world 
where they are also used to launch macro packages like latex)


it can't be more portable and simple than that, is efficient and works 
ok unless one wants some different setup, and spend time on that



So with that out of the way, we'll move on to the next step and change
to a directory and try to call out mtxrun --generate again

It returns:


> ...


But this is the catch. I don't have texmfcnf.lua anymore . Not on
the TeX Live installation anyway if that might've ever materialize
as a question


maybe that was not copied? the fact that we need a configuration and 
file database is also pretty much the way a tex installation works (with 
allits resources)



If I were to invoke an mtxrun --script cache --erase
Of course and going solely by the above the part whenever it says
resolvers   | resolving | looking for regular 'texmfcnf.lua'
on given path '/home/ce/context/bin/texmf/web2c' from specification
'selfautoloc:/texmf/web2c'

wont' find it anywhere because that dir does not exist.


should be there with the installer; if one just installs the 'zip' it 
has to come from elsewhere (like texlive, where actually most lives in 
texmf-dist) and one has to copy a configuration file to there



But remember that earlier, adding bin to path was necessary to avoid
/usr/bin/env texlua no such file or directory message

But even now while trying to find plain.tex I've come to the conclusion
that it needs it or else fails altogether

The problem is that I don't have plain.tex though.

As a matter of fact the TeX Live installation I currently have,
plain tex is nowhere to be seen, heck, not even latex but only a
handful set of fmtutil fmtuitl-sys mktexfmt and updmap updmap-sys
and the whole remainder of kpathsea but then again this in practice
would not even be needed if at all.


indeed, context doesn't rely on fmtutil etc


In other words, only the TeX Live infrastructure needed which shouldn't
be a problem, right?

But itis: a problem that is.

Besides. The reason I mentioned it is only to serve reference material
, but that's it.

to recap, mtxrun looks for a texmfcnf.lua (which I don't have) and
also for a plain.tex which I don't have either, and also presumably
for a contextcnf.lua (which I have) but the script concept is not so
smart, and finishes off with a final note that says warning: no lua
configuration files found. No shit Sherlock!

Of course it can't find it, because it doesn't exist,

resolvers   | resolving | looking for fallback 'contextcnf.lua' on
given path '/home/ce/texmf/web2c' from specification 'home:texmf/web2c'

But at this point and without sugar coating it, the standalone
installation of context proves to be a chore more problematic than
waiting to install over 5gb of TeX Live alone.


hm, worked for quite a while for users; and did you try oen from

https://www.pragma-ade.com/install.htm


The only thing that the installation instructions got right from
the start was the part about running the script with all modules.

I'll probably… and eventually will try to install the whole TeX
Live. But going solely by what the current TeX Live on my machine
looks like, , with just the infrastcucture, while anything mtx was
dropped like a hot potato really, it's a predicament...


not sure what you mean here .. mtxrun was not dropped, tl 2313 just 
moved on to lmtx which is even less demanding (unless one starts moveing 
files around in the tex infrastruture and then expects stuff to keep 
working)



-- Systems programmers are the high priests of a low cult.
-- R.S. Barton


dunno, don't know any of them


-- Real computer scientists don't write code.  They occasionally
tinker with `programming systems', but those are so high level that
they hardly count (and rarely count accurately; precision is for
app

Re: [NTG-context] /usr/bin/env texlua no such file or directory; ~/context/tex is not a valid TEXROOT path; no file plain.tex

2023-04-10 Thread Carlos via ntg-context
On Mon, Apr 10, 2023 at 08:51:58PM -0400, Aditya Mahajan via ntg-context wrote:
> On Mon, 10 Apr 2023, Carlos via ntg-context wrote:
> 
> > I'm just following some of the standalone installation instructions
> > as per the wiki alongside  a TeX Live installation,  but there are a
> > few things that don't add up or I can't seem to add them up :).
> > 
> > first, while I was trying to mtxrun --generate it returned
> > 
> > /usr/bin/env texlua no such file or directory
> > 
> > So I thought heck, perhaps by creating a symbolic link we'll call it
> > a day, but that wasn't enough, nope.
> > 
> > This is is circa 21st century ladies and gentlemen!
> > 
> > so I thought, alright, since there seems ot be a a problem with texlua,
> > let's also add it to path somehow.
> 
> Did you source the `setuptex` script, which sets the correct path.
> 
> > So with that out of the way, we'll move on to the next step and change
> > to a directory and try to call out mtxrun --generate again
> > 
> > It returns:
> > 
> > mtxrun --generate resolvers   | resolving | variable 'SELFAUTOLOC'
> > set to '/home/ce/context/bin' resolvers   | resolving | variable
> 
> This appears to be the wrong mtxrun binary. You should include the PATH 
> variable listed as part of the installation. It should point to 
> `/home/ce/context/texmf-linux-64/bin` or something similar.

with texmfcnf.lua and the contextbinary from just hte TeX Live infrastructure
there is an interesting conflict with the same ol' same ol' 

anyhow

[2/2, 00:02/02:56] install: context [92021k]
running mktexlsr ...
done running mktexlsr.
running mtxrun --generate ...
done running mtxrun --generate.
running context --luatex --generate ...
done running context --luatex --generate.
running updmap-sys ...
done running updmap-sys.

then

context 

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

context --luatex --generate 

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

same as with

context --generate

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

so it's an either or. texmfcnf.lua in place mtxrun would definitely
go through but breaks context calls, while without it, a context call
is just ostracized to a

context --generate --luatex
mtx-context | redirect luametatex -> luatex: luatex --luaonly 
"/opt/texlive/2023/bin/x86_64-linux/mtxrun.lua" --generate --redirected

but that's not what I had in mind.

mtxrun --script cache --erase

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


-- 
Real Programmers think better when playing Adventure or Rogue.

___
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] /usr/bin/env texlua no such file or directory; ~/context/tex is not a valid TEXROOT path; no file plain.tex

2023-04-10 Thread Carlos via ntg-context
On Mon, Apr 10, 2023 at 08:51:58PM -0400, Aditya Mahajan via ntg-context wrote:
> On Mon, 10 Apr 2023, Carlos via ntg-context wrote:
> 
> > I'm just following some of the standalone installation instructions
> > as per the wiki alongside  a TeX Live installation,  but there are a
> > few things that don't add up or I can't seem to add them up :).
> > 
> > first, while I was trying to mtxrun --generate it returned
> > 
> > /usr/bin/env texlua no such file or directory
> > 
> > So I thought heck, perhaps by creating a symbolic link we'll call it
> > a day, but that wasn't enough, nope.
> > 
> > This is is circa 21st century ladies and gentlemen!
> > 
> > so I thought, alright, since there seems ot be a a problem with texlua,
> > let's also add it to path somehow.
> 
> Did you source the `setuptex` script, which sets the correct path.
> 
> > So with that out of the way, we'll move on to the next step and change
> > to a directory and try to call out mtxrun --generate again
> > 
> > It returns:
> > 
> > mtxrun --generate resolvers   | resolving | variable 'SELFAUTOLOC'
> > set to '/home/ce/context/bin' resolvers   | resolving | variable
> 
> This appears to be the wrong mtxrun binary. You should include the PATH 
> variable listed as part of the installation. It should point to 
> `/home/ce/context/texmf-linux-64/bin` or something similar.
> 
> Aditya


Is there any rationale not to have texmfcnf.lua alongside context.cnf
and contextcnf.lua under web2c with the current standalone
installation?  

Because on TeX Live infrastructure alone, I have my doubts that that file
will be somehow generated magically. would it?

Of course I could probably scrounge it off somewhere but it's also
besides the point 

On the current installation of a standalone relying solely on what
tewmf/webc holds is… well.  




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

-- 
Time sharing: The use of many people by the computer.

___
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] /usr/bin/env texlua no such file or directory; ~/context/tex is not a valid TEXROOT path; no file plain.tex

2023-04-10 Thread Carlos via ntg-context
On Mon, Apr 10, 2023 at 08:51:58PM -0400, Aditya Mahajan via ntg-context wrote:
> On Mon, 10 Apr 2023, Carlos via ntg-context wrote:
> 
> > I'm just following some of the standalone installation instructions
> > as per the wiki alongside  a TeX Live installation,  but there are a
> > few things that don't add up or I can't seem to add them up :).
> > 
> > first, while I was trying to mtxrun --generate it returned
> > 
> > /usr/bin/env texlua no such file or directory
> > 
> > So I thought heck, perhaps by creating a symbolic link we'll call it
> > a day, but that wasn't enough, nope.
> > 
> > This is is circa 21st century ladies and gentlemen!
> > 
> > so I thought, alright, since there seems ot be a a problem with texlua,
> > let's also add it to path somehow.
> 
> Did you source the `setuptex` script, which sets the correct path.

Of course I sourced it and complains about plain.tex
> 
> > So with that out of the way, we'll move on to the next step and change
> > to a directory and try to call out mtxrun --generate again
> > 
> > It returns:
> > 
> > mtxrun --generate resolvers   | resolving | variable 'SELFAUTOLOC'
> > set to '/home/ce/context/bin' resolvers   | resolving | variable
> 
> This appears to be the wrong mtxrun binary. You should include the PATH 
> variable listed as part of the installation. It should point to 
> `/home/ce/context/texmf-linux-64/bin` or something similar.

binaries. 

Let's start over for the simple reason that texmfcnf.lua does not exist.

Not through a TeX Live infrastructure only installation anyway. 

let's run ./install --modules=all and it rightly reports that 

mtx-update  | updating mtxrun for linux-64: rsync -tgo --chmod=a+x
'/home/ce/context-install/tex/texmf-context/scripts/context/lua/mtxrun.lua'
'/home/ce/context-install/tex/texmf-linux-64/bin/mtxrun'
mtx-update  | run, rsync -tgo --chmod=a+x 
'/home/ce/context-install/tex/texmf-context/scripts/context/lua/mtxrun.lua'
'/home/ce/context-install/tex/texmf-linux-64/bin/mtxrun'
rsync: [Receiver] change_dir#3 
"/home/ce/context-install/tex/texmf-linux-64/bin" failed: No such file or 
directory (2)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(827) 
[Receiver=3.2.7]
resolvers   | tds | no 'texmf-linux-64' under tree 
'/home/ce/context-install/tex'

Now. Let's add the directories, correct? 

If you were to look at the following 

resolvers   | resolving | using configuration specification 
'home:texmf/web2c;{selfautoloc:,selfautoloc:/share/texmf-local/web2c,selfautoloc:/share/texmf-dist/web2c,selfautoloc:/share/texmf/web2c,selfautoloc:/texmf-local/web2c,selfautoloc:/texmf-dist/web2c,selfautoloc:/texmf/web2c,selfautodir:,selfautodir:/share/texmf-local/web2c,selfautodir:/share/texmf-dist/web2c,selfautodir:/share/texmf/web2c,selfautodir:/texmf-local/web2c,selfautodir:/texmf-dist/web2c,selfautodir:/texmf/web2c,$SELFAUTOGRANDPARENT/texmf-local/web2c,selfautoparent:,selfautoparent:/share/texmf-local/web2c,selfautoparent:/share/texmf-dist/web2c,selfautoparent:/share/texmf/web2c,selfautoparent:/texmf-local/web2c,selfautoparent:/texmf-dist/web2c,selfautoparent:/texmf/web2c}'
resolvers   | resolving |
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path
'/home/ce/texmf/web2c' from specification 'home:texmf/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on weird path
'/home/ce/context-install/tex/texmf-linux-64/bin' from specification 
'selfautoloc:'


you'd notice that is looking over and over for a texmfcnf.lua 

But where is my texmfcnf.lua? Would you know? :) Because I don't. The
only instance of a texmfcnf.lua dates back to a prepackaged
installation that is no longer there anyway

it points to a prepackaged texlive which I'm not using and not planning
to. 

and what I have under TEXMFHOME which doesn't amount to much anyway , or what's
important for the current issue is 

amiga-pl.tcx  cp8bit.tcx   il2-t1.tcxmktex.opt tcvn-t5.tcx
cp1250cs.tcx  empty.tcxkam-cs.tcxmktexdir  texmf.cnf
cp1250pl.tcx  fmtutil-hdr.cnf  kam-t1.tcxmktexdir.opt  updmap-hdr.cfg
cp1250t1.tcx  fmtutil.cnf  macce-pl.tcx  mktexnam  updmap.cfg
cp227.tcx il1-t1.tcx   macce-t1.tcx  mktexnam.opt  viscii-t5.tcx
cp852-cs.tcx  il2-cs.tcx   maz-pl.tcxmktexupd
cp852-pl.tcx  il2-pl.tcx   mktex.cnf natural.tcx

which as you fully know, it doesn't help

What is TeX Live infrastructure doing is the question

It's besides the point to call out ./tlmgr install context here because
 mtx is no longer there anyway 

for what's worth

Welcome to TeX Live!

See ../texlive/2023/index.html for links to documentation.
The TeX Live web site (https://tug.org/texlive/) contains any updates and 
corrections. TeX Live is a joint project 

Re: [NTG-context] /usr/bin/env texlua no such file or directory; ~/context/tex is not a valid TEXROOT path; no file plain.tex

2023-04-10 Thread Aditya Mahajan via ntg-context
On Mon, 10 Apr 2023, Carlos via ntg-context wrote:

> I'm just following some of the standalone installation instructions
> as per the wiki alongside  a TeX Live installation,  but there are a
> few things that don't add up or I can't seem to add them up :).
> 
> first, while I was trying to mtxrun --generate it returned
> 
> /usr/bin/env texlua no such file or directory
> 
> So I thought heck, perhaps by creating a symbolic link we'll call it
> a day, but that wasn't enough, nope.
> 
> This is is circa 21st century ladies and gentlemen!
> 
> so I thought, alright, since there seems ot be a a problem with texlua,
> let's also add it to path somehow.

Did you source the `setuptex` script, which sets the correct path.

> So with that out of the way, we'll move on to the next step and change
> to a directory and try to call out mtxrun --generate again
> 
> It returns:
> 
> mtxrun --generate resolvers   | resolving | variable 'SELFAUTOLOC'
> set to '/home/ce/context/bin' resolvers   | resolving | variable

This appears to be the wrong mtxrun binary. You should include the PATH 
variable listed as part of the installation. It should point to 
`/home/ce/context/texmf-linux-64/bin` or something similar.

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
___


[NTG-context] /usr/bin/env texlua no such file or directory; ~/context/tex is not a valid TEXROOT path; no file plain.tex

2023-04-10 Thread Carlos via ntg-context
/texmf-dist/web2c' from specification
'selfautoloc:/texmf-dist/web2c' resolvers   | resolving
| looking for fallback 'contextcnf.lua' on given path
'/home/ce/context/bin/texmf/web2c' from specification
'selfautoloc:/texmf/web2c' resolvers   | resolving | looking
for fallback 'contextcnf.lua' on weird path '/home/ce/context'
from specification 'selfautodir:' resolvers   | resolving
| looking for fallback 'contextcnf.lua' on given path
'/home/ce/context/share/texmf-local/web2c' from specification
'selfautodir:/share/texmf-local/web2c' resolvers   |
resolving | looking for fallback 'contextcnf.lua' on given path
'/home/ce/context/share/texmf-dist/web2c' from specification
'selfautodir:/share/texmf-dist/web2c' resolvers   | resolving |
looking for fallback 'contextcnf.lua' on given path
'/home/ce/context/share/texmf/web2c' from specification
'selfautodir:/share/texmf/web2c' resolvers   | resolving
| looking for fallback 'contextcnf.lua' on given path
'/home/ce/context/texmf-local/web2c' from specification
'selfautodir:/texmf-local/web2c' resolvers   | resolving
| looking for fallback 'contextcnf.lua' on given path
'/home/ce/context/texmf-dist/web2c' from specification
'selfautodir:/texmf-dist/web2c' resolvers   |
resolving | looking for fallback 'contextcnf.lua' on given
path '/home/ce/context/texmf/web2c' from specification
'selfautodir:/texmf/web2c' resolvers   | resolving
| looking for fallback 'contextcnf.lua' on given path
'$SELFAUTOGRANDPARENT/texmf-local/web2c' from specification
'$SELFAUTOGRANDPARENT/texmf-local/web2c' resolvers   |
resolving | looking for fallback 'contextcnf.lua' on weird path
'/home/ce' from specification 'selfautoparent:' resolvers   |
resolving | looking for fallback 'contextcnf.lua' on given
path '/home/ce/share/texmf-local/web2c' from specification
'selfautoparent:/share/texmf-local/web2c' resolvers   |
resolving | looking for fallback 'contextcnf.lua' on given
path '/home/ce/share/texmf-dist/web2c' from specification
'selfautoparent:/share/texmf-dist/web2c' resolvers   |
resolving | looking for fallback 'contextcnf.lua' on given
path '/home/ce/share/texmf/web2c' from specification
'selfautoparent:/share/texmf/web2c' resolvers   |
resolving | looking for fallback 'contextcnf.lua' on given
path '/home/ce/texmf-local/web2c' from specification
'selfautoparent:/texmf-local/web2c' resolvers   |
resolving | looking for fallback 'contextcnf.lua' on
given path '/home/ce/texmf-dist/web2c' from specification
'selfautoparent:/texmf-dist/web2c' resolvers   |
resolving | looking for fallback 'contextcnf.lua' on given path
'/home/ce/texmf/web2c' from specification 'selfautoparent:/texmf/web2c'
resolvers   | resolving | resolvers   | resolving | warning:
no lua configuration files found resolvers   | resolving | no
texmf paths are defined (using TEXMF) resolvers   | resolving |
mtxrun  | the resolver databases are not present or outdated
resolvers   | resolving | using suffix based filetype 'scripts'
resolvers   | resolving | remembering file 'mtx-cache.lua' using
hash 'lua::mtx-cache.lua' resolvers   | resolving | using suffix
based filetype 'scripts' resolvers   | resolving | remembering file
'mtx-caches.lua' using hash 'lua::mtx-caches.lua' resolvers   |
resolving | remembered file 'mtx-cache.lua' resolvers   | resolving
| using suffix based filetype 'scripts' resolvers   | resolving |
remembering file 'mtx-t-cache.lua' using hash 'lua::mtx-t-cache.lua'
resolvers   | resolving | using suffix based filetype 'scripts'
resolvers   | resolving | remembering file 'mtx-t-caches.lua'
using hash 'lua::mtx-t-caches.lua' resolvers   | resolving |
remembered file 'mtx-t-cache.lua' resolvers   | resolving |
using suffix based filetype 'scripts' resolvers   | resolving
| remembering file 'cache.lua' using hash 'lua::cache.lua' mtxrun
| unknown script 'cache.lua' or 'mtx-cache.lua'


Of course and going solely by the above the part whenever it says
resolvers   | resolving | looking for regular 'texmfcnf.lua'
on given path '/home/ce/context/bin/texmf/web2c' from specification
'selfautoloc:/texmf/web2c'

wont' find it anywhere because that dir does not exist.

But remember that earlier, adding bin to path was necessary to avoid
/usr/bin/env texlua no such file or directory message 

But even now while trying to find plain.tex I've come to the conclusion
that it needs it or else fails altogether

The problem is that I don't have plain.tex though.

As a matter of fact the TeX Live installation I currently have,
plain tex is nowhere to be seen, heck, not even latex but only a
handful set of fmtutil fmtuitl-sys mktexfmt and updmap updmap-sys
and the whole remainder of kpathsea but then again this in practice
would not even be needed if at all.

In other words, only the TeX Live infrastructure needed which shouldn't
be a problem, right?

But itis: a problem that is.

Besides

[NTG-context] Trial to use LibreOffice Calc (+ python) to build ConTeXt customized environnements files

2023-04-10 Thread Garulfo via ntg-context
 [features=default]
  \definefontsynonym [HandwritingItalic]   [name:snellroundhandltstdscr]   [features=default]
  \definefontsynonym [HandwritingBold] [name:snellroundhandltstdscr]   [features=default]
  \definefontsynonym [HandwritingBoldItalic]   [name:snellroundhandltstdscr]   [features=default]
\stoptypescript

\starttypescript [calligraphy] [myfont]
\setups[font:fallback:calligraphy]
  \definefontsynonym [Calligraphy] [name:sabonltstdroman]  [features=default]
  \definefontsynonym [CalligraphyItalic]   [name:sabonltstditalic] [features=default]
  \definefontsynonym [CalligraphyBold] [name:sabonltstdbold]   [features=default]
  \definefontsynonym [CalligraphyBoldItalic]   [name:sabonltstdbolditalic] [features=default]
\stoptypescript

\starttypescript[myfont]
\definetypeface [myfont] [rm] [serif]   [myfont] [default]
\definetypeface [myfont] [ss] [sans][myfont] [default]
\definetypeface [myfont] [tt] [mono][myfont] [default]
\definetypeface [myfont] [mm] [math][myfont] [default]
\definetypeface [myfont] [hm] [handwriting] [myfont] [default]
\definetypeface [myfont] [cg] [calligraphy] [myfont] [default]
\stoptypescript



\setuptolerance[strict]
\setupalign[hz]
\setupalign[hanging]
\setupalign[lesshyphenated]
\setupalign[verytolerant]
\setupalign[stretch]
\setupwhitespace [big] 
\setupbodyfont[myfont,ss,12pt]



\definecolor [MaCouleur0] [h=340.0,s=0.85,v=0.1,a=1.0,t=1.0]
\definecolor [MaCouleur1] [h=210.0,s=0.9,v=0.5,a=1.0,t=1.0]
\definecolor [MaCouleur2] [h=210.0,s=0.8,v=0.6,a=1.0,t=1.0]
\definecolor [MaCouleur3] [h=210.0,s=0.7,v=0.7,a=1.0,t=1.0]
\definecolor [MaCouleur4] [h=210.0,s=0.6,v=0.8,a=1.0,t=1.0]
\definecolor [MaCouleur5] [h=210.0,s=0.5,v=0.9,a=1.0,t=1.0]
\definecolor [MaCouleur6] [h=30.0,s=0.9,v=0.5,a=1.0,t=1.0]
\definecolor [MaCouleur7] [h=30.0,s=0.8,v=0.6,a=1.0,t=1.0]
\definecolor [MaCouleur8] [h=30.0,s=0.7,v=0.7,a=1.0,t=1.0]
\definecolor [MaCouleur9] [h=30.0,s=0.6,v=0.8,a=1.0,t=1.0]
\definecolor [MaCouleur10][h=30.0,s=0.5,v=0.9,a=1.0,t=1.0]
\definecolor [MaCouleur11][h=120.0,s=0.3,v=1.0,a=1.0,t=1.0]
\definecolor [MaCouleur12][h=200.0,s=0.3,v=1.0,a=1.0,t=1.0]
\definecolor [MaCouleur13][h=200.0,s=0.9,v=0.9,a=1.0,t=1.0]
\definecolor [MaCouleur14][h=120.0,s=0.9,v=0.9,a=1.0,t=1.0]
\definecolor [MaCouleur15][h=200.0,s=0.9,v=0.9,a=1.0,t=1.0]


\definecolor [CouleurPrincipale]  [MaCouleur0]
\definecolor [Couleur1]   [MaCouleur1]
\definecolor [Couleur2]   [MaCouleur2]
\definecolor [Couleur3]   [MaCouleur3]
\definecolor [Couleur4]   [MaCouleur4]
\definecolor [Couleur5]   [MaCouleur5]
\definecolor [CouleurContraste1]  [MaCouleur6]
\definecolor [CouleurContraste2]  [MaCouleur7]
\definecolor [CouleurContraste3]  [MaCouleur8]
\definecolor [CouleurContraste4]  [MaCouleur9]
\definecolor [CouleurContraste5]  [MaCouleur10]
\definecolor [CouleurFond1]   [MaCouleur11]
\definecolor [CouleurFond2]   [MaCouleur12]
\definecolor [CouleurURL] [MaCouleur13]
\definecolor [CouleurType][MaCouleur14]
\definecolor [CouleurLiens]   [MaCouleur15]


\setupcolors
  [
   textcolor=CouleurPrincipale,
  ]




\setuphead
  [part]
  [
   style=\bfd,
   textcolor=Couleur1,
   numbercolor=CouleurContraste1,
   bodypartlabel=Part,
   placehead=yes,
   page=left,
   header=high,
   align=flushleft,
   alternative=middle,
   before={\strut\godown[4cm]},
  ]

\setuphead
  [chapter]
  [
   style=\bfc,
   textcolor=Couleur2,
   numbercolor=CouleurContraste2,
   sectionsegments=1:2,
   page=yes,
   align=flushleft,
  ]

\setuphead
  [title]
  [
  ]

\setuphead
  [section]
  [
   style=\bfb,
   textcolor=Couleur3,
   numbercolor=CouleurContraste3,
   sectionsegments=1:3,
   page=yes,
   align=flushleft,
  ]

\setuphead
  [subject]
  [
  ]

\setuphead
  [subsection]
  [
   style=\bfa,
   textcolor=Couleur4,
   numbercolor=CouleurContraste4,
   sectionsegments=1:4,
   align=flushleft,
  ]

\setuphead
  [subsubject]
  [
  ]

\setuphead
  [subsubsection]
  [
   style=\bf,
   textcolor=Couleur5,
   numbercolor=CouleurContraste5,
   sectionsegments=1:5,
   align=flushleft,
  ]

\setuphead
  [subsubsubject]
  [
  ]

\setuphead
  [subsubsubsection]
  [
   textcolor=CouleurContraste3,
   numbercolor=CouleurContraste3,
  ]



___
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] PDF 2.0 standard documents now free

2023-04-09 Thread Ulrike Fischer via ntg-context
Am Thu, 6 Apr 2023 09:02:10 +0200 schrieb Hans Hagen via
ntg-context:

>> You can put in arbitrary data and then download.
>> I don’t think it will become any more free.

>> 
>> indeed, but then:  why don't  we put them on the wiki site / another 
>> free site ?
> 
>> Any legal restrictions ?

Yes, the copy I got has in the footer 

Sold by the PDF Association to Ulrike Fischer  | April 5, 2023 |
Single user only, copying and networking prohibited.

I wouldn't distribute it for the same reason I wouldn't distribute
pdf copies of the TeXbook.

> What happens when the sponsors withdraw? 

What should happen? I bought a copy at a very good price (0€) and
now own it. If the sponsorship ends and the price goes up to 200 CHF
again nothing changes for me. 

> What is there are updates (unlikely anyway).

Amendments to ISO document typically have to be buyed too, e.g.
amendment 1 (which is part of the bundled offered by pdfa) normally
costs 17 CHF. 

Personally I think that the PDF Association made a very good job
here (they worked hard on it), I'm quite grateful for it and I hope
that there will more of these offers (personally I would like to get
pdf/A-4 and the upcomming pdf/UA-2).


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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] Problems with building texlive/context from its sources

2023-04-03 Thread Jakob Jakobson via ntg-context

Dear developers,

I am/become one of the texlive mantainers on flathub a more or less 
recent and new approach for establishing a linux packaging format. The 
flatpak packages are usually build from source and so is the texlive 
package. You can find it under 
https://github.com/flathub/org.freedesktop.Sdk.Extension.texlive/tree/branch/22.08 
. The file 
https://github.com/flathub/org.freedesktop.Sdk.Extension.texlive/blob/branch/22.08/org.freedesktop.Sdk.Extension.texlive.yml 
is the build manifest which lists the files and commands/additional 
steps needed for the build process.
The current build of texlive works well with pdflatex/lualatex/xelatex 
but with the context part I have some problems. Therefore, I would 
appreciate any help with the following questions:
1) Is context included in the texlive-20230313* tarballs or do I have to 
download it in an extra step?
2) If context is included in the texlive-20230313* tarballs, do I have 
to additionally download luametatex or is luametatex a part of context?
3) If luametatex is via context in the texlive-20230313* tarballs, how 
do I build it?


Sorry for those (perhaps obvious) questions but I have to admit that I 
find the texlive building process quite confusing. Also, I could not 
find any installation guide that covers the scenario of building context 
within a texlive 2023 installation from its sources on linux.


Thanks in advance and regards
Jakob
___
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] Chinese labels in lang-txt.lua

2023-04-02 Thread 李延瑞
Hi Hans,

There are some inaccurate labels for Chinese in  lang-txt.lua. Could you
please apply the following patches to it?

-
--- lang-txt.lua 2023-04-03 11:10:00.267720005 +0800
+++ new-lang-txt.lua 2023-04-03 11:03:24.645426080 +0800
@@ -1192,7 +1192,7 @@
 ["ar"]="ملحق ",
 ["be"]="Апендыцыт",
 ["ca"]="Apèndix ",
-["cn"]="附录",
+["cn"]="附录 ",
 ["cs"]="Příloha ",
 ["da"]="Bilag ",
 ["de"]="Anhang ",
@@ -1473,7 +1473,7 @@
 ["be"]="Глава ",
 ["bg"]="Eпизод ",
 ["ca"]="Capítol ",
-["cn"]={ "第", "章" },
+["cn"]={ "第 ", " 章" },
 ["cs"]="Kapitola ",
 ["da"]="",
 ["de"]="Kapitel ",
@@ -1774,7 +1774,7 @@
 ["be"]="Малюнак",
 ["bg"]="Фигура",
 ["ca"]="Figura ",
-["cn"]="图",
+["cn"]="图 ",
 ["cs"]="Obrázek ",
 ["da"]="Figur ",
 ["de"]="Abbildung ",
@@ -1925,7 +1925,7 @@
 ["be"]="Графіка ",
 ["bg"]="Графичен ",
 ["ca"]="Gràfica ",
-["cn"]="插图",
+["cn"]="插图 ",
 ["cs"]="Graf ",
 ["da"]="Grafik ",
 ["de"]="Grafik ",
@@ -2058,7 +2058,7 @@
     ["be"]="Інтэрмецца ",
 ["bg"]="Интермецо ",
 ["ca"]="Intermedi ",
-["cn"]="퉣",
+["cn"]="间奏 ",
 ["cs"]="Intermezzo ",
 ["da"]="Intermezzo ",
 ["de"]="Intermezzo ",
@@ -2395,7 +2395,7 @@
 ["be"]="радок ",
 ["bg"]="ред ",
 ["ca"]="línia ",
-["cn"]="行",
+["cn"]="行 ",
 ["cs"]="řádek ",
 ["da"]="linie ",
 ["de"]="Zeile ",
@@ -2441,7 +2441,7 @@
 ["be"]="радкi ",
 ["bg"]="редове ",
 ["ca"]="línies ",
-["cn"]="行",
+["cn"]="行 ",
 ["cs"]="řádky ",
 ["da"]="linier ",
 ["de"]="Zeilen ",
@@ -3002,7 +3002,7 @@
 ["be"]="Частка ",
 ["bg"]="Частка ",
 ["ca"]="Part ",
-["cn"]={ "第", "部分" },
+["cn"]={ "第 ", " 部分" },
 ["cs"]="Část ",
 ["da"]="Del ",
 ["de"]="Teil ",
@@ -3130,7 +3130,7 @@
 ["ar"]="فصل ",
 ["bg"]="Cекция ",
 ["ca"]="Secció ",
-["cn"]={ "第", "节" },
+["cn"]={ "第 ", " 节" },
 ["cs"]="Sekce ",
 ["da"]="",
 ["de"]="Abschnitt ",
@@ -3513,7 +3513,7 @@
 ["be"]="Табліца ",
 ["bg"]="Таблица ",
 ["ca"]="Taula ",
-["cn"]="表",
+["cn"]="表 ",
 ["cs"]="Tabulka ",
 ["da"]="Tabel ",
 ["de"]="Tabelle ",
@@ -3863,7 +3863,7 @@
 ["ar"]="الأشكال",
 ["be"]="Спіс ілюстрацый",
 ["ca"]="Figures",
-["cn"]="图形",
+["cn"]="图",
 ["cs"]="Seznam obrázků",
 ["da"]="Figurer",
 ["de"]="Abbildungen",
@@ -4046,7 +4046,7 @@
 ["be"]="Лагатыпы",
 ["bg"]="Логотипи",
 ["ca"]="Logotips",
-["cn"]="徽贬",
+["cn"]="徽标",
 ["cs"]="Loga",
 ["da"]="Logoer",
 ["de"]="Logos",
---
-- 
Best regards,

Li Yanrui
___
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] update / punctuation / math

2023-04-01 Thread Alan Braslau via ntg-context
Here in Colorado, we need $\widecowboyhat$.
Of course, care should be taken so that it typeset properly in
right-to-left as well.

Alan


On Sat, 1 Apr 2023 10:27:41 +0200
Hans Hagen via ntg-context  wrote:

> Hi,
> 
> There have been some mails about punctuation spacing and a fix was
> added to the engine that related to that. As tests showed it to be
> okay so we made an update. It took a bit longer than normal because
> we were in the middle of some other math stuff: additional fonts and
> extensibles.
> 
> Daniel Flipo maintains a few math fonts (like concrete, xcharter, 
> erewhon, kp, euler) and the last few weeks more extensive support for 
> extensibles was added and concrete became quite nice too, so these
> fonts make a nice benchmark. As they are part of the lmtx install and
> we made sure to support them.
> 
> In the process we adapted our 2023 roadmap of which part is attached
> (we included an example end then decided to show of concrete).
> 
> When we go through the process of 'upgrading' we noticed some 
> interesting names for symbols and 'constructs'. Quite some come from 
> plain and/or amsmath (in the past taco and aditya did some porting to 
> context) and we're not always sure if something is really used (or
> even what it was intended for) so if you notice something weird or
> missing, let us know. Examples are welcome too. It might also be that
> something can go away because it's obsolete or never needed (so far
> we could resist te kick-out-symbole-name temptation when it comes to
> symbol names that we think no sane user can remember or imagine to be
> there).
> 
> When often add extra tests to the test suite (math subsection).
> 
> Hans & Mikael
> 
> ps. Alan and I are still messing around with some cross referencing. 
> That code is still experimental and can have issues that we're
> looking at but hard to nail down (huge complex cross-referencing
> documents). More about that later.
> 
> ==
> 
> We added the tex of the pdf below
> 
> == extract from roadmap ==
> 
> \usemodule[article-basic,abbreviations-logos]
> 
> \setupbodyfont[concrete]
> 
> \starttext
> 
> \startsubject[title=Math in \CONTEXT\ roadmap]
> 
> \startitemize[n]
> 
> \startitem
>  After playing with math support for more than a year, we have
> come to the
>  conclusion that it is time to move on. We have already discarded
> italic correction and now are replacing rules with extensibles. Much
> was already in
>  place (and applied) but experiences with type one antykwas made
> us review
>  some \OPENTYPE\ fonts. Not using rules makes some of them look 
> better. The
>  effect is subtle and probably not \AMS\ compliant, but we think 
> that it will
>  work out well for simple math like fractions of decimal numbers.
>  Consequently, we have added to our shrinking to-do list the
> burden to investigate whether we can remove those obsolete code paths
> from the engine.
>  After all, who needs italic correction, who prefers ugly rules
> to beautiful
>  glyphs, and who understands all these font parameters?
> Furthermore, after all
>  these years, we don't expect \OPENTYPE\ font and \UNICODE\ math 
> technologies
>  to improve much; we don't know if \MICROSOFT\ is developing
> their technology
>  further at all. Therefore, we are confident that what we are
> doing is the way
>  it should have been done when math was upgraded. Hopefully users 
> will notice
>  the improvements.
> \stopitem
> 
> \startitem
>  Math also means physics and units (that topic was brought up 
> recently on the
>  list by Gavin). Therefore, because we're in cleanup mode, we
> decided to eliminate some more. With \ISO\ now in place for a long
> time, we are going to
>  ignore the existence of the inch as unit from now on. The unit
> will probably
>  remain in the engine for nostalgic reasons, but it will no be 
> accepted in
>  MWE. Instead, we will provide some more modern, culturally
> correct, kid-friendly units that we will use in examples, manuals and
> such. Because
>  the four-person strong team dealing with this wants to avoid
> making mistakes,
>  we will go through a careful and scientifically sound process of 
> calibration
>  first, using a selected tex savvy audience. We expect these new 
> units to be
>  stable a month from now. Believe it or not, in the process of 
> documenting all
>  this, we found a buglet in the new math dimension spacing, so it 
> has already
>  paid off. Expect to hear more in a month or so, and enjoy your 
> inches as long
>  as you

Re: [NTG-context] update / punctuation / math

2023-04-01 Thread Willi Egger via ntg-context
Cute, as always today :-)

Willi

> On 1 Apr 2023, at 10:27, Hans Hagen via ntg-context  
> wrote:
> 
> Hi,
> 
> There have been some mails about punctuation spacing and a fix was added to 
> the engine that related to that. As tests showed it to be okay so we made an 
> update. It took a bit longer than normal because we were in the middle of 
> some other math stuff: additional fonts and extensibles.
> 
> Daniel Flipo maintains a few math fonts (like concrete, xcharter, erewhon, 
> kp, euler) and the last few weeks more extensive support for extensibles was 
> added and concrete became quite nice too, so these fonts make a nice 
> benchmark. As they are part of the lmtx install and we made sure to support 
> them.
> 
> In the process we adapted our 2023 roadmap of which part is attached (we 
> included an example end then decided to show of concrete).
> 
> When we go through the process of 'upgrading' we noticed some interesting 
> names for symbols and 'constructs'. Quite some come from plain and/or amsmath 
> (in the past taco and aditya did some porting to context) and we're not 
> always sure if something is really used (or even what it was intended for) so 
> if you notice something weird or missing, let us know. Examples are welcome 
> too. It might also be that something can go away because it's obsolete or 
> never needed (so far we could resist te kick-out-symbole-name temptation when 
> it comes to symbol names that we think no sane user can remember or imagine 
> to be there).
> 
> When often add extra tests to the test suite (math subsection).
> 
> Hans & Mikael
> 
> ps. Alan and I are still messing around with some cross referencing. That 
> code is still experimental and can have issues that we're looking at but hard 
> to nail down (huge complex cross-referencing documents). More about that 
> later.
> 
> ==
> 
> We added the tex of the pdf below
> 
> == extract from roadmap ==
> 
> \usemodule[article-basic,abbreviations-logos]
> 
> \setupbodyfont[concrete]
> 
> \starttext
> 
> \startsubject[title=Math in \CONTEXT\ roadmap]
> 
> \startitemize[n]
> 
> \startitem
>After playing with math support for more than a year, we have come to the
>conclusion that it is time to move on. We have already discarded italic
>correction and now are replacing rules with extensibles. Much was already 
> in
>place (and applied) but experiences with type one antykwas made us review
>some \OPENTYPE\ fonts. Not using rules makes some of them look better. The
>effect is subtle and probably not \AMS\ compliant, but we think that it 
> will
>work out well for simple math like fractions of decimal numbers.
>Consequently, we have added to our shrinking to-do list the burden to
>investigate whether we can remove those obsolete code paths from the 
> engine.
>After all, who needs italic correction, who prefers ugly rules to beautiful
>glyphs, and who understands all these font parameters? Furthermore, after 
> all
>these years, we don't expect \OPENTYPE\ font and \UNICODE\ math 
> technologies
>to improve much; we don't know if \MICROSOFT\ is developing their 
> technology
>further at all. Therefore, we are confident that what we are doing is the 
> way
>it should have been done when math was upgraded. Hopefully users will 
> notice
>the improvements.
> \stopitem
> 
> \startitem
>Math also means physics and units (that topic was brought up recently on 
> the
>list by Gavin). Therefore, because we're in cleanup mode, we decided to
>eliminate some more. With \ISO\ now in place for a long time, we are going 
> to
>ignore the existence of the inch as unit from now on. The unit will 
> probably
>remain in the engine for nostalgic reasons, but it will no be accepted in
>MWE. Instead, we will provide some more modern, culturally correct,
>kid-friendly units that we will use in examples, manuals and such. Because
>the four-person strong team dealing with this wants to avoid making 
> mistakes,
>we will go through a careful and scientifically sound process of 
> calibration
>first, using a selected tex savvy audience. We expect these new units to be
>stable a month from now. Believe it or not, in the process of documenting 
> all
>this, we found a buglet in the new math dimension spacing, so it has 
> already
>paid off. Expect to hear more in a month or so, and enjoy your inches as 
> long
>as you still can. In case you wonder how this relates to math other than
>mentioned: the math subsystem has 'mu' as adaptive unit, and that inspired 
> is
>

[NTG-context] update / punctuation / math

2023-04-01 Thread Hans Hagen via ntg-context

Hi,

There have been some mails about punctuation spacing and a fix was added 
to the engine that related to that. As tests showed it to be okay so we 
made an update. It took a bit longer than normal because we were in the 
middle of some other math stuff: additional fonts and extensibles.


Daniel Flipo maintains a few math fonts (like concrete, xcharter, 
erewhon, kp, euler) and the last few weeks more extensive support for 
extensibles was added and concrete became quite nice too, so these fonts 
make a nice benchmark. As they are part of the lmtx install and we made 
sure to support them.


In the process we adapted our 2023 roadmap of which part is attached (we 
included an example end then decided to show of concrete).


When we go through the process of 'upgrading' we noticed some 
interesting names for symbols and 'constructs'. Quite some come from 
plain and/or amsmath (in the past taco and aditya did some porting to 
context) and we're not always sure if something is really used (or even 
what it was intended for) so if you notice something weird or missing, 
let us know. Examples are welcome too. It might also be that something 
can go away because it's obsolete or never needed (so far we could 
resist te kick-out-symbole-name temptation when it comes to symbol names 
that we think no sane user can remember or imagine to be there).


When often add extra tests to the test suite (math subsection).

Hans & Mikael

ps. Alan and I are still messing around with some cross referencing. 
That code is still experimental and can have issues that we're looking 
at but hard to nail down (huge complex cross-referencing documents). 
More about that later.


==

We added the tex of the pdf below

== extract from roadmap ==

\usemodule[article-basic,abbreviations-logos]

\setupbodyfont[concrete]

\starttext

\startsubject[title=Math in \CONTEXT\ roadmap]

\startitemize[n]

\startitem
After playing with math support for more than a year, we have come 
to the

conclusion that it is time to move on. We have already discarded italic
correction and now are replacing rules with extensibles. Much was 
already in
place (and applied) but experiences with type one antykwas made us 
review
some \OPENTYPE\ fonts. Not using rules makes some of them look 
better. The
effect is subtle and probably not \AMS\ compliant, but we think 
that it will

work out well for simple math like fractions of decimal numbers.
Consequently, we have added to our shrinking to-do list the burden to
investigate whether we can remove those obsolete code paths from 
the engine.
After all, who needs italic correction, who prefers ugly rules to 
beautiful
glyphs, and who understands all these font parameters? Furthermore, 
after all
these years, we don't expect \OPENTYPE\ font and \UNICODE\ math 
technologies
to improve much; we don't know if \MICROSOFT\ is developing their 
technology
further at all. Therefore, we are confident that what we are doing 
is the way
it should have been done when math was upgraded. Hopefully users 
will notice

the improvements.
\stopitem

\startitem
Math also means physics and units (that topic was brought up 
recently on the

list by Gavin). Therefore, because we're in cleanup mode, we decided to
eliminate some more. With \ISO\ now in place for a long time, we 
are going to
ignore the existence of the inch as unit from now on. The unit will 
probably
remain in the engine for nostalgic reasons, but it will no be 
accepted in

MWE. Instead, we will provide some more modern, culturally correct,
kid-friendly units that we will use in examples, manuals and such. 
Because
the four-person strong team dealing with this wants to avoid making 
mistakes,
we will go through a careful and scientifically sound process of 
calibration
first, using a selected tex savvy audience. We expect these new 
units to be
stable a month from now. Believe it or not, in the process of 
documenting all
this, we found a buglet in the new math dimension spacing, so it 
has already
paid off. Expect to hear more in a month or so, and enjoy your 
inches as long
as you still can. In case you wonder how this relates to math other 
than
mentioned: the math subsystem has 'mu' as adaptive unit, and that 
inspired is

to come up with one for text (in addition to two new more or less fixed
units).
\stopitem

\startitem
The math family model is a fundamental concept in \TEX\ but we 
think we can
do without. First of all, \OPENTYPE\ math fonts have (design) 
script and
scriptscript sizes built in, so for that we have one family. 
Second, only

full bold (heavy) makes sense as companion for regular math which is
something that in practice we can support otherwise. So, this makes us
consider dropping families altogether which then provides (mem) 
space for


Re: [NTG-context] registered function call [1160]:...live/2023/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:87: cannot open /.: Permission denied - Alpine Linux

2023-03-31 Thread Carlos via ntg-context
On Fri, Mar 31, 2023 at 04:40:27PM +0200, Hans Hagen via ntg-context wrote:
> On 3/31/2023 1:40 PM, Carlos via ntg-context wrote:
> 
> > > so why not use lucida math fonts?
> > 
> > I have. But only with a couple of math fonts. I don't have all these fonts.
> 
> It really pays off to buy the official lucida opentype package.

I'll do that eventually. 
> 
> > mkiv lua stats  > loaded fonts: 3 files: lucidanewmathitalic.ttf, 
> > lucidanewmathsymbol.ttf, lucidabrightregular.otf
> > mkiv lua stats  > font engine: otf 3.133, afm 1.513, tfm 1.000, 6 
> > instances, 3 shared in backend, 1 common vectors, 2 common hashes, load 
> > time 16.733 seconds
> 
> I never heard of these math ones. Did you get these from yandytex (no longer
> around) or TUG (the official distributer of lucida opentype math)? Anyway,
> as we fine tune math fonts for sure you get suboptimal results (or even
> wrong output). Mikael and I put quite a bit of care into lucida opentype
> math.
> 
> > I do agree with you in that that loading time is perhaps unacceptable but…
> > ...
> > You ought to specify that must be only after subsequent callbacks. I just 
> > tried it with a one liner file of \setupbodyfont[lucida] and (looking 
> > around in disbelief) it took a whooping ahem
> > fonts   > names > skipped files: 164
> > fonts   > names > duplicate files  : 164
> > fonts   > names > total scan time  : 16.487 seconds
> 
> I have no clue, unless that relates to your font path including some home
> dir which gets scanned every time for whatever reason and that has tens of
> thousands of files. I can process the 350+ page luametatex manual twice in
> these 16 seconds and that one loads quite some (also math) fonts and my
> laptop is not a fancy 2023 one
> 
> > before it produced even error messages.
> > 
> > beating me for 2 seconds. Great. And then it restricted my freedom by saying
> > 
> > «Sorry, but I can't typeset math unless various parameters have been set. 
> > This is
> > normally done by loading special math fonts into the math family slots. 
> > Your font
> > set is lacking at least the parameter mentioned earlier.»
> 
> that's pretty clear: you don't load a math font at all, maybe some text font
> pretending it is math
> 
> > Sorry, but sorry doesn't cut it here.
> 
> it does: no proper math font found so reason to complain
> 
> > I guess it must have been referring to  \strc_formulas_place_number 
> > \strc_formulas_flush_number \dostarttagged \t!formulacontent \empty 
> > \dotagregisterformula \c_strc_formulas_n \csname \e!stop \formulaparameter 
> > \c!alternative \v!formula \endcsname
> 
> dunno, that's numbering, not math
> 
> > Okay. So I tried another file. This time around with only
> > 
> > \setupbodyfont[lucida]
> > 
> > \starttext
> > $ test $
> > \stoptext
> > 
> > and then the output message was «Somewhere in the math formula just ended, 
> > you used the stated character from an
> > undefined font family. For example, plain TeX doesn't allow \it or \sl in
> > subscripts. Proceed, and I'll try to forget that I needed that character.»
> > 
> > There's not even a fallback to cmr or any other font.
> 
> sure, why should it, you want lucida so better quit with an error than
> kicking in some font; actually cmr math fonts have been obsoleted for way
> over a decade by latin modern math fonts in 32 bit font engines

I was actually thinking to ask you about that, and by falling back to cmr math 
font that perhaps would expedite loading time along the way. 

Thank you for the info on that last sentence. I didn't know. 
> 
> > There was not even a personalized touch in the output. That message sounds 
> > like one of these new GPT-chat features. Dry. When I read that «Proceed, 
> > and I'll try to forget it…» part the first thing I thought was: yeah, I'll 
> > proceed by removing that file altogether and you'll forget it for sure .
> 
> that message is part of 'reference tex the program' for over 40 years so if
> chatgpt would come up with it, it would do so by having parsed plenty of tex
> sources instead of inventing it (and when it comes to answering tex related
> questions chargpt is pretty unreliable, but that's another topic)
> 
> > But instaed I looked at it and though to myself «how much has changed?!» In 
> > plain TeX (I have forgotten it a bit) but I can still type
> > > \par
> > > $test$
> > > \end
> > 
> > and it'll produce a dvi file in return.
> 
> a lot has changed: opentyp

Re: [NTG-context] registered function call [1160]:...live/2023/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:87: cannot open /.: Permission denied - Alpine Linux

2023-03-31 Thread Hans Hagen via ntg-context

On 3/31/2023 1:40 PM, Carlos via ntg-context wrote:


so why not use lucida math fonts?


I have. But only with a couple of math fonts. I don't have all these fonts.


It really pays off to buy the official lucida opentype package.


mkiv lua stats  > loaded fonts: 3 files: lucidanewmathitalic.ttf, 
lucidanewmathsymbol.ttf, lucidabrightregular.otf
mkiv lua stats  > font engine: otf 3.133, afm 1.513, tfm 1.000, 6 instances, 3 
shared in backend, 1 common vectors, 2 common hashes, load time 16.733 seconds


I never heard of these math ones. Did you get these from yandytex (no 
longer around) or TUG (the official distributer of lucida opentype 
math)? Anyway, as we fine tune math fonts for sure you get suboptimal 
results (or even wrong output). Mikael and I put quite a bit of care 
into lucida opentype math.



I do agree with you in that that loading time is perhaps unacceptable but…

> ...

You ought to specify that must be only after subsequent callbacks. I just tried 
it with a one liner file of \setupbodyfont[lucida] and (looking around in 
disbelief) it took a whooping ahem
fonts   > names > skipped files: 164
fonts   > names > duplicate files  : 164
fonts   > names > total scan time  : 16.487 seconds


I have no clue, unless that relates to your font path including some 
home dir which gets scanned every time for whatever reason and that has 
tens of thousands of files. I can process the 350+ page luametatex 
manual twice in these 16 seconds and that one loads quite some (also 
math) fonts and my laptop is not a fancy 2023 one



before it produced even error messages.

beating me for 2 seconds. Great. And then it restricted my freedom by saying

«Sorry, but I can't typeset math unless various parameters have been set. This 
is
normally done by loading special math fonts into the math family slots. Your 
font
set is lacking at least the parameter mentioned earlier.»


that's pretty clear: you don't load a math font at all, maybe some text 
font pretending it is math



Sorry, but sorry doesn't cut it here.


it does: no proper math font found so reason to complain


I guess it must have been referring to  \strc_formulas_place_number 
\strc_formulas_flush_number \dostarttagged \t!formulacontent \empty 
\dotagregisterformula \c_strc_formulas_n \csname \e!stop \formulaparameter 
\c!alternative \v!formula \endcsname


dunno, that's numbering, not math


Okay. So I tried another file. This time around with only

\setupbodyfont[lucida]

\starttext
$ test $
\stoptext

and then the output message was «Somewhere in the math formula just ended, you 
used the stated character from an
undefined font family. For example, plain TeX doesn't allow \it or \sl in
subscripts. Proceed, and I'll try to forget that I needed that character.»

There's not even a fallback to cmr or any other font.


sure, why should it, you want lucida so better quit with an error than 
kicking in some font; actually cmr math fonts have been obsoleted for 
way over a decade by latin modern math fonts in 32 bit font engines



There was not even a personalized touch in the output. That message sounds like 
one of these new GPT-chat features. Dry. When I read that «Proceed, and I'll 
try to forget it…» part the first thing I thought was: yeah, I'll proceed by 
removing that file altogether and you'll forget it for sure .


that message is part of 'reference tex the program' for over 40 years so 
if chatgpt would come up with it, it would do so by having parsed plenty 
of tex sources instead of inventing it (and when it comes to answering 
tex related questions chargpt is pretty unreliable, but that's another 
topic)



But instaed I looked at it and though to myself «how much has changed?!» In 
plain TeX (I have forgotten it a bit) but I can still type
> \par
> $test$
> \end

and it'll produce a dvi file in return.


a lot has changed: opentype math, unicode, more demands but indeed there 
is nothing against using plain tex with cmr and dvi fonts if that suits 
well; and plain tex will always be faster than context (or latex) just 
like pdftex with 8 bit fonts is faster than luatex with 32 bit fonts 
(with luametatex sitting in between wrt performance)
 anyway, i bet that if you want to use lucida with plain you also have 
to do some work and it will complain as loud as luametatex when th efont 
parameters are not set


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

Re: [NTG-context] registered function call [1160]:...live/2023/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:87: cannot open /.: Permission denied - Alpine Linux

2023-03-31 Thread Carlos via ntg-context
t restricted my freedom by saying

«Sorry, but I can't typeset math unless various parameters have been set. This 
is
normally done by loading special math fonts into the math family slots. Your 
font
set is lacking at least the parameter mentioned earlier.»

Sorry, but sorry doesn't cut it here. 

I guess it must have been referring to  \strc_formulas_place_number 
\strc_formulas_flush_number \dostarttagged \t!formulacontent \empty 
\dotagregisterformula \c_strc_formulas_n \csname \e!stop \formulaparameter 
\c!alternative \v!formula \endcsname 

Okay. So I tried another file. This time around with only 

\setupbodyfont[lucida]

\starttext
$ test $
\stoptext

and then the output message was «Somewhere in the math formula just ended, you 
used the stated character from an
undefined font family. For example, plain TeX doesn't allow \it or \sl in
subscripts. Proceed, and I'll try to forget that I needed that character.» 

There's not even a fallback to cmr or any other font. 

There was not even a personalized touch in the output. That message sounds like 
one of these new GPT-chat features. Dry. When I read that «Proceed, and I'll 
try to forget it…» part the first thing I thought was: yeah, I'll proceed by 
removing that file altogether and you'll forget it for sure . 

But instaed I looked at it and though to myself «how much has changed?!» In 
plain TeX (I have forgotten it a bit) but I can still type 
> \par
> $test$ 
> \end

and it'll produce a dvi file in return. 


> 
> (so 100 times less load time here)
> 
> 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
> ___

-- 
New systems generate new problems.

___
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] Numbering of figures after defining a new float

2023-03-31 Thread Willi Egger via ntg-context
Thank you Alan, I tried many different things but as Wolfgang pointed out I had 
a mistake in the float definition!

Kind regards

WIlli

> On 31 Mar 2023, at 00:08, Alan Braslau via ntg-context  
> wrote:
> 
> Have you tried:
> 
> \setuplist [figure] [partnumber=no]
> 
> ...
> 
> \placelistoffigures [criterium=part]
> 
> 
> 
> Alan
> 
> 
> On Thu, 30 Mar 2023 17:09:15 +0200
> Willi Egger via ntg-context  wrote:
> 
>> Hello everybody,
>> 
>> 
>> I am still working on the previously mentioned project, consisting
>> out of different parts. There are about 25 chapters in each part and
>> most of the chapters contain figures. When using the predefined
>> figure environment, then all figures in the figure-list are placed
>> correctly though at each part the numbering restarts.
>> 
>> Now I tried to implement for each part its own float environment,
>> which enables me to produce a figure-list per part with subtitels.
>> How ever in the newly defined floats there is no continuous numbering
>> i.e. chapternumber.serialnumber. Instead each float get the chapter
>> number only.
>> 
>> How to get the numbering right?
>> 
>> Kind regards
>> Willi
>> 
>> The following example shows what happens:
>> 
>> \useMPlibrary[dum]
>> 
>> \definefloat[Afigure][Afigures][figures]
>> \definefloat[Bfigure][Bfigures][figures]
>> 
>> \setuphead
>>  [part]
>>  [placehead=yes,
>>   page=yes]
>> 
>> \setuphead
>>  [chapter]
>>  [page=no]
>> 
>> \starttext
>> 
>> \starttitle[title=List of figures]
>>  \startsubject[title=Figures (predefined figureenvironment)]
>>\placelistoffigures
>>  \stopsubject
>> 
>>  \startsubject[title=Figures A]
>>  \placelistofAfigures
>>  \stopsubject
>> 
>>  \startsubject[title=Figures B]
>>\placelistofBfigures
>>  \stopsubject
>> \stoptitle
>> 
>> \startpart[title=Part ONE]
>> \startchapter[title={Chapter one in part one}] %les21
>> 
>> \startplaceAfigure
>>  [location=left,
>>   reference=fig:dumA,
>>   title={Dummy A}]
>>  {\externalfigure[dummy][width=0.6\textwidth]}
>> \stopplaceAfigure
>> 
>> \startplacefigure
>>  [location=left,
>>   reference=fig:dumB,
>>   title={Dummy B}]
>>  {\externalfigure[dummy][width=0.6\textwidth]}
>> \stopplacefigure
>> 
>> \startsection[title=Section A]
>> 
>> \startplaceAfigure
>>  [location=left,
>>   reference=fig:dumC,
>>   title={Dummy C}]
>>  {\externalfigure[dummy][width=0.6\textwidth]}
>> \stopplaceAfigure
>> 
>> \stopsection
>> \stopchapter
>> \stoppart
>> 
>> \startpart[title=Part TWO]
>> \startchapter[title=Chapter one in part two]
>> 
>> \startplaceBfigure
>>  [location=left,
>>   reference=fig:dumD,
>>   title={Dummy D}]
>>  {\externalfigure[dummy][width=0.6\textwidth]}
>> \stopplaceBfigure
>> \stopchapter
>> \stoppart
>> \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
> ___

___
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] Numbering of figures after defining a new float

2023-03-30 Thread Alan Braslau via ntg-context
Have you tried:

\setuplist [figure] [partnumber=no]

...

\placelistoffigures [criterium=part]



Alan


On Thu, 30 Mar 2023 17:09:15 +0200
Willi Egger via ntg-context  wrote:

> Hello everybody,
> 
> 
> I am still working on the previously mentioned project, consisting
> out of different parts. There are about 25 chapters in each part and
> most of the chapters contain figures. When using the predefined
> figure environment, then all figures in the figure-list are placed
> correctly though at each part the numbering restarts.
> 
> Now I tried to implement for each part its own float environment,
> which enables me to produce a figure-list per part with subtitels.
> How ever in the newly defined floats there is no continuous numbering
> i.e. chapternumber.serialnumber. Instead each float get the chapter
> number only.
> 
> How to get the numbering right?
> 
> Kind regards
> Willi
> 
> The following example shows what happens:
> 
> \useMPlibrary[dum]
> 
> \definefloat[Afigure][Afigures][figures]
> \definefloat[Bfigure][Bfigures][figures]
> 
> \setuphead
>   [part]
>   [placehead=yes,
>page=yes]
> 
> \setuphead
>   [chapter]
>   [page=no]
> 
> \starttext
> 
> \starttitle[title=List of figures]
>   \startsubject[title=Figures (predefined figureenvironment)]
> \placelistoffigures
>   \stopsubject
> 
>   \startsubject[title=Figures A]
>   \placelistofAfigures
>   \stopsubject
> 
>   \startsubject[title=Figures B]
> \placelistofBfigures
>   \stopsubject
> \stoptitle
> 
> \startpart[title=Part ONE]
> \startchapter[title={Chapter one in part one}] %les21
> 
> \startplaceAfigure
>   [location=left,
>reference=fig:dumA,
>title={Dummy A}]
>   {\externalfigure[dummy][width=0.6\textwidth]}
> \stopplaceAfigure
> 
> \startplacefigure
>   [location=left,
>reference=fig:dumB,
>title={Dummy B}]
>   {\externalfigure[dummy][width=0.6\textwidth]}
> \stopplacefigure
> 
> \startsection[title=Section A]
> 
> \startplaceAfigure
>   [location=left,
>reference=fig:dumC,
>title={Dummy C}]
>   {\externalfigure[dummy][width=0.6\textwidth]}
> \stopplaceAfigure
> 
> \stopsection
> \stopchapter
> \stoppart
> 
> \startpart[title=Part TWO]
> \startchapter[title=Chapter one in part two]
> 
> \startplaceBfigure
>   [location=left,
>reference=fig:dumD,
>title={Dummy D}]
>   {\externalfigure[dummy][width=0.6\textwidth]}
> \stopplaceBfigure
> \stopchapter
> \stoppart
> \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] Numbering of figures after defining a new float

2023-03-30 Thread Wolfgang Schuster via ntg-context

Willi Egger via ntg-context schrieb am 30.03.2023 um 17:09:

Hello everybody,


I am still working on the previously mentioned project, consisting out of 
different parts. There are about 25 chapters in each part and most of the 
chapters contain figures. When using the predefined figure environment, then 
all figures in the figure-list are placed correctly though at each part the 
numbering restarts.

Now I tried to implement for each part its own float environment, which enables 
me to produce a figure-list per part with subtitels. How ever in the newly 
defined floats there is no continuous numbering i.e. 
chapternumber.serialnumber. Instead each float get the chapter number only.

How to get the numbering right?

Kind regards
Willi

The following example shows what happens:

\useMPlibrary[dum]

\definefloat[Afigure][Afigures][figures]
\definefloat[Bfigure][Bfigures][figures]


The name of the existing float instance is figure (without s).

\definefloat[Afigure][Afigures][figure]
\definefloat[Bfigure][Bfigures][figure]

Wolfgang

___
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] Numbering of figures after defining a new float

2023-03-30 Thread Willi Egger via ntg-context
Hi Hraban,

thanks for your answer, however this is not precisely what I am talking about. 

If you have 3 figures in chapter  1, you want  them to be numbered as 1.1 , 1.2 
, 1.3. However with floats defined with \definefloat[Afigure][Afigures][figure] 
they all get solely the chapter number: 1.

Kind regards
Willi 

> On 30 Mar 2023, at 18:01, Henning Hraban Ramm via ntg-context 
>  wrote:
> 
> Am 30.03.23 um 17:09 schrieb Willi Egger via ntg-context:
>> I am still working on the previously mentioned project, consisting out of 
>> different parts. There are about 25 chapters in each part and most of the 
>> chapters contain figures. When using the predefined figure environment, then 
>> all figures in the figure-list are placed correctly though at each part the 
>> numbering restarts.
>> Now I tried to implement for each part its own float environment, which 
>> enables me to produce a figure-list per part with subtitels. How ever in the 
>> newly defined floats there is no continuous numbering i.e. 
>> chapternumber.serialnumber. Instead each float get the chapter number only.
>> How to get the numbering right?
> 
> You can define the resetting of numbering with 
> \setupcaption[Afigure][way=bytext|bypart|bychapter].
> 
> For the list, \placelist[Afigure][criterium=chapter] (or local?) should work.
> 
> HTH,
> 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] Numbering of figures after defining a new float

2023-03-30 Thread Henning Hraban Ramm via ntg-context

Am 30.03.23 um 17:09 schrieb Willi Egger via ntg-context:

I am still working on the previously mentioned project, consisting out of 
different parts. There are about 25 chapters in each part and most of the 
chapters contain figures. When using the predefined figure environment, then 
all figures in the figure-list are placed correctly though at each part the 
numbering restarts.

Now I tried to implement for each part its own float environment, which enables 
me to produce a figure-list per part with subtitels. How ever in the newly 
defined floats there is no continuous numbering i.e. 
chapternumber.serialnumber. Instead each float get the chapter number only.

How to get the numbering right?


You can define the resetting of numbering with 
\setupcaption[Afigure][way=bytext|bypart|bychapter].


For the list, \placelist[Afigure][criterium=chapter] (or local?) should 
work.


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


[NTG-context] Numbering of figures after defining a new float

2023-03-30 Thread Willi Egger via ntg-context
Hello everybody,


I am still working on the previously mentioned project, consisting out of 
different parts. There are about 25 chapters in each part and most of the 
chapters contain figures. When using the predefined figure environment, then 
all figures in the figure-list are placed correctly though at each part the 
numbering restarts.

Now I tried to implement for each part its own float environment, which enables 
me to produce a figure-list per part with subtitels. How ever in the newly 
defined floats there is no continuous numbering i.e. 
chapternumber.serialnumber. Instead each float get the chapter number only.

How to get the numbering right?

Kind regards
Willi

The following example shows what happens:

\useMPlibrary[dum]

\definefloat[Afigure][Afigures][figures]
\definefloat[Bfigure][Bfigures][figures]

\setuphead
[part]
[placehead=yes,
 page=yes]

\setuphead
  [chapter]
[page=no]

\starttext

\starttitle[title=List of figures]
  \startsubject[title=Figures (predefined figureenvironment)]
\placelistoffigures
  \stopsubject

  \startsubject[title=Figures A]
\placelistofAfigures
  \stopsubject

  \startsubject[title=Figures B]
\placelistofBfigures
  \stopsubject
\stoptitle

\startpart[title=Part ONE]
\startchapter[title={Chapter one in part one}] %les21

\startplaceAfigure
[location=left,
 reference=fig:dumA,
 title={Dummy A}]
{\externalfigure[dummy][width=0.6\textwidth]}
\stopplaceAfigure

\startplacefigure
[location=left,
 reference=fig:dumB,
 title={Dummy B}]
{\externalfigure[dummy][width=0.6\textwidth]}
\stopplacefigure

\startsection[title=Section A]

\startplaceAfigure
[location=left,
 reference=fig:dumC,
 title={Dummy C}]
{\externalfigure[dummy][width=0.6\textwidth]}
\stopplaceAfigure

\stopsection
\stopchapter
\stoppart

\startpart[title=Part TWO]
\startchapter[title=Chapter one in part two]

\startplaceBfigure
[location=left,
 reference=fig:dumD,
 title={Dummy D}]
{\externalfigure[dummy][width=0.6\textwidth]}
\stopplaceBfigure
\stopchapter
\stoppart
\stoptext

test.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 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] How to prefix the list of figures with part number?

2023-03-25 Thread Willi Egger via ntg-context
Hello again,

My project has different parts. Each part contains a whole list of figures. At 
the beginning of the book I would like to place a list of all figures. Hoever 
they should be prefixed with the part number. I can not figure out how to 
achieve this.

May be someone can hint me…

Cheers 

Willi

\setuplist[figures][pageprefixsegments=part:chapter] % Pageprefix? 

\setuphead[part][placehead=yes] 

\starttext
\startpart[title=part one]

\starttitle[title=Contents]
  \placelist[part,chapter][criterium=all]

  \startsubject[title=Figures]  
\placelistoffigures[criterium=all]
  \stopsubject

\stoptitle


\startchapter[title=Mychapter]
  \input knuth
  \startsubject[title=Subject will be in TOC]
\writetolist[chapter]{1}{I am in TOC!}
\input ward
 \startplacefigure
[location=middle,
 title=Cow 1]
{\externalfigure[cow][width=7cm]}
\stopplacefigure

  \stopsubject 
\stopchapter
\stoppart

\startpart[title=Part two]
 \startchapter[title=Myotherchapter] 
   \startplacefigure
 [location=middle,
  title=Cow 2]
{\externalfigure[cow][width=7cm]}
  \stopplacefigure
  \stopchapter
\stoppart
\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
___


[NTG-context] natural table oddities

2023-03-14 Thread Henning Hraban Ramm via ntg-context
Working on the documentation for “natural tables” I stumbled upon a few 
oddities/problems.
I’d like to know if there are misunderstandings on my part or if the 
behavior is intentional.


BTW enattab.pdf is missing in the LMTX distribution.

## Options

* before/after/inbetween values don’t appear anywhere.
* spaceinbetween should insert between rows, but nothing happens.
* splitoffset doesn’t seem to change anything.
* What’s samepage for?


## Addressing cells

* It’s not possible to address single cells with \setupTABLE, or is it?

* There’s \setupTABLE[header], but not "footer" (or "section"); since we 
have TABLEhead and TABLEfoot, IMO "head" and "foot" would make sense.


* Row 1 is the first row of TABLEbody. I couldn’t find how to address 
the first line of TABLEbody.


* Is it possible, and how, to use odd/even only for the body?

* If I format a column, e.g. \setupTABLE[c][-1][color=red], body and 
foot are formatted, but not the same column in header. (I found out, if 
I use TD instead of TH in the header, it works.)


* I don’t understand the addressing options "start" and "one".


## Formatting

* maxwidth doesn’t seem to have an effect, neither on the whole table 
nor on a column.

* textwidth works only for the whole table.
* width gets stretched if option=stretch; i.e. you can’t fix the width 
of single cells or columns.



## Page breaking

* What’s the difference between [split=repeat] and 
[split=yes,header=repeat], i.e. which sense makes the header option)?


* Is there an option to repeat the footer (as the last line of each 
page)? (I’d imagine to use it in an invoice or similar calculation for a 
subtotal – that would imply some more magic…)



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
___


Re: [NTG-context] Did dotless i disappear ?

2023-03-13 Thread Otared Kavian via ntg-context
Hi Pablo, Hans, Wolfgang,

Indeed, thanks to you I see that in ConTeXt there exist plenty of solutions for 
the problem I reported. That’s really impressive !

Best regards : Otared

> On 13 Mar 2023, at 20:19, Hans Hagen via ntg-context  
> wrote:
> 
> On 3/13/2023 4:28 PM, Otared Kavian via ntg-context wrote:
>> Hi Hans,
>> I just noticed that the dotless i « \i » is not anymore recognized in 
>> ConTeXt. Of course one can nowadays find other ways to have it typeset, but 
>> in old documents which are included as inputs one has to correct this 
>> manually (for instance in French « connaître » was typed as « conn\^{\i}tre 
>> »).
>> Here is an example.
>> \starttext
>> Bío Bío (works fine…)
>> B\'{\i}o B\'{\i}o % this gives an error
>> \stoptext
> I'll add checking for the \i too. It's all part of a parser. Think
> 
> \chr {e acute}
> \chr {i circumflex}
> \^{i} \^i \^{\i}
> \^{a} \"{a}
> \withcircumflex{a}
> \withdiaeresis{a}
> 
> a bit messy code due to reuse of all kin dof mechanisms.
> 
> 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
> ___

Otared Kavian
e-mail: ota...@gmail.com
Phone: +33 6 88 26 70 95




___
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] Did dotless i disappear ?

2023-03-13 Thread Hans Hagen via ntg-context

On 3/13/2023 4:28 PM, Otared Kavian via ntg-context wrote:

Hi Hans,

I just noticed that the dotless i « \i » is not anymore recognized in ConTeXt. 
Of course one can nowadays find other ways to have it typeset, but in old 
documents which are included as inputs one has to correct this manually (for 
instance in French « connaître » was typed as « conn\^{\i}tre »).

Here is an example.

\starttext
Bío Bío (works fine…)

B\'{\i}o B\'{\i}o % this gives an error

\stoptext

I'll add checking for the \i too. It's all part of a parser. Think

\chr {e acute}
\chr {i circumflex}
\^{i} \^i \^{\i}
\^{a} \"{a}
\withcircumflex{a}
\withdiaeresis{a}

a bit messy code due to reuse of all kin dof mechanisms.

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] regular online meet-up

2023-03-07 Thread Henning Hraban Ramm via ntg-context

Reminder: This is in a few hours.

For my part I’d like to know what was in the latest updates and maybe 
discuss the page breaking in floats (possible with tables, how about 
text background boxes – didn’t try yet, just curious).


Hraban

Am 04.03.23 um 18:42 schrieb Henning Hraban Ramm via ntg-context:

You’re invited to join on Wednesday, March 8th, 15:00 CET (UTC+1)

at https://lecture.senfcall.de/hen-rbr-rku-oke
(same, but shorter: https://v34h.de/ctxmtg)

ConTeXt users of all levels are welcome!

Next meeting will be on April 12th.


(Same blurb as every time:)

[Howto]
* No special software installation required; most modern browsers should 
work (WebRTC required).

* Open the above URL, accept the privacy statement,
* enter your name,
* click "join" (or "start" if you’re the first),
* click "with microphone", allow your browser to access it, check the 
audio.
* Your microphone is muted if you join. Activate microphone and/or 
camera with the buttons at the bottom.

* Minimize the default presentation with the "screen" button, bottom right.

* If you’d like to share your screen or upload a file, you can make 
yourself the presenter: Click on your user name, change the setting, 
then you’ll see the "screen sharing" button beside the camera button; 
also there’s now "manage presentations" behind the "plus" button.
Beware there is only one presenter at a time, so don’t kill someone 
else’s presentation.


[Technical hints]
* Sound is usually better if you use a headset (less noise for everyone).

* Connection problems are mostly due to low bandwidth or high latency on 
your side, e.g. with mobile connections.

* If audio/video doesn’t work for you, you can still use the text chat.
* Screen sharing needs a lot of bandwidth.

* BigBlueButton documentation applies: 
https://bigbluebutton.org/teachers/tutorials/


[Netiquette]
* Please use a name that we recognize from here. Some feel uncomfortable 
with anonymous lurkers.

* Mute your microphone while you’re not talking.
* It’s nice to show your face at least when you join.
* If there are connection problems, stop camera sharing.
* The room is set to “everyone’s a moderator“, I trust you...

See you, 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
___


[NTG-context] Typeset multiple pictures not in a strict matrix (\startfloatcombination)

2023-03-07 Thread Gerion Entrup via ntg-context
Hi,

I'm trying to typeset several pictures as a floatcombination but not in
the form of strict cells of a matrix.

Here is some ASCII art to demonstrate the positions of the pictures:

  ---
  | |
  | |
  ---
a) Some caption

    -
  |  |  |   |
  |  |  |   |
  |  |  |   |
    -
 b) fooc) foo

 Figure 1.1: Foo Bar


I tried to typeset it with this code (based on 
https://tex.stackexchange.com/a/502903):

\useMPlibrary[dum]
\setupcombinations[alternative=text]

\definefloat[subfigure][local=yes]
\setupcaption[subfigure][numberconversion=a]
\setuplabeltext[subfigure=]

\appendvalue{stopplacefigure}{\resetcounter[subfigure]}

\starttext
\startplacefigure[title=Test]
\startfloatcombination[nx=1, ny=2]
  \startplacesubfigure[title=Test]
\externalfigure[dummy][width=4cm,height=1cm]
  \stopplacesubfigure
  \startfloatcombination[nx=2, ny=1]
\startplacesubfigure[title=Test]
  \externalfigure[dummy][width=4cm,height=1cm]
\stopplacesubfigure
\startplacesubfigure[title=Test]
  \externalfigure[dummy][width=4cm,height=1cm]
\stopplacesubfigure
  \stopfloatcombination
\stopfloatcombination
\stopplacefigure
\stoptext

However, this does not work (the pictures are all in one row).
Do you have some advice?

Gerion


signature.asc
Description: This is a digitally signed message part.
___
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] Description together with itemize, luametatex

2023-03-06 Thread Gerion Entrup via ntg-context
Am Montag, 6. März 2023, 14:34:28 CET schrieb Aditya Mahajan via ntg-context:
> On Mon, 6 Mar 2023, Gerion Entrup via ntg-context wrote:
> 
> > Hi,
> > 
> > I'm trying to use a description environment in conjunction with an
> > itemize with the latest luametatex. Is this supposed to work?
> > 
> > Here is an MWE:
> > ```
> > \definedescription[desc][headstyle=bold]
> > 
> > \starttext
> > Foo
> > 
> > \desc{Some title} Some text
> > \startitemize
> > \item Some item
> > \stopitemize
> > 
> > \stoptext
> 
> Use \startdesc ... \stopdesc
> 
> \definedescription[desc][headstyle=bold]
> 
> \starttext
> Foo
> 
> \startdesc[title={Some title}]
>   Some text
> \startitemize
> \item Some item
> \stopitemize
> \stopdesc
> 
> \stoptext

That worked. Thank you!


signature.asc
Description: This is a digitally signed message part.
___
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] Visual highlighted text with title, mix of enumeration and framedtext

2023-03-06 Thread Gerion Entrup via ntg-context
Hi,

I want to typeset a "Good to know" section that is visually highlighted
and can spawn across multiple pages.

In LaTeX this would be possible with the mdframed package. See the
attached screenshot for an example how it might look like (it is copied
out of page 4: Definition: Inhomogeneous linear of the mdframed
documentation:
http://mirrors.ctan.org/macros/latex/contrib/mdframed/mdframed.pdf)

I have searched in the wiki and found \defineenumeration:
This is near of that what I need. However I explicitly does not need an
enumeration (so no number or counter). Also I am not sure if I can set a
background and so on.

The other possibility is \defineframedtext. For example this goes much
in the direction that I want:
\definecolor[gbackground][s=0.98]
\defineframedtext[gtk][frame=on,
   offset=5pt,
   background=color,
   width=0.95\textwidth,
   backgroundcolor=gbackground]

However, there does not seem a possibility to define a title and it
seems to not work on multiple pages.

Is there a mix of an enumeration and framedtext that can produce
something like in the attached picture?

Best,
Gerion


signature.asc
Description: This is a digitally signed message part.
___
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] Description together with itemize, luametatex

2023-03-06 Thread Gerion Entrup via ntg-context
Hi,

I'm trying to use a description environment in conjunction with an
itemize with the latest luametatex. Is this supposed to work?

Here is an MWE:
```
\definedescription[desc][headstyle=bold]

\starttext
Foo

\desc{Some title} Some text
\startitemize
\item Some item
\stopitemize

\stoptext
```

This currently fails with:
```
resolvers   | formats | executing runner 'run luametatex format': 
/home/gerion/context/tex/texmf-linux-64/bin/luametatex --jobname="./test.tex" 
--fmt=/home/gerion/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
 
--lua=/home/gerion/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
  --c:currentrun=1 --c:fulljobname="./test.tex" --c:input="./test.tex" 
--c:kindofrun=1 --c:maxnofruns=9 
--c:texmfbinpath="/home/gerion/context/tex/texmf-linux-64/bin"
system  >
system  > ConTeXt  ver: 2023.02.23 21:26 LMTX  fmt: 2023.3.4  int: 
english/english
system  >
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name 
'/home/gerion/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 1, order 1, name 
'/home/gerion/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname './test', input './test.tex', result './test'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name './test.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern rm 12pt' is loaded
lua error   > lua error on line 8 in file ./test.tex:

registered function call [809]: 
...ext/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:448: attempt to 
index a nil value (local 'd')
stack traceback:
...ext/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:448: in 
function <...ext/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:442>
(...tail calls...)
 1 \definedescription[desc][headstyle=bold]
 2
 3 \starttext
 4 Foo
 5
 6 \desc{Some title} Some text
 7  \startitemize
 8 >>   \item Some item
 9  \stopitemize
10
11 \stoptext
12
mtx-context | fatal error: return code: 1
```

Best,
Gerion


signature.asc
Description: This is a digitally signed message part.
___
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] Float control

2023-03-01 Thread Max Chernoff via ntg-context

Hi Denis,

> The floats where jumping around, appearing in a different order than
> in the source file

Tables and figures can appear in different orders than each other, and a
top float could appear at the top of the page that it is mentioned, but
if you ever see Figure 2 before Figure 1 or a float appearing before it
is placed in the source (with the exception of the top issue), then
you've probably found a bug.

> some positioning keys had not the intended effect (e.g. top)

I've had mixed results with some of the positioning keys too, but "top"
should generally work okay. If you're using columns, weird stuff can
sometimes happen with top/bottom floats, but you should still be able to
make them work. You can also try adding

   \setupfloat[ntop=100]
   
at the start of you're document. I've had that fix an otherwise-
unexplainable bug once.

> I know, TeX's float positioning algorithm should be rather reliable
> and stable

Not as much as you would expect. The TeX page breaking algorithm is
greedy, single-pass, and dependant on every page prior, so you can get
some pretty chaotic results in pathological situations. "Typical"
documents don't usually have any issues, but you can (even accidentally)
make a document that gives some really weird results.

> Anyway, I'd like to learn more about the whole float issue. Is there anything 
> particular I could read to learn more about the whole thing?

The only float documentation for ConTeXt that I'm aware of is a short
section in It's in the Details

   
https://www.pragma-ade.nl/general/manuals/details.pdf#%5B%7B%22num%22%3A39%2C%22gen%22%3A0%7D%2C%7B%22name%22%3A%22Fit%22%7D%5D
   
and another short section in the old Reference Manual

   http://pmrb.free.fr/contextref.pdf#aut%3A957
   
There's also the Wiki page

   https://wiki.contextgarden.net/Floating_Objects
   
and the source code

   https://source.contextgarden.net/tex/context/base/mkxl/strc-flt.mklx
   
I haven't been able to find anything that really goes into the details
though. (If there's something that I'm missing here, please let me know!
I've been looking for awhile now)

> Maybe I'm missing out on something fundamental...

At the TeX level, floats are known as \insert's/insertions. The end of
Chapter 15 in The TeXbook goes into detail here. TeX By Topic also has a
good description in Chapter 29

   https://texdoc.org/serve/texbytopic/0#chapter.29
   
Then there's also Low Level TeX which documents the changes in LMTX

   https://www.pragma-ade.com/general/manuals/lowlevel-inserts.pdf
   
Inserts are (in my opinion) the most complicated part of TeX. Even at an
engine level, they aren't that well documented. When writing the
footnote code for lua-widow-control, I had to read through "TeX the
program" since some of the details weren't documented anywhere else.

And as Peter mentioned, if you post a specific example someone will
probably come along and help.

-- Max
___
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] [m-database] How to properly add module arguments?

2023-02-25 Thread Paul Mazaitis via ntg-context
Dear list,

## The Incredibly Short Version

I am trying to extend m-database, and I want to add a flag to control behavior. 
I can get it to work, but I am having trouble understanding how to do it 
properly.

## The Short Version

I have a project where I wish to incorporate many CSV files as Natural Tables.

I want to keep the headers in the CSV files so they're useful in other contexts.

The `m-database` module doesn't have a feature to suppress the header row, from 
what I can see.

(I know `handlecsv` can do this, but I'm having troubles with that; if the 
`m-database` line of inquiry doesn't work out, I'll go back it, but I figure 
I'll focus on this solution for now.)

Looking at the module sources, I can implement the functionality I need in the 
Lua part of the module, but:

I seem to only be able to bodge in additional arguments for the commands in the 
module.

On first try, I got the error: `tex error   > tex error on line 30 in file 
/Users/pmazaitis/Opt/context/tex/texmf-context/tex/context/modules/mkiv/m-databaseplus.mkiv:
 ! Undefined control sequence`

And then: `The control sequence at the end of the top line of your error 
message was never
\def'ed.`

Looking at the docs points me to a solution using  `\def`, but it's not clear 
to me how that's working in the case of the database module (the database 
module seems to be initializing these values someplace else?).

If I \def the settings variable in m-database.mkiv,  I can get it to work, but 
I don't think that's the correct way to go about this.

Question: how do I properly define new module arguments for the database module?

## The Long Version, With MWE

### Files Associated With the MWE

Apologies for all of the file inclusions, but I want to be complete.


Here's the .csv file I'm using for the MWE:

--- begin database-mwe.csv ---

Ref. No.,Part No.,Description,Remarks
,RD14C82E000J,Carbon 000흮 ±5% 1/4W,

---  end database-mwe.csv  ---

Some notes on database-mwe.csv:

I'd like to keep the header row in place to make this file useful for other 
tools.

These are lists of electronic parts, so I'd like to include uppercase omega, 
lower case mu, and percent sign characters in the CSV file.


Here's the .tex file I'm using for the MWE:

--- begin database-mwe.tex ---

\usemodule[database]

\setupdatabase[quotechar={"},separator={,}]

\defineseparatedlist
  [PartsTable]
  [separator=comma,left=\bTD,right=\eTD,first=\bTR,last=\eTR,before={
\bTABLE[split=repeat,option=stretch]
  \bTABLEhead
  \bTR
\bTH Ref. No. \eTH \bTH Part No. \eTH \bTH Description \eTH \bTH Remarks 
\eTH
  \eTR
  \eTABLEhead
  \bTABLEbody
   },
   after={
  \eTABLEbody
  \eTABLE
   }]

\starttext

test

\startasciimode
\processdatabasefile[PartsTable][parts_list-test.csv]
\stopasciimode

\stoptext

---  end database-mwe.tex  ---

Some notes on database-mwe.tex:

This actually works pretty well with the distributed m-database module!

Some of these lists are quite long, so I want to use a TABLEhead to replicate 
the headings at the top of a new page. I don't think there's a way to automate 
this with `m-database`, so I'm okay with hard-coding the headers. This does 
mean I get a double header row at the top of the table. I want to suppress the 
header row; I'd like to implement this behavior in the module behind a switch.

(I'm using the `asciimode` environment to dodge problems with unescaped `%` 
characters and Greek letters. I tried adding the startasciimode/stopasciimode 
commands to various keys in the \defineseparatedlist command, but I didn't get 
anywhere with it - I got errors. A problem for another time...)

I think I've got a good handle on how to do this in Lua, but I'm struggling 
with what to add to the switch appropriately.

In attempting to add a switch, I tried the following.

Based off of https://wiki.contextgarden.net/Modules#Modules_writing_guidelines,
I added a stanza to the appropriate interface file:

--- begin stanza added to i-database.xml ---






---  end stanza added to i-database.xml  ---

I modeled that after the stanza for the argument `strip`. I think that's the 
only thing I need to do in the interface file.

Changing the i-database.xml file does not break the build.

However, as soon as I add the skipheader argument to the m-database.mkiv file:

--- begin definition in m-database.mkiv ---

\setupdatabase
  [\c!separator={,},
   \c!quotechar=,
   \c!commentchar=,
   \c!strip=\v!no,
   \c!skipheader=\v!no, % <- Added, following the pattern with strip
   \c!before=,
   \c!after=,
   \c!first=,
   \c!last=,
   \c!left=,
   \c!right=]

---  end definition in m-database.mkiv  ---


...the build fails (with the error from the Short Version section).

If I then add the following \def to m-database.mkiv before the \setupdatabase 
command:

\def\c!skipheader {skipheader}

...the build succeeds! I can now pass that settings value to m-database.l

Re: [NTG-context] How to add data from another PDF in index?

2023-02-24 Thread Alan Braslau via ntg-context
We are currently working on fixing cross-references as well as shared
register information between products in a ConTeXt project structure.
Much is possible, but not all is fully worked out.

My current use is a multi-volume book, sharing Tables of Contents
between the two volumes. As a teaser,

\placelist [part,chapter,section,subsection]
   [criterium=product,reference=VolumeII]

will include the TOC of VolumeII in product VolumeI.

Once we have this figured-out, I will have to create a wiki page.

Alan


On Fri, 24 Feb 2023 05:43:01 + (UTC)
Joel via ntg-context  wrote:

> I am making a textbook and workbook set.
> I have this custom index using this code, in both the textbook and
> workbook: %
> \defineregister[learnedshort][compress=yes]
> \setupregister[learnedshort][style=sansbold, textstyle=slanted, n=2,
> pagenumber=yes, indicator=no] %
> \defineregister[learnedlong][compress=yes]
> \setupregister[learnedlong][style=sansbold, textstyle=slanted, n=2,
> pagenumber=yes, indicator=no] %
> \define[1]\learnedis{%
>     \txt{} \getvalue{#1}
>     \learnedshort{#1}
>     \learnedlong{#1}
> }
> \define[1]\learned{%
>     \learnedshort{#1}
>     \learnedlong{\getvalue{#1}}
> }
> 
> \starttext
> 
> \learnedis{blah blah}
> 
> \input knuth
> 
> \learnedis{some more}
> 
> 
>     \startchapter[title=Standards]
>         \placelearnedshort
>     \stopchapter
>     
> \stoptext
> 
> 
> My question is, can I have references to the Workbook page numbers in
> the textbook? And visa-versa?
> 
> For instance, the Textbook index currently looks like this:
> -
> Standards
> blah blah 1
> some more 2
> --
> With the data in the Workbook it might look like this:
>  Standards
> blah blah 1, WB: 1, 3-8
> 
> some more 2, WB: 8-9
> yet more WB: 10, 12
> 
> --
> Is this possible to merge index information like this?
> --Joel



-- 
Alan Braslau
816 West Mountain Avenue
Fort Collins, CO 80521 USA
mobile: (970) 237-0957

Conserve energy! ;-)
___
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 prevent \subject from being the last line

2023-02-20 Thread Sylvain Hubert via ntg-context
Thanks, Pablo and Bruce. Both solutions work well.

> I had similar issues with \section and only the Latin script was involved.

Btw, just in case if anyone shares this idea: is it possible to have a
zulip channel for ConTeXt? It's free for open source projects, has a
interface for existing mailing lists, and has a reasonable builtin search
engine, which could serve as another de-facto documentation, considering
the fact that very few of the massive useful use cases asked in the mailing
lists so far have been transcribed into official documentations.

On Mon, 20 Feb 2023 at 05:22, Pablo Rodriguez via ntg-context <
ntg-context@ntg.nl> wrote:

> On 2/19/23 20:34, Sylvain Hubert via ntg-context wrote:
> > Dear list,
> >
> > I have a long document (A4 * 170 pages) with some CJK fonts, where some
> > of the \subject{...} are placed at the end of the corresponding pages,
> > which looks awkward. How can one flush those last-line titles to the
> > next pages?
>
> Hi Sylvain,
>
> the hard part for the rest of us is figuring out what you may have on
> your screen.
>
> \setuphead[subject][before={\blank[preference]}] might help.
>
> Another approach would be \setuphead[subject][after={\blank[samepage,
> line]}].
>
> I mean, either you set a preference for breaking pages before \subject
> or you force \subject to be on the same page with next paragraph.
>
> Nothing prevents you from doing both.
>
> BTW, default values for before and after in \setuphead[subject] are
> \blank[2*big] and \blank (respectively [copied from strc-def.mkxl]).
>
> > Currently I don't have a MWE, as trivial filling-up with 1-2 pages of
> > \lipsum doesn't reproduce the problem. I'm optimistically asking without
> > MWE, but if it is necessary anyway, please tell me and I will obfuscate
> > the 170-page document and find a way to upload it.
>
> I hope it might help. It is not clear for me whether the CJK fonts are
> only for fragments in these languages or the main text is written in any
> of these languages.
>
> I had similar issues with \section and only the Latin script was involved.
>
> Again, I hope it might help,
>
> 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
>
> ___
>
___
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 prevent \subject from being the last line

2023-02-19 Thread Pablo Rodriguez via ntg-context
On 2/19/23 20:34, Sylvain Hubert via ntg-context wrote:
> Dear list,
> 
> I have a long document (A4 * 170 pages) with some CJK fonts, where some
> of the \subject{...} are placed at the end of the corresponding pages,
> which looks awkward. How can one flush those last-line titles to the
> next pages?

Hi Sylvain,

the hard part for the rest of us is figuring out what you may have on
your screen.

\setuphead[subject][before={\blank[preference]}] might help.

Another approach would be \setuphead[subject][after={\blank[samepage,
line]}].

I mean, either you set a preference for breaking pages before \subject
or you force \subject to be on the same page with next paragraph.

Nothing prevents you from doing both.

BTW, default values for before and after in \setuphead[subject] are
\blank[2*big] and \blank (respectively [copied from strc-def.mkxl]).

> Currently I don't have a MWE, as trivial filling-up with 1-2 pages of
> \lipsum doesn't reproduce the problem. I'm optimistically asking without
> MWE, but if it is necessary anyway, please tell me and I will obfuscate
> the 170-page document and find a way to upload it.

I hope it might help. It is not clear for me whether the CJK fonts are
only for fragments in these languages or the main text is written in any
of these languages.

I had similar issues with \section and only the Latin script was involved.

Again, I hope it might help,

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
___


[NTG-context] setupregister/placeregister

2023-02-10 Thread Alan Braslau via ntg-context
Hello,

The criterium key in setupregister (so placeregister, placeindex, ...)
takes the following values:
criterium   local text current previous all section

all: places all entries of the document
section: (part, chapter, section, ...) places entries associated with
that structure element.

Can someone explain local, text, current, previous
for their scope and perhaps subtle differences are not entirely obvious
to me.

Thank you

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
___


Re: [NTG-context] autospacing and colonequals (was Lucida-1.901 (2023-01-21) available)

2023-01-26 Thread Otared Kavian via ntg-context
Hi Hans and Mikael,

Thank you both for your attention to my reply and the clarification and hints 
regarding the comman \colonequals and 
\setupmathematics[autospacing=yes]

Indeed the command \colonequals give the precise expected alignment for the 
combination glyph « := ». Befors changing the combination « := » to 
\columnequals in my documents, I am wondering whether one could add a small lua 
code in order to make an automatic replacement at run time. Actually, since I 
don’t know of any other instance in which the combination « := » is used to 
mean something else, would it not be reasonnable to make « := » synonym to 
\colonequals?

I played a little bit with 
\setupmathematics[autospacing=yes]
and it seems to me that without this command one gets automatic spacing in math 
mode, while with the above command the spacing obeys what has been inserted in 
the source. Is this behaviour intended, or is there a mismatch between 
\setupmathematics[autospacing=yes]
and
\setupmathematics[autospacing=no]

Best regards: Otared


> On 26 Jan 2023, at 10:33, Hans Hagen via ntg-context  <mailto:ntg-context@ntg.nl>> wrote:
> 
> On 1/25/2023 6:24 PM, Mikael Sundqvist via ntg-context wrote:
>> On Wed, Jan 25, 2023 at 11:02 AM Otared Kavian via ntg-context
>> mailto:ntg-context@ntg.nl>> wrote:
>>> 
>>> Hi,
>>> 
>>> Thanks Hraban for the information and the link to the article by Hans and 
>>> Mikael about the math fonts in Lucida.
>>> 
>>> I very much appreciated that article: one sees how the handling of almost 
>>> impercebtile details in ConTeXt make us to adhere to and love LuaMetaTeX… 
>>> So a great thank you to Hans and Mikael for all this work!
>>> 
>>> Regarding the details of vertical alignment in math, I wonder whether the 
>>> column « : » in front of the equal sign « = », in the combination « := » 
>>> (used to define for instance a new variable) should be alos centered around 
>>> the math axis, as explained in the article. For instance in the following 
>>> example
>>> 
>>> \setupbodyfont[lucidaot,12pt]
>>> \starttext
>>> \startformula
>>> f(x) := -(u|x) := - \langle u, x \rangle
>>> \stopformula
>>> \stopformula
>>> \startformula
>>> f : A \longrightarrow B
>>> \stopformula
>>> \stoptext
>>> 
>>> it seems to me that the lower dot (or square…) in the semicolumn of the 
>>> first formula (in front of the equal sign) is lower than in the second 
>>> formula.
>>> 
>>> Best regards: Otared
>> Thank you for the kind words, Otared,
>> Regarding the colons (and other symbols with "dots"), I would say it
>> is still not optimal in Lucida (and difficult to make it "consistent",
>> there are too many symbols that are at the moment different). But in
>> your example you can use \colonequals and \colon if you prefer. They
>> are centered around the math axis.
>> Best, Mikael
>> \setupbodyfont[lucidaot,12pt]
>> \starttext
>> \startformula
>> f(x) := -(u|x) \colonequals - \langle u, x \rangle
>> \stopformula
>> \startformula
>> f : A \longrightarrow B \breakhere
>> f \colon A \longrightarrow B
>> \stopformula
>> \startformula
>> \mathaxisbelow := \colonequals : \colon
>> \stopformula
>> \stoptext
> There is a (experimental as we played with it and then got distracted) 
> feature that makes some symbols adapt to spacing in the input.
> 
> \starttext
> 
>\setupmathematics[autospacing=yes]
> 
>\setupmathematics[collapsing=2]
> 
>\im{A:B} and \im{A : B}\par
>\im{A:=B} and \im{A := B}\par
>\im{A\colonequals B} and \im{A {\colonequals} B}\par
> 
> \stoptext
> 
> the second line is not yet ok as collapsing the := (old feature) comes at the 
> wrong time when we do autospacing (something Mikasl and I now need to discuss 
> and test)
> 
> This autospacing is part of some larger effort, for instance we can also auto 
> handle fences and so. All this relates to minimizing the input and make it a 
> bit more natural. Think (1,2) vb (1, 2) where we - due to the many more 
> classes that we have - want spacing to be right.
> 
> All will be revealed in the upcoming releases and the upcoming 3145 page math 
> manual.
> 
> Hans
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> |

Re: [NTG-context] Lucida-1.901 (2023-01-21) available

2023-01-26 Thread Hans Hagen via ntg-context

On 1/25/2023 6:24 PM, Mikael Sundqvist via ntg-context wrote:

On Wed, Jan 25, 2023 at 11:02 AM Otared Kavian via ntg-context
 wrote:


Hi,

Thanks Hraban for the information and the link to the article by Hans and 
Mikael about the math fonts in Lucida.

I very much appreciated that article: one sees how the handling of almost 
impercebtile details in ConTeXt make us to adhere to and love LuaMetaTeX… So a 
great thank you to Hans and Mikael for all this work!

Regarding the details of vertical alignment in math, I wonder whether the 
column « : » in front of the equal sign « = », in the combination « := » (used 
to define for instance a new variable) should be alos centered around the math 
axis, as explained in the article. For instance in the following example

\setupbodyfont[lucidaot,12pt]
\starttext
\startformula
f(x) := -(u|x) := - \langle u, x \rangle
\stopformula
\stopformula
\startformula
f : A \longrightarrow B
\stopformula
\stoptext

it seems to me that the lower dot (or square…) in the semicolumn of the first 
formula (in front of the equal sign) is lower than in the second formula.

Best regards: Otared


Thank you for the kind words, Otared,

Regarding the colons (and other symbols with "dots"), I would say it
is still not optimal in Lucida (and difficult to make it "consistent",
there are too many symbols that are at the moment different). But in
your example you can use \colonequals and \colon if you prefer. They
are centered around the math axis.

Best, Mikael

\setupbodyfont[lucidaot,12pt]
\starttext
\startformula
f(x) := -(u|x) \colonequals - \langle u, x \rangle
\stopformula
\startformula
f : A \longrightarrow B \breakhere
f \colon A \longrightarrow B
\stopformula
\startformula
\mathaxisbelow := \colonequals : \colon
\stopformula
\stoptext
There is a (experimental as we played with it and then got distracted) 
feature that makes some symbols adapt to spacing in the input.


\starttext

\setupmathematics[autospacing=yes]

\setupmathematics[collapsing=2]

\im{A:B} and \im{A : B}\par
\im{A:=B} and \im{A := B}\par
\im{A\colonequals B} and \im{A {\colonequals} B}\par

\stoptext

the second line is not yet ok as collapsing the := (old feature) comes 
at the wrong time when we do autospacing (something Mikasl and I now 
need to discuss and test)


This autospacing is part of some larger effort, for instance we can also 
auto handle fences and so. All this relates to minimizing the input and 
make it a bit more natural. Think (1,2) vb (1, 2) where we - due to the 
many more classes that we have - want spacing to be right.


All will be revealed in the upcoming releases and the upcoming 3145 page 
math manual.


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
___


[NTG-context] Printing mailing list labels

2023-01-25 Thread Bruce Horrocks via ntg-context
If you've ever struggled with Word's or (worse) LibreOffice's mail merge 
features to print a mailing list onto sticky labels then this might be of 
interest.

I've created some macros and an example file showing how to print address 
labels on Avery L7160 paper (which is 7 rows of 3 labels on A4) and uploaded 
them here.
<https://context-address-labels.sourceforge.io/>

Features:
- full control over label content (can even differ from one label to the next 
if necessary)
- easily use up a part-used sheet of labels to avoid waste
- read address data from a CSV file
- easily support different address formats for different international 
destinations
- option to preview on plain paper
- even label your labels in the page header so you remember why you printed 
them!


No licence - the files are placed in the public domain. Feedback welcome.
—
Bruce Horrocks
Hampshire, UK

___
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] question about multimedia renderings

2023-01-16 Thread Pablo Rodriguez via ntg-context
en
setn, setr, setd = set[1], set[1], set[2]
else
setn, setr, setd = set[1], set[2], set[3]
end
local appearance = pdfdictionary {
N = setn and registeredsymbol(setn),
R = setr and registeredsymbol(setr),
D = setd and registeredsymbol(setd),
}
local appearanceref = pdfshareobjectreference(appearance)
return nil, appearanceref
end
end

local function analyzenormalsymbol(symbol)
local appearance = pdfdictionary {
N = registeredsymbol(symbol),
}
local appearanceref = pdfshareobjectreference(appearance)
return appearanceref
end

codeinjections.analyzesymbol   = analyzesymbol
codeinjections.analyzenormalsymbol = analyzenormalsymbol

local function analyzelayer(layer)
-- todo:  (specification.layer ~= "" and pdfreference(specification.layer)) 
or nil, -- todo: ref to layer
end

local function analyzecolor(colorvalue,colormodel)
local cvalue = colorvalue and tonumber(colorvalue)
local cmodel = colormodel and tonumber(colormodel) or 3
return cvalue and pdfarray { pdfcolorvalues(cmodel,cvalue) } or nil
end

local function analyzetransparency(transparencyvalue)
local tvalue = transparencyvalue and tonumber(transparencyvalue)
return tvalue and pdftransparencyvalue(tvalue) or nil
end

-- Attachments

local nofattachments= 0
local attachments   = { }
local filestreams   = { }
local referenced= { }
local ignorereferenced  = true -- fuzzy pdf spec .. twice in attachment list, 
can become an option
local tobesavedobjrefs  = utilities.storage.allocate()
local collectedobjrefs  = utilities.storage.allocate()
local permitted = true
local enabled   = true

function codeinjections.setattachmentsupport(option)
if option == false then
permitted = false
enabled   = false
end
end

local fileobjreferences = {
collected = collectedobjrefs,
tobesaved = tobesavedobjrefs,
}

job.fileobjreferences = fileobjreferences

local function initializer()
collectedobjrefs = job.fileobjreferences.collected or { }
tobesavedobjrefs = job.fileobjreferences.tobesaved or { }
end

job.register('job.fileobjreferences.collected', tobesavedobjrefs, initializer)

local function flushembeddedfiles()
if enabled and next(filestreams) then
local e = pdfarray()
local f = pdfarray()
for tag, reference in sortedhash(filestreams) do
if not reference then
report_attachment("unreferenced file, tag %a",tag)
elseif referenced[tag] == "hidden" or referenced[tag] == "forced" 
then
e[#e+1] = pdfstring(tag)
e[#e+1] = reference -- already a reference
f[#f+1] = reference -- collect all file description references
else
-- messy spec ... when annot not in named else twice in menu 
list acrobat
f[#f+1] = reference
end
end
if #e > 0 then

lpdf.addtonames("EmbeddedFiles",pdfreference(pdfflushobject(pdfdictionary{ 
Names = e })))
end
if #f > 0 then -- PDF/A-2|3: all associated files must have a 
relationship to the PDF document (global or part)
lpdf.addtocatalog("AF", pdfreference(pdfflushobject(f))) -- global 
(Catalog)
end
end
end

lpdf.registerdocumentfinalizer(flushembeddedfiles,"embeddedfiles")

function codeinjections.embedfile(specification)
if enabled then
local data  = specification.data
local filename  = specification.file
local name  = specification.name or ""
local title = specification.title or ""
local hash  = specification.hash or filename
local keepdir   = specification.keepdir -- can change
local usedname  = specification.usedname
local filetype  = specification.filetype
local compress  = specification.compress
local mimetype  = specification.mimetype or specification.mime
if filename == "" then
filename = nil
end
if compress == nil then
compress = true
end
if data then
local r = filestreams[hash]
if r == false then
return nil
elseif r then
return r
elseif not filename then
filename = specification.tag
if not filename or filename == "" then
filename = specification.registered
end
if not filename or filename == "" then
filename = hash
end
end
else
if not filename then
return nil
end
local r = filestreams[hash]
if r == fa

Re: [NTG-context] question about multimedia renderings

2023-01-15 Thread Michal Vlasák via ntg-context
uot;Note"),
-- TextNote = pdfconstant("Text Note"),
-- UpArrow  = pdfconstant("Up Arrow"),
-- UpLeftArrow  = pdfconstant("Up-Left Arrow"),
-- }

local attachment_symbols = {
Graph = pdfconstant("Graph"),
Paperclip = pdfconstant("Paperclip"),
Pushpin   = pdfconstant("PushPin"),
}

attachment_symbols.PushPin = attachment_symbols.Pushpin
attachment_symbols.Default = attachment_symbols.Pushpin

function lpdf.attachmentsymbols()
return sortedkeys(comment_symbols)
end

local comment_symbols = {
Comment  = pdfconstant("Comment"),
Help = pdfconstant("Help"),
Insert   = pdfconstant("Insert"),
Key  = pdfconstant("Key"),
Newparagraph = pdfconstant("NewParagraph"),
Note = pdfconstant("Note"),
Paragraph= pdfconstant("Paragraph"),
}

comment_symbols.NewParagraph = Newparagraph
comment_symbols.Default  = Note

function lpdf.commentsymbols()
return sortedkeys(comment_symbols)
end

local function analyzesymbol(symbol,collection)
if not symbol or symbol == "" then
return collection and collection.Default, nil
elseif collection and collection[symbol] then
return collection[symbol], nil
else
local setn, setr, setd
local set = settings_to_array(symbol)
if #set == 1 then
setn, setr, setd = set[1], set[1], set[1]
elseif #set == 2 then
setn, setr, setd = set[1], set[1], set[2]
else
setn, setr, setd = set[1], set[2], set[3]
end
local appearance = pdfdictionary {
N = setn and registeredsymbol(setn),
R = setr and registeredsymbol(setr),
D = setd and registeredsymbol(setd),
}
local appearanceref = pdfshareobjectreference(appearance)
return nil, appearanceref
end
end

local function analyzenormalsymbol(symbol)
local appearance = pdfdictionary {
N = registeredsymbol(symbol),
}
local appearanceref = pdfshareobjectreference(appearance)
return appearanceref
end

codeinjections.analyzesymbol   = analyzesymbol
codeinjections.analyzenormalsymbol = analyzenormalsymbol

local function analyzelayer(layer)
-- todo:  (specification.layer ~= "" and pdfreference(specification.layer)) 
or nil, -- todo: ref to layer
end

local function analyzecolor(colorvalue,colormodel)
local cvalue = colorvalue and tonumber(colorvalue)
local cmodel = colormodel and tonumber(colormodel) or 3
return cvalue and pdfarray { pdfcolorvalues(cmodel,cvalue) } or nil
end

local function analyzetransparency(transparencyvalue)
local tvalue = transparencyvalue and tonumber(transparencyvalue)
return tvalue and pdftransparencyvalue(tvalue) or nil
end

-- Attachments

local nofattachments= 0
local attachments   = { }
local filestreams   = { }
local referenced= { }
local ignorereferenced  = true -- fuzzy pdf spec .. twice in attachment list, 
can become an option
local tobesavedobjrefs  = utilities.storage.allocate()
local collectedobjrefs  = utilities.storage.allocate()
local permitted = true
local enabled   = true

function codeinjections.setattachmentsupport(option)
if option == false then
permitted = false
enabled   = false
end
end

local fileobjreferences = {
collected = collectedobjrefs,
tobesaved = tobesavedobjrefs,
}

job.fileobjreferences = fileobjreferences

local function initializer()
collectedobjrefs = job.fileobjreferences.collected or { }
tobesavedobjrefs = job.fileobjreferences.tobesaved or { }
end

job.register('job.fileobjreferences.collected', tobesavedobjrefs, initializer)

local function flushembeddedfiles()
if enabled and next(filestreams) then
local e = pdfarray()
local f = pdfarray()
for tag, reference in sortedhash(filestreams) do
if not reference then
report_attachment("unreferenced file, tag %a",tag)
elseif referenced[tag] == "hidden" or referenced[tag] == "forced" 
then
e[#e+1] = pdfstring(tag)
e[#e+1] = reference -- already a reference
f[#f+1] = reference -- collect all file description references
else
-- messy spec ... when annot not in named else twice in menu 
list acrobat
f[#f+1] = reference
end
end
if #e > 0 then

lpdf.addtonames("EmbeddedFiles",pdfreference(pdfflushobject(pdfdictionary{ 
Names = e })))
end
if #f > 0 then -- PDF/A-2|3: all associated files must have a 
relationship to the PDF document (global or part)
lpdf.addtocatalog("AF", pdfreference(pdfflushobject(f))) -- global 
(

Re: [NTG-context] Ajami script

2023-01-01 Thread George N. White III via ntg-context
On Sun, Jan 1, 2023 at 2:14 PM BPJ via ntg-context 
wrote:

It's a bit confusing because the word ʿajamī simply means anything written
> in a non-Arabic language with Arabic script. Africa is certainly not the
> only place where that term has been used. It is also the case that Arabic
> script has been used to write West African languages for very many
> centuries. There is no way that guy can have grown up there and not know
> that so I don't understand what this article is up to. Possibly this is a
> separate adaptation using its own conventions for writing the local
> language. Probably just pop-sci sensationalism coupled with some rather
> severe mis-/non-understanding on the part of the article author.
>

I grew up in Northern New Mexico and now live in Canada, so know that
"educational" efforts
which suppressed non-European languages and writing systems were too often
imposed on
indigenous peoples in N. America.  It would not surprise me to learn that
some West African kids
were never exposed to "anything written in a non-Arabic language with
Arabic script".

-- 
George N. White III
___
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] Ajami script

2023-01-01 Thread BPJ via ntg-context
It's a bit confusing because the word ʿajamī simply means anything written
in a non-Arabic language with Arabic script. Africa is certainly not the
only place where that term has been used. It is also the case that Arabic
script has been used to write West African languages for very many
centuries. There is no way that guy can have grown up there and not know
that so I don't understand what this article is up to. Possibly this is a
separate adaptation using its own conventions for writing the local
language. Probably just pop-sci sensationalism coupled with some rather
severe mis-/non-understanding on the part of the article author.

Den sön 1 jan. 2023 14:30Alain Delmotte via ntg-context 
skrev:

> Le 1/01/2023 à 11:03, Henning Hraban Ramm via ntg-context a
> écrit :
> > Am 01.01.23 um 10:21 schrieb Hans Hagen via ntg-context:
> >> On 12/31/2022 3:06 PM, Henning Hraban Ramm via
> >> ntg-context wrote:
> >>> I just read this:
> >>>
> https://www.bu.edu/articles/2022/fallou-ngom-discovers-ajami-african-writing-system/
> >>>
> >>>
> >>> And now I’d like to know if ConTeXt is capable of
> >>> typesetting this variant of Arabic. (Just out of
> >>> curiosity, I can’t read any Arabic and don’t know any
> >>> African language.)
> >> Afaiks that script has been known fro a while:
> >
> > I also thought I heard about it several years ago. The
> > article makes it sound like news, that might be the
> > perspective of the US scholars or a necessary means to get
> > funded. But the oldest sources quoted in Wikipedia are
> > from 1971 and 1982.
>
> The arabic alphabet was also used from the XIth century to
> write swahili and some bantu languages around Tanzania and
> Kenya (Mozambic, Malawi, Uganda, east of Kongo, Sudan).
>
> There are articles in Wikipedia.
>
> https://fr.wikipedia.org/wiki/Alphabet_arabe_swahili
> https://en.wikipedia.org/wiki/Swahili_language#Orthography
>
> also: https://www.mustgo.com/worldlanguages/swahili/  see
> "writing"
> https://omniglot.com/writing/swahili.htm
>
> >> https://en.wikipedia.org/wiki/Ajami_script
> >> so when there are proper fonts, as:
> >> https://software.sil.org/scheherazade/
> >> https://software.sil.org/harmattan/
> >
> > I don’t dare to ask about the Husayni fonts... ;)
> >
> >> it should be doable. The script is supported by unicode.
> >> I get the impression that the arabic scipt is mostly used
> >> getting the way the languages sounds on paper so vowels
> >> matter. There is mentioning of transliteration and so
> >> that might need some specific support. Nothing tex
> >> (context) can't do but only users and usage can prove that.
> >
> > Thank you for your insights!
> > Of course it’s a matter of use(r)s.
> >
> > All the best for a happy new year!
> > 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
>
> ___
>
___
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] numbering questions

2022-12-31 Thread Henning Hraban Ramm via ntg-context

Am 31.12.22 um 20:41 schrieb Pablo Rodriguez via ntg-context:

On 12/31/22 18:23, Henning Hraban Ramm via ntg-context wrote:

I’m playing with some examples of section numbering.

* Is there a setup to influence the order of number segments? I.e. can I
have “section.chapter.part“ instead of “part.chapter.section”?


I thought sectionsegments=section:chapter would work, but it doesn’t.


* How can I format the segments, e.g. to get two or three digits each
(leading zeros)?


The easy part is to have the leading zeros, but I cannot get it working
with numbercommand or deepnumbercommand.

   \startluacode
   function document.leadingzeros(str)
 local lzeros = 3-str:len()
 return ("0"):rep(lzeros)
   end
   \stopluacode
   \unexpanded\def\lzeros#1%
 {\cldcontext{document.leadingzeros("#1")}}


Same. With numbercommand, Lua gets "\s and can’t handle it, with 
deepnumbercommand it gets "1-\m". Is this a catcode issue?




* I can force a section number with “ownnumber”, but the next one is
back in the previous scheme. Itemize has “start”. How can I start
section chapter numbering at 3 (or -1 or whatever; I know I can start at
0 with “zero”) and let ConTeXt continue from there?


\setupheadnumber[chapter][3] % will start with 4


Thank you, that works.


I hope it helps. »Einen guten Rutsch ins Neujahr!«


Dito!

(In proper German that would be just “Guten Rutsch” or “Guten Rutsch ins 
neue Jahr”; Neujahr ist just the name of the holiday.)


All the best,
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
___


Re: [NTG-context] numbering questions

2022-12-31 Thread Pablo Rodriguez via ntg-context
On 12/31/22 18:23, Henning Hraban Ramm via ntg-context wrote:
> I’m playing with some examples of section numbering.
> 
> * Is there a setup to influence the order of number segments? I.e. can I 
> have “section.chapter.part“ instead of “part.chapter.section”?

I thought sectionsegments=section:chapter would work, but it doesn’t.

> * How can I format the segments, e.g. to get two or three digits each 
> (leading zeros)?

The easy part is to have the leading zeros, but I cannot get it working
with numbercommand or deepnumbercommand.

  \startluacode
  function document.leadingzeros(str)
local lzeros = 3-str:len()
return ("0"):rep(lzeros)
  end
  \stopluacode
  \unexpanded\def\lzeros#1%
{\cldcontext{document.leadingzeros("#1")}}

> * I can force a section number with “ownnumber”, but the next one is 
> back in the previous scheme. Itemize has “start”. How can I start 
> section chapter numbering at 3 (or -1 or whatever; I know I can start at 
> 0 with “zero”) and let ConTeXt continue from there?

\setupheadnumber[chapter][3] % will start with 4

I hope it helps. »Einen guten Rutsch ins Neujahr!«

Happy New Year to all!

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

2022-12-21 Thread Pablo Rodriguez via ntg-context
lushing realpage 4, userpage 4, subpage 4
structures  > bookmark: [Dedicatoria]
structure   > sectioning > hiddentitle @ level 2 : 0.0 -> \xmlflush {main::29}
pages   > flushing realpage 5, userpage 5, subpage 5
pages   > flushing realpage 6, userpage 6, subpage 6
structures  > bookmark: [Cita]
structure   > sectioning > hiddentitle @ level 2 : 0.0 -> \xmlflush {main::35}
pages   > flushing realpage 7, userpage 7, subpage 7
pages   > flushing realpage 8, userpage 8, subpage 8
structures  > end of sectionblock 'whatcomesfirst'
structures  > begin of sectionblock 'whatcomesfirst'
structures  > begin of sectionblock 'tocpart'
structures  > bookmark: Sumario
structure   > sectioning > title @ level 2 : 0.0 -> \headtext {content}
pages   > flushing realpage 9, userpage 9, subpage 9
structures  > end of sectionblock 'tocpart'
pages   > flushing realpage 10, userpage 10, subpage 10
structures  > end of sectionblock 'whatcomesfirst'
structures  > begin of sectionblock 'frontpart'
structures  > bookmark: Prólogo
structure   > sectioning > forewordtitle @ level 2 : 0.0 -> \xmlflush {main::41}
pages   > flushing realpage 11, userpage 11, subpage 11
4:15:  [package: underfull \hbox (badness 1) in paragraph at lines 9--9]
pages   > flushing realpage 12, userpage 12, subpage 12
structures  > bookmark: Introducción
structure   > sectioning > part @ level 1 : 1 -> \xmlflush {main::61}
pages   > flushing realpage 13, userpage 13, subpage 13
pages   > flushing realpage 14, userpage 14, subpage 14
structures  > bookmark: Antes de comenzar
structure   > sectioning > chapter @ level 2 : 1.1 -> \xmlflush {main::63}
structures  > bookmark: ¿A quienes va dirigido?
structure   > sectioning > section @ level 3 : 1.1.1 -> \xmlflush {main::65}
structures  > bookmark: El punto de partida
structure   > sectioning > section @ level 3 : 1.1.2 -> \xmlflush {main::73}
pages   > flushing realpage 15, userpage 15, subpage 15
structures  > bookmark: ¿Qué es lo que hay?
structure   > sectioning > section @ level 3 : 1.1.3 -> \xmlflush {main::79}
pages   > flushing realpage 16, userpage 16, subpage 16
pages   > flushing realpage 17, userpage 17, subpage 17
pages   > flushing realpage 18, userpage 18, subpage 18
structures  > bookmark: Sólo una introducción
structure   > sectioning > chapter @ level 2 : 1.2 -> \xmlflush {main::120}
structures  > bookmark: El origen
structure   > sectioning > section @ level 3 : 1.2.1 -> \xmlflush {main::127}
pages   > flushing realpage 19, userpage 19, subpage 19
structures  > bookmark: El camino de los ejemplos
structure   > sectioning > section @ level 3 : 1.2.2 -> \xmlflush {main::159}
pages   > flushing realpage 20, userpage 20, subpage 20
pages   > flushing realpage 21, userpage 21, subpage 21
structures  > bookmark: Sobre este libro
structure   > sectioning > chapter @ level 2 : 1.3 -> \xmlflush {main::171}
structures  > bookmark: Estructura del texto
structure   > sectioning > section @ level 3 : 1.3.1 -> \xmlflush {main::173}
structures  > bookmark: Convenciones tipográficas
structure   > sectioning > section @ level 3 : 1.3.2 -> \xmlflush {main::192}
pages   > flushing realpage 22, userpage 22, subpage 22
structures  > bookmark: Agradecimientos
structure   > sectioning > section @ level 3 : 1.3.3 -> \xmlflush {main::218}
pages   > flushing realpage 23, userpage 23, subpage 23
pages   > flushing realpage 24, userpage 24, subpage 24
structures  > bookmark: Sobre la licencia de uso
structure   > sectioning > chapter @ level 2 : 1.4 -> \xmlflush {main::228}
structures  > bookmark: Uso no comercial
structure   > sectioning > section @ level 3 : 1.4.1 -> \xmlflush {main::237}
structures  > bookmark: Sin obra derivada
structure   > sectioning > section @ level 3 : 1.4.2 -> \xmlflush {main::249}
pages   > flushing realpage 25, userpage 25, subpage 25
structures  > bookmark: Sólo descarga
structure   > sectioning > section @ level 3 : 1.4.3 -> \xmlflush {main::254}
pages   > flushing realpage 26, userpage 26, subpage 26
structures  > bookmark: Un pacto de nobleza
structure   > sectioning > section @ level 3 : 1.4.4 -> \xmlflush {main::260}
structures  > bookmark: Comentarios
structure   > sectioning > section @ level 3 : 1.4.5 -> \xmlflush {main::278}
structures  > end of sectionblock 'fron

[NTG-context] OT: Adobe releases the original PostScript interpreter software as open source

2022-12-19 Thread Bruce Horrocks via ntg-context
A bit off topic but some might be interested...

Adobe have released the PostScript interpreter source code as open source.

Press release here
<https://www.globenewswire.com/news-release/2022/12/01/2566212/28639/en/Computer-History-Museum-Makes-Adobe-PostScript-s-Source-Code-Available-to-the-Public-as-a-Part-of-Its-Art-of-Code-Series.html>

and a blog post with the background to PostScript here
<https://computerhistory.org/blog/postscript-a-digital-printing-press/>

Regards,
—
Bruce Horrocks
Hampshire, UK

___
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] Command line arguments on context project

2022-12-19 Thread Aditya Mahajan via ntg-context
On Sun, 18 Dec 2022, Alan Braslau via ntg-context wrote:

> On Fri, 16 Dec 2022 16:14:33 +
> Jethro Djan via ntg-context  wrote:
> 
> > 2. How do I get CoTeXt to recognise the ref.bib file when I run the
> > components not the product?
> > 
> > For context, I don’t want the references printed at the end of each
> > chapter but I would like the in-text citation to work (if that is
> > possible). If not, is it possible compile the whole product but only
> > output a certain page range?
> 
> You need to include the \usebtxdataset [ref.bib] in an environment file
> that gets read each run.
> 
> A limitation, or rather a design goal, of the bibliography subsystem is
> that citations will not work unless you render the bibliography list.

You can, of course, cheat:

\setbox\scratchbox\vbox{\placelistofpublications}

> Why is this? The reasoning is that it makes no sense to give list
> numbers or list labels (e.g. APA : authoryear) if there is no list, for
> these numbers or labels depend on the context (bibliography by chapter,
> by part, by volume, or by book, for example).

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] Command line arguments on context project

2022-12-18 Thread Alan Braslau via ntg-context
On Fri, 16 Dec 2022 16:14:33 +
Jethro Djan via ntg-context  wrote:

> 2. How do I get CoTeXt to recognise the ref.bib file when I run the
> components not the product?
> 
> For context, I don’t want the references printed at the end of each
> chapter but I would like the in-text citation to work (if that is
> possible). If not, is it possible compile the whole product but only
> output a certain page range?

You need to include the \usebtxdataset [ref.bib] in an environment file
that gets read each run.

A limitation, or rather a design goal, of the bibliography subsystem is
that citations will not work unless you render the bibliography list.
Why is this? The reasoning is that it makes no sense to give list
numbers or list labels (e.g. APA : authoryear) if there is no list, for
these numbers or labels depend on the context (bibliography by chapter,
by part, by volume, or by book, for example).

We have not done much with same page, footnote bibliographic
references. I do not use that style as I always like having a
bibliography list.


Best is to compile the entire product and then use some tool (qpdf,
pdftk, etc.) to select out a certain range of pages. ConTeXt has gotten
fast enough that this should not be a real problem.

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
___


Re: [NTG-context] Structure: multi-volume products

2022-12-18 Thread Alan Braslau via ntg-context
On Fri, 16 Dec 2022 06:57:44 -0700
Alan Braslau via ntg-context  wrote:

> On Fri, 16 Dec 2022 09:08:47 +
>  wrote:
> 
> > Last time I had to do something like this I've kept both books in
> > one master file (actually one master file for part 1, one for part
> > 2, one for both together). With that I could easiliy have a table of
> > contents for both volumes.  
> 
> Thank you. This was my initial approach, although I know that ConTeXt
> can do better!
> 
> I will look into the suggestion sent by Richard Mahoney, as it looks
> like a good solution to the problem.

In fact, Richard does NOT render the TOC of Volume 2 in Volume 1, nor
the TOC of Volume 1 in Volume 2, only the TOC of each volume,
respectively.




I have tried using

\useexternalfile [VolI] [Book_VolumeI] [{Volume I}]

(in Book_VolumeII.tex) to read in the Book_VolumeI.tuc


With this, I can indeed use

\from [VolI]

to add the file::Book_VolumeI.pdf hyperlink with the text "Volume I".

However, \in{Chapter} [VolI::ch:mychapterreference] gives no number
(but ?? does not get substituted and VolII::ch:mychapterreference does
NOT return a missing reference message in the Book_VolumeII.log file).

Alan


P.S.
Once that works, maybe I can figure out how to render the TOC.
I would expect/hope that

\placecontents [criterium=VolI::all]

would be the way to go.
___
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] Structure: multi-volume products

2022-12-16 Thread Richard Mahoney | Indica et Buddhica via ntg-context
Alan,

I'm attaching the two master files used for the following (also ran
cross refs between
each vol.):

Murugaiyan, Appasamy & Parlier-Renault, Édith (2021) (Eds) Whispering
of Inscriptions:
South Indian Epigraphy and Art History: Papers from an International
Symposium in
memory of Professor Noboru Karashima (Paris, 12–13 October 2017).
Oxford: Indica et
Buddhica. (2 vols)

https://indica-et-buddhica.com/publications/murugaiyan-appasamy-parlier-renault-edith/whispering-of-inscriptions-south-indian-epigraphy-and-art-history


Best, Richard


-- 
T +6433121699  M +64210640216
rmaho...@indica-et-buddhica.org
https://indica-et-buddhica.com/

Indica et Buddhica
Littledene  Bay Road  Oxford  NZ
NZBN: 9429041761809


-Original Message-
From: Alan Braslau via ntg-context 
Reply-To: mailing list for ConTeXt users 
To: mailing list for ConTeXt users 
Cc: Alan Braslau 
Subject: [NTG-context] Structure: multi-volume products
Date: Thu, 15 Dec 2022 20:23:36 -0700
Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.1)
X-Spam-Score: 0.0

Hello,

I have a book project that is being cut into two volumes (because it
is
too long and will be sold as a boxed set).

Each volume is presently a separate *product* in the project
structure.
I presently set the counters in the second volume using:

\setupheadnumber
  [part] [2]

\setupheadnumber
  [chapter] [5]

(I have multiple [5] parts in the project, and the first volume ends
with part 2 and chapter 5.)


1) Is this the right way to be handling this?

2) Any suggestions on how I can put a Table of Contents for the first
volume in the second volume?

Thanks!

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

% master000.tex – ConTeXt MkIV Module

\startproduct master000

\project iebpmonographs

\environment ieb-c-layout-000

\environment monograph-local-layout

\usemodule[statistical-charts]

% \enabletrackers[typesetters.suspects]

% \showbodyfont

% \showbodyfontenvironment

\useexternaldocument[m001][master001][Whispering of Inscriptions,
Vol.~{\sc ii}]


\startfrontmatter

\component tlpg000

{

\setupheadtext[content=Contents of Vol.~i.]

\setupheadertexts[Contents of
Vol.~i.][pagenumber][pagenumber][Contents of Vol.~i.]

\noheaderandfooterlines

\completecontent

\PY

\PB

}

{

\setupheadtext[tables=Tables of Vol.~i.]

\setupheadertexts[Tables of Vol.~i.][pagenumber][pagenumber][Tables
of Vol.~i.]

\noheaderandfooterlines

\completelistoftables

\PY

\PB

}

{

\setupheadtext[figures=Figures of Vol.~i.]

\setupheadertexts[Figures of Vol.~i.][pagenumber][pagenumber][Figures
of Vol.~i.]

\noheaderandfooterlines

\completelistoffigures

\PY

}

\component ackn % A. Murugaiyan & E. Parlier-Renault

\component pref % A. Murugaiyan & E. Parlier-Renault

\component intr % Y. Subbarayalu

\stopfrontmatter


\startbodymatter

\setcounter[userpage][1]

\component chp02 % Y. Subbarayalu

\component chp01 % V. Gillet

\component chp03 % G. Vijayavenugopal

\component chp04 % E. Francis

\component chp05 % N. Athiyaman

\component chp06 % V. Selvakumar

\component chp07 % S. Rajavelu

\component chp08 % A. Murugaiyan

\component chp09 % S. Brocquet

\stopbodymatter


% \startbackmatter

% \component indx

% \stopbackmatter


\stopproduct
% master001.tex – ConTeXt MkIV Module

\startproduct master001

\project iebpmonographs

\environment ieb-c-layout-001

\environment monograph-local-layout

% \enabletrackers[typesetters.suspects]

% \showbodyfont

% \showbodyfontenvironment

\useexternaldocument[m000][master000][Whispering of Inscriptions,
Vol.~{\sc i}]


\startfrontmatter

\component tlpg001

{

\setupheadtext[content=Contents of Vol.~ii.]

\setupheadertexts[Contents of
Vol.~ii.][pagenumber][pagenumber][Contents of Vol.~ii.]

\noheaderandfooterlines

\completecontent

\PY

\PB

}

{

\setupheadtext[tables=Tables of Vol.~ii.]

\setupheadertexts[Tables of Vol.~ii.][pagenumber][pagenumber][Tables
of Vol.~ii.]

\noheaderandfooterlines

\completelistoftables

\PY

\PB

}

{

\setupheadtext[figures=Figures of Vol.~ii.]

\setupheadertexts[Figures of
Vol.~ii.][pagenumber][pagenumber][Figures of Vol.~ii.]

\noheaderandfooterlines

\completelistoffigures

\PY

}

\stopfrontmatter


\startbodymatter

\setcounter[userpage][1]

\component chp10 % P. Estienne

\component chp11 % V. Renganathan

\component chp12 % C. Schmid

\component chp13 % K. Rajan

\component chp14 % A. Davrinche

\component chp15 % M. Le Sauce-Carnis

\component chp16 % V. Olivier

\component chp17 % K. Ladrech

\component chp18 % E. Par

Re: [NTG-context] Structure: multi-volume products

2022-12-16 Thread Denis Maier via ntg-context
What was his approach? Did he probably send it off-list?

> -Ursprüngliche Nachricht-
> Von: Alan Braslau 
> Gesendet: Freitag, 16. Dezember 2022 14:58
> An: Maier, Denis Christian (UB) 
> Cc: ntg-context@ntg.nl
> Betreff: Re: [NTG-context] Structure: multi-volume products
> 
> On Fri, 16 Dec 2022 09:08:47 +
>  wrote:
> 
> > Last time I had to do something like this I've kept both books in one
> > master file (actually one master file for part 1, one for part 2, one
> > for both together). With that I could easiliy have a table of contents
> > for both volumes.
> 
> Thank you. This was my initial approach, although I know that ConTeXt can do
> better!
> 
> I will look into the suggestion sent by Richard Mahoney, as it looks like a 
> good
> solution to the problem.
> 
> Alan
> 
> --
> Alan Braslau
> 816 West Mountain Avenue
> Fort Collins, CO 80521 USA
> mobile: (970) 237-0957
> 
> Conserve energy! ;-)
___
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] Structure: multi-volume products

2022-12-16 Thread Alan Braslau via ntg-context
On Fri, 16 Dec 2022 09:08:47 +
 wrote:

> Last time I had to do something like this I've kept both books in one
> master file (actually one master file for part 1, one for part 2, one
> for both together). With that I could easiliy have a table of
> contents for both volumes.

Thank you. This was my initial approach, although I know that ConTeXt
can do better!

I will look into the suggestion sent by Richard Mahoney, as it looks
like a good solution to the problem.

Alan

-- 
Alan Braslau
816 West Mountain Avenue
Fort Collins, CO 80521 USA
mobile: (970) 237-0957

Conserve energy! ;-)
___
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] Structure: multi-volume products

2022-12-16 Thread Denis Maier via ntg-context
Last time I had to do something like this I've kept both books in one master 
file (actually one master file for part 1, one for part 2, one for both 
together). With that I could easiliy have a table of contents for both volumes.

I've made some experiments with writing stuff to the logs or tuc file 
(\writestatus{SPLITPOINT}{\the\realpageno}) at the end of part 1, which I then 
wanted to process with a script (e.g., read the page number, use pdftk to split 
the complete PDF at this point to get PDFs for the individual volumes). 
However, at the end I've just had to send the PDF containing both volumes to 
the publisher as they performed the splitting up themselves.

Best,
Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Alan Braslau
> via ntg-context
> Gesendet: Freitag, 16. Dezember 2022 04:24
> An: mailing list for ConTeXt users 
> Cc: Alan Braslau 
> Betreff: [NTG-context] Structure: multi-volume products
> 
> Hello,
> 
> I have a book project that is being cut into two volumes (because it is too
> long and will be sold as a boxed set).
> 
> Each volume is presently a separate *product* in the project structure.
> I presently set the counters in the second volume using:
> 
> \setupheadnumber
>   [part] [2]
> 
> \setupheadnumber
>   [chapter] [5]
> 
> (I have multiple [5] parts in the project, and the first volume ends with 
> part 2
> and chapter 5.)
> 
> 
> 1) Is this the right way to be handling this?
> 
> 2) Any suggestions on how I can put a Table of Contents for the first volume
> in the second volume?
> 
> Thanks!
> 
> 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
> 
> ___
___
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] Structure: multi-volume products

2022-12-15 Thread Alan Braslau via ntg-context
Hello,

I have a book project that is being cut into two volumes (because it is
too long and will be sold as a boxed set).

Each volume is presently a separate *product* in the project structure.
I presently set the counters in the second volume using:

\setupheadnumber
  [part] [2]

\setupheadnumber
  [chapter] [5]

(I have multiple [5] parts in the project, and the first volume ends
with part 2 and chapter 5.)


1) Is this the right way to be handling this?

2) Any suggestions on how I can put a Table of Contents for the first
volume in the second volume?

Thanks!

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
___


Re: [NTG-context] \hpos in math - Half solved

2022-12-08 Thread Hans Hagen via ntg-context

On 12/8/2022 8:54 PM, Otared Kavian via ntg-context wrote:

Hi Hans, Mikael,

These features are amazing! Many many thanks!
Thanks also to Gavin for having stated so precisely these kinds of needs, so 
that Hans and Mikael could come up with this solution.
Gavin, good luck with your project, and plaese share what you get at the end.
For the record: this features is already there for a while, we also have 
some matrix specific trickery as well as for instance annotated fences 
and so. However, the interfaces will evolve and eventually get 
documented in the upcoming (big) math manual. It's mostly a matter of 
consistent interfacing i.e. it has to fit into the way we do things in 
context (it's of course easy to come up with a quick and dirty ugly non 
extensible and non standard interface).


What is new in the latest greatest is (1) namespaces, so that one can 
reuse the references, which Gavin needs, and (2) sourcing a nucleus 
and/or the whole atom including scripts, which Gavin also needs. Some 
more granularity might show up depending on needs. As some depends on 
the tex engine there are limitations (performance, memory and complexity 
constraints: adding features like these might definitely not impact 
performance).


Source and target properties were added in order to avoid interference 
with math spacing but can also be used in text, where they are part of 
the larger package of box properties that was already around.


\startTEXpage[offset=2cm]

\setbox 0 \ruledhbox
source  123
anchors 1 2
{one}
\setbox 2 \ruledhbox
target 123
{test 1}

\dontleavehmode \box2 \box0

\setbox 0 \ruledhbox
target  124
orientation 2
anchors 1 4
xoffset-10pt
{two}
\setbox 2 \ruledhbox
source 124
{test 2}

\dontleavehmode \box2 \box0

\stopTEXpage

With sources and targets one has to keep in mind that they don't 
participate in the box dimensions! Although excessive usage puts some 
strain on the backend in practice it probably goes unnoticed.  Also, be 
careful with the source and target id's! There is currently no low level 
allocation mechanism so stick to positive numbers.


So, lots to play with, if you're in the mood,

Hans

(There is quite some experimental code around but to what extend it ends 
up in the core depends on demand, time, motivation etc. As you can 
guess, Mikael and I having a lot of math fun is motivating.)


-
  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] \hpos in math - Half solved

2022-12-07 Thread Gavin via ntg-context
Hi Hans and Mikael,

This is amazing! Mikael's example works for me. I will start using these tools 
in my project, and I’ll tell you how it goes. It might be a couple weeks, 
because the physics is also quite challenging.

Thank you!
Gavin


> On Dec 7, 2022, at 3:25 PM, Hans Hagen via ntg-context  
> wrote:
> 
> On 12/7/2022 1:42 PM, Gavin via ntg-context wrote:
>> Hi List,
>> I solved my original problem 2, allowing me to reuse the same \hpos labels 
>> in different equations without interference. I added an equation counter and 
>> set up my custom math version of \hpos to use the count as part of the label 
>> internally. I tried to do this with a regular ConTeXt counter, but had all 
>> sorts of mysterious, wrong behavior. When I switched to using a Lua counter, 
>> everything worked immediately. So, while there is nothing brilliant about 
>> this solution, I’ll share it for anyone who might want to do something 
>> similar in the future.
> attached an example by Mikael ... it should work with tonights update
> 
> 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
> -
> <221206-3.mkxl>___
> 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] \hpos in math - Half solved

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

On 12/7/2022 1:42 PM, Gavin via ntg-context wrote:

Hi List,

I solved my original problem 2, allowing me to reuse the same \hpos labels in 
different equations without interference. I added an equation counter and set 
up my custom math version of \hpos to use the count as part of the label 
internally. I tried to do this with a regular ConTeXt counter, but had all 
sorts of mysterious, wrong behavior. When I switched to using a Lua counter, 
everything worked immediately. So, while there is nothing brilliant about this 
solution, I’ll share it for anyone who might want to do something similar in 
the future.

attached an example by Mikael ... it should work with tonights update

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
-
 \usemodule[article-basic]

\starttext

\startboxanchoring[+]
\connectboxanchors[top][top][distance=1ex] {c1}{c2}
\connectboxanchors[bottom] [bottom] [distance=1ex] {d1}{d2}
\startformula
\mathboxanchored[nucleus]{c1}{e}_{\alpha}
\mathboxanchored[nucleus]{c2}{e}^{\mu}
\mathboxanchored[nucleus]{d1}{todo}
\mathboxanchored[nucleus]{d2}{e}_{\dot{\beta}} = \frac{1}{\sqrt{2}}
\sigma_{\alpha,\dot{\beta}}^{\mu}
\stopformula
\stopboxanchoring

\startboxanchoring[+]
\connectboxanchors[top][top][distance=0.5ex,arrow=no] {c1}{c2}
\connectboxanchors[bottom] [bottom] [distance=0.5ex,arrow=no] {c2}{c3}
\startformula
\mathboxanchored[nucleus]{c1}{e}_{\alpha}
\mathboxanchored[nucleus]{c2}{e}^{\mu}
\mathboxanchored[nucleus]{c3}{e}_{\dot{\beta}} = \frac{1}{\sqrt{2}}
\sigma_{\alpha,\dot{\beta}}^{\mu}
\stopformula
\stopboxanchoring

\startboxanchoring[+]
\connectboxanchors[top][top][text={\smallinfofont upper limits}]{b1}{b2}
\connectboxanchors[bottom] [bottom] [text={\smallinfofont lower limits}]{a1}{a2}
\startformula
\int_{\mathboxanchored{a1}{0}}^{\mathboxanchored{b1}{1}} \frac{1}{1+x^2} \dd x
=
\int_{\mathboxanchored{a2}{0}}^{\pi\mathboxanchored{b2}{/}4} \frac{1}{1+\tan^2 
t}(1+\tan^2 t)\dd t
\stopformula
\stopboxanchoring

\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] \hpos in math - Half solved

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

On 12/7/2022 1:42 PM, Gavin via ntg-context wrote:

Hi List,

I solved my original problem 2, allowing me to reuse the same \hpos labels in 
different equations without interference. I added an equation counter and set 
up my custom math version of \hpos to use the count as part of the label 
internally. I tried to do this with a regular ConTeXt counter, but had all 
sorts of mysterious, wrong behavior. When I switched to using a Lua counter, 
everything worked immediately. So, while there is nothing brilliant about this 
solution, I’ll share it for anyone who might want to do something similar in 
the future.


Using this could work

\newcount\SFNum

\global\advance\SFNum\plusone

\the\SFNum

(you now use a (global) lua counter


The code I added is below, with some comments. The complete example file is 
attached. The result is two equations.



Each equation was written using the same labels (X,Y,Z), but internally they 
have separate sets, (1:X and 2:X, etc.).

The moral of the story for me: Use more Lua.


but ... work local ... so

   document.sfnum

etc in order to avoid clashes

Gavin


% Lua counts the spin formulas
\ctxlua{sfnum = 0} % Count starts at zero
\def\sfID{\ctxlua{context(sfnum)}} % ConTeXt can call the count from Lua to use 
as an ID for each equation.

% Spin formulas increase the spin formula count and typeset the formula as 
usual.
\define\startspinformula{
   \ctxlua{sfnum = sfnum + 1}
   \startformula
}
\define\stopspinformula{\stopformula}

% My own \mpos uses the spin formula ID as part of the box label, then sets the 
contents as math.
\define[2]\mpos{\hpos{\sfID:#1}{$#2$}}

% Two commands for requesting contractions (the connections between spinors), 
using the spin formula ID.
\define[2]\contract{%
   \startpositionoverlay{graphics}%
 \setMPpositiongraphic{\sfID:#1}{mypos:contract}{to=\sfID:#2}%
   \stoppositionoverlay%
}
\define[2]\contractbelow{%
   \startpositionoverlay{graphics}%
 \setMPpositiongraphic{\sfID:#1}{mypos:contractbelow}{to=\sfID:#2}%
   \stoppositionoverlay%
}
Attached what you can do in a next upload (on the million math test 
files MS and I have by now)


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
-


221206-1.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 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] \hpos in math - Half solved

2022-12-07 Thread Gavin via ntg-context
Hi List,

I solved my original problem 2, allowing me to reuse the same \hpos labels in 
different equations without interference. I added an equation counter and set 
up my custom math version of \hpos to use the count as part of the label 
internally. I tried to do this with a regular ConTeXt counter, but had all 
sorts of mysterious, wrong behavior. When I switched to using a Lua counter, 
everything worked immediately. So, while there is nothing brilliant about this 
solution, I’ll share it for anyone who might want to do something similar in 
the future.

The code I added is below, with some comments. The complete example file is 
attached. The result is two equations.


hposQuestionEquations.pdf
Description: Adobe PDF document

Each equation was written using the same labels (X,Y,Z), but internally they 
have separate sets, (1:X and 2:X, etc.).

The moral of the story for me: Use more Lua.

Gavin


% Lua counts the spin formulas 
\ctxlua{sfnum = 0} % Count starts at zero
\def\sfID{\ctxlua{context(sfnum)}} % ConTeXt can call the count from Lua to use 
as an ID for each equation.

% Spin formulas increase the spin formula count and typeset the formula as 
usual.
\define\startspinformula{
  \ctxlua{sfnum = sfnum + 1}
  \startformula
}
\define\stopspinformula{\stopformula}

% My own \mpos uses the spin formula ID as part of the box label, then sets the 
contents as math.
\define[2]\mpos{\hpos{\sfID:#1}{$#2$}}

% Two commands for requesting contractions (the connections between spinors), 
using the spin formula ID.
\define[2]\contract{%
  \startpositionoverlay{graphics}%
\setMPpositiongraphic{\sfID:#1}{mypos:contract}{to=\sfID:#2}%
  \stoppositionoverlay%
}
\define[2]\contractbelow{%
  \startpositionoverlay{graphics}%
\setMPpositiongraphic{\sfID:#1}{mypos:contractbelow}{to=\sfID:#2}%
  \stoppositionoverlay%
}




hposQuestion.tex
Description: Binary data
___
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] \setupmathematics oddity

2022-11-20 Thread Wolfgang Schuster via ntg-context

Alan Bowen via ntg-context schrieb am 18.11.2022 um 23:48:

The following
\setupmathematics[autopunctuation={all,semicolon}]
%\setupmathematics[autopunctuation={all, semicolon}]
%\setupmathematics[autopunctuation={all,semicolon,colon}]

\starttext
\startformula
0,0;2,0,35,17,40,41\textdegree{} \cdot 365;15 \cdot 40 = 
2,9;23,14\textdegree{}.

\stopformula
\stoptext

works as it should (no space after the “;” or the “,”).

With the second and third versions of \setupmathematics there is an 
unwanted space after each punctuation mark.


Even though it seems like the autopunctuation key accepts a list of 
values this isn't the case
at the moment. Only values from the following list are valid arguments 
for the key:


- yes
- no
- all
- comma
- yes,semicolon
- comma,semicolon
- all,semicolon

The reason for this is that values like "all,semicolon" are treated as 
keyword and the comma
is part of the keyword, this means you can't change the order of the 
words and even spaces

after the comma make the argument invalid.

Wolfgang

___
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] annotated equations

2022-11-18 Thread Hans Hagen via ntg-context

On 11/18/2022 5:25 PM, Aditya Mahajan via ntg-context wrote:

On Thu, 17 Nov 2022, Henning Hraban Ramm via ntg-context wrote:


Here’s an interesting example for annotated equations, done with LaTeX/TikZ:
https://mastodon.social/@sibin/109349703357749846

I guess something similar is possible with node anchors in ConTeXt/MetaPost?


Yes, this is possible using node anchors and \hpos etc. The interface is 
slightly cumbersome, mainly because you have to make sure that anchors are 
unique.

I sometimes use such constructs in my presentations, but not often enough to 
build a nice interface as the latex package provides.
eventually there will be something as part of the math upsate (we also 
have some stuff for matrices already) but only documenting can make if 
final (as then we check consistency); the problem is not the interface 
but to *not* mess up the math spacing that we want to be 'perfect' if 
such features are used without the need to interfere


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] annotated equations

2022-11-17 Thread Hans Hagen via ntg-context

On 11/17/2022 1:46 PM, Henning Hraban Ramm via ntg-context wrote:
Here’s an interesting example for annotated equations, done with 
LaTeX/TikZ:

https://mastodon.social/@sibin/109349703357749846

I guess something similar is possible with node anchors in 
ConTeXt/MetaPost?
Mikael and I played plenty with annotating formulas as part of all this 
math stuff (part of exploring interference with spacing which is 
something we don't want cq. bother users with); for inline, display and 
matrices


but as usual it's demand driven so it is pending 'documenting' and 
'interface improvements' ... it's not like users are screaming for these 
features and there are no projects that drive them so "yes, it's there, 
but you need to check the examples (in the source)"


the priorities are currently: math tweaks (+ fixing some fonts), new 
math manual, additional trickery, mixed with stimulating metafun


(attached a quick and dirty copy of one of our many todo docs)

Hans

(who every time he sees something called 'mastodon' has to smile and 
remember reading 
https://eu.palmbeachdailynews.com/story/entertainment/2020/10/16/carl-hiaasen-writes-pythons-palm-beach-and-potus-new-book/3667047001/) 



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-


demo.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 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 simulate \hss in luametatex?

2022-11-11 Thread 黄复雄 via ntg-context
Hans,
thank you.
By your and Max's answers, I understand that
there must be box.glueset for the glues in the box.list to actually work.

Best regards

Huang Fusyong(黄复雄)

Hans Hagen via ntg-context  于2022年11月11日周五 18:52写道:
>
> On 11/11/2022 10:53 AM, Max Chernoff via ntg-context wrote:
> > Hi,
> >
> >> I want to  simulate \hss  in lua end in ConTeXt/luametatex environment.
> >> For example,
> >>
> >> ```ConTeXt
> >> a{\raise 1.5ex\hbox to 0pt{\hss b}}c
> >> ```
> >
> >> And in lua, I do as follows(part of my app seen in attachment):
> >
> > Your code doesn't compile as is. I think that this is the same thing
> > though:
> >
> > \starttext
> > \startluacode
> > local a = node.new"glyph"
> > a.char = string.byte("a")
> > a.font = font.current()
> >
> > local b = node.new"glyph"
> > b.char = string.byte("b")
> > b.font = font.current()
> >
> > local c = node.new"glyph"
> > c.char = string.byte("c")
> > c.font = font.current()
> >
> > local hss = node.new("glue")
> > hss.stretch = 65536
> > hss.stretchorder = 2
> > hss.shrink = 65536
> > hss.shrinkorder = 2
> > hss.width = 0
> > b = node.insertbefore(b, b, hss)
> >
> > local box = node.new("hlist", "box")
> > box.head = b
> > box.width = 0
> > box.shift = -tex.sp("1ex")
> >
> > tex.forcehmode()
> > node.write(a + box + c)
> > \stopluacode
> > \stoptext
> >
> >> And got 'b' on top of 'c' in pdf as follows:
> >>
> >> ```pdf
> >>b
> >> ac
> >> ```
> >
> > The \hss isn't the problem here. The problem is actually with the box.
> > When you manually make the \hbox like that, I think (although I could be
> > wrong) that you're bypassing all of TeX's glue calculations. You should
> > probably use "node.hpack" instead:
> >
> > \starttext
> > \startluacode
> > local a = node.new"glyph"
> > a.char = string.byte("a")
> > a.font = font.current()
> >
> > local b = node.new"glyph"
> > b.char = string.byte("b")
> > b.font = font.current()
> >
> > local c = node.new"glyph"
> > c.char = string.byte("c")
> > c.font = font.current()
> >
> > local hss = node.new("glue")
> > hss.stretch = 65536
> > hss.stretchorder = 2
> > hss.shrink = 65536
> > hss.shrinkorder = 2
> > hss.width = 0
> >
> > local box = node.hpack(hss + b, "exactly", 0)
> > box.shift = -tex.sp("1ex")
> >
> > tex.forcehmode()
> > a.next = box
> > box.next = c
> > node.write(a)
> > \stopluacode
> > \stoptext
> indeed, an dafter that you can check it
>
>   box.glueorder  : 2
>   box.glueset: 6.6683349609375
>   box.gluesign   : 2
>
> which will be applied (in the backend) to glues
>
> 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] how to simulate \hss in luametatex?

2022-11-11 Thread 黄复雄 via ntg-context
Dear Max,
I am very grateful that you took the time to tweak and test my
non-running code snippet
and found the problem.

 > local box = node.hpack(hss + b, "exactly", 0)

You are absolutely right, the cause of the problem was that I wasn't
using node.hpack().
Actually, I tried to use it, but used it wrong, as follows:

local box, _ = node_hpack(list)
box.width = 0
box.shift = -tex_sp("1ex")

My app works fine now. Also, I learned a lot from your code, like
font.current(), hss + b
and tex.forcehmode() - I immediately used the last one to set
box.shift, making it relative.

Best regards

Huang Fusyong(黄复雄)

Max Chernoff via ntg-context  于2022年11月11日周五 17:55写道:
>
> Hi,
>
> > I want to  simulate \hss  in lua end in ConTeXt/luametatex environment.
> > For example,
> >
> > ```ConTeXt
> > a{\raise 1.5ex\hbox to 0pt{\hss b}}c
> > ```
>
> > And in lua, I do as follows(part of my app seen in attachment):
>
> Your code doesn't compile as is. I think that this is the same thing
> though:
>
>\starttext
>\startluacode
>local a = node.new"glyph"
>a.char = string.byte("a")
>a.font = font.current()
>
>local b = node.new"glyph"
>b.char = string.byte("b")
>b.font = font.current()
>
>local c = node.new"glyph"
>c.char = string.byte("c")
>c.font = font.current()
>
>local hss = node.new("glue")
>hss.stretch = 65536
>hss.stretchorder = 2
>hss.shrink = 65536
>hss.shrinkorder = 2
>hss.width = 0
>b = node.insertbefore(b, b, hss)
>
>local box = node.new("hlist", "box")
>box.head = b
>box.width = 0
>box.shift = -tex.sp("1ex")
>
>tex.forcehmode()
>node.write(a + box + c)
>\stopluacode
>\stoptext
>
> > And got 'b' on top of 'c' in pdf as follows:
> >
> > ```pdf
> >   b
> > ac
> > ```
>
> The \hss isn't the problem here. The problem is actually with the box.
> When you manually make the \hbox like that, I think (although I could be
> wrong) that you're bypassing all of TeX's glue calculations. You should
> probably use "node.hpack" instead:
>
>\starttext
>\startluacode
>local a = node.new"glyph"
>a.char = string.byte("a")
>a.font = font.current()
>
>local b = node.new"glyph"
>b.char = string.byte("b")
>b.font = font.current()
>
>local c = node.new"glyph"
>c.char = string.byte("c")
>c.font = font.current()
>
>local hss = node.new("glue")
>hss.stretch = 65536
>hss.stretchorder = 2
>hss.shrink = 65536
>hss.shrinkorder = 2
>hss.width = 0
>
>local box = node.hpack(hss + b, "exactly", 0)
>box.shift = -tex.sp("1ex")
>
>tex.forcehmode()
>a.next = box
>box.next = c
>node.write(a)
>\stopluacode
>\stoptext
>
> -- Max
>
> ___
> 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] how to simulate \hss in luametatex?

2022-11-11 Thread Hans Hagen via ntg-context

On 11/11/2022 10:53 AM, Max Chernoff via ntg-context wrote:

Hi,


I want to  simulate \hss  in lua end in ConTeXt/luametatex environment.
For example,

```ConTeXt
a{\raise 1.5ex\hbox to 0pt{\hss b}}c
```



And in lua, I do as follows(part of my app seen in attachment):


Your code doesn't compile as is. I think that this is the same thing
though:

\starttext
\startluacode
local a = node.new"glyph"
a.char = string.byte("a")
a.font = font.current()

local b = node.new"glyph"

b.char = string.byte("b")
b.font = font.current()

local c = node.new"glyph"

c.char = string.byte("c")
c.font = font.current()

local hss = node.new("glue")

hss.stretch = 65536
hss.stretchorder = 2
hss.shrink = 65536
hss.shrinkorder = 2
hss.width = 0
b = node.insertbefore(b, b, hss)

local box = node.new("hlist", "box")

box.head = b
box.width = 0
box.shift = -tex.sp("1ex")

tex.forcehmode()

node.write(a + box + c)
\stopluacode
\stoptext


And got 'b' on top of 'c' in pdf as follows:

```pdf
   b
ac
```


The \hss isn't the problem here. The problem is actually with the box.
When you manually make the \hbox like that, I think (although I could be
wrong) that you're bypassing all of TeX's glue calculations. You should
probably use "node.hpack" instead:

\starttext
\startluacode
local a = node.new"glyph"
a.char = string.byte("a")
a.font = font.current()

local b = node.new"glyph"

b.char = string.byte("b")
b.font = font.current()

local c = node.new"glyph"

c.char = string.byte("c")
c.font = font.current()

local hss = node.new("glue")

hss.stretch = 65536
hss.stretchorder = 2
hss.shrink = 65536
hss.shrinkorder = 2
hss.width = 0

local box = node.hpack(hss + b, "exactly", 0)

box.shift = -tex.sp("1ex")

tex.forcehmode()

a.next = box
box.next = c
node.write(a)
\stopluacode
\stoptext

indeed, an dafter that you can check it

 box.glueorder  : 2
 box.glueset: 6.6683349609375
 box.gluesign   : 2

which will be applied (in the backend) to glues

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] how to simulate \hss in luametatex?

2022-11-11 Thread Max Chernoff via ntg-context
Hi,

> I want to  simulate \hss  in lua end in ConTeXt/luametatex environment.
> For example,
> 
> ```ConTeXt
> a{\raise 1.5ex\hbox to 0pt{\hss b}}c
> ```

> And in lua, I do as follows(part of my app seen in attachment):

Your code doesn't compile as is. I think that this is the same thing
though:

   \starttext
   \startluacode
   local a = node.new"glyph"
   a.char = string.byte("a")
   a.font = font.current()
   
   local b = node.new"glyph"
   b.char = string.byte("b")
   b.font = font.current()
   
   local c = node.new"glyph"
   c.char = string.byte("c")
   c.font = font.current()
   
   local hss = node.new("glue")
   hss.stretch = 65536
   hss.stretchorder = 2
   hss.shrink = 65536
   hss.shrinkorder = 2
   hss.width = 0
   b = node.insertbefore(b, b, hss)
   
   local box = node.new("hlist", "box")
   box.head = b
   box.width = 0
   box.shift = -tex.sp("1ex")
   
   tex.forcehmode()
   node.write(a + box + c)
   \stopluacode
   \stoptext

> And got 'b' on top of 'c' in pdf as follows:
> 
> ```pdf
>   b
> ac
> ```

The \hss isn't the problem here. The problem is actually with the box.
When you manually make the \hbox like that, I think (although I could be
wrong) that you're bypassing all of TeX's glue calculations. You should
probably use "node.hpack" instead:

   \starttext
   \startluacode
   local a = node.new"glyph"
   a.char = string.byte("a")
   a.font = font.current()
   
   local b = node.new"glyph"
   b.char = string.byte("b")
   b.font = font.current()
   
   local c = node.new"glyph"
   c.char = string.byte("c")
   c.font = font.current()
   
   local hss = node.new("glue")
   hss.stretch = 65536
   hss.stretchorder = 2
   hss.shrink = 65536
   hss.shrinkorder = 2
   hss.width = 0
   
   local box = node.hpack(hss + b, "exactly", 0)
   box.shift = -tex.sp("1ex")
   
   tex.forcehmode()
   a.next = box
   box.next = c
   node.write(a)
   \stopluacode
   \stoptext

-- Max

___
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] how to simulate \hss in luametatex?

2022-11-10 Thread 黄复雄 via ntg-context
Hi list,
I want to  simulate \hss  in lua end in ConTeXt/luametatex environment.
For example,

```ConTeXt
a{\raise 1.5ex\hbox to 0pt{\hss b}}c
```

should get 'b' on top of 'a', as follows:

```pdf
b
ac
```
and in lua, I see a  before "b" node, width
width:0, stretch:65536, shrink:65536, stretchorder:2, shrinkorder:2

And in lua, I do as follows(part of my app seen in attachment):

```lua
local hss = node_new(glue_id)
hss.stretch = 65536
hss.stretchorder = 2
hss.shrink = 65536
hss.shrinkorder = 2
hss.width = 0
list,_ = node_insertbefore(list, list, hss)  -- b is in the list
-- I got a  with
width:0, stretch:65536, shrink:65536, stretchorder:2, shrinkorder:2

local box = node_new(hlist_id, "box")
box.head = list
box.width = 0
box.shift = -tex_sp("1ex")
-- I got   width:0   height:0   deep:0
shift: -503424

head, current = node_insertbefore(head,current, box)  -- current is 'c' node
```

And got 'b' on top of 'c' in pdf as follows:

```pdf
  b
ac
```

How can I get 'b' on top of 'a' as \hss do?

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


t-zhpunc.lua
Description: Binary data
___
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] font features

2022-11-03 Thread Thomas A. Schmitz via ntg-context

On 11/3/22 19:24, Hans Hagen via ntg-context wrote:
You're going way too complex. Access to features and info has alwaye 
been part of mkic (and therefore lmtx). You can peek into the s-font* 
styles for all kind of ways to get overviews. Anyway, the following 
helper operates on the current font:


Thank you, Hans! Yes, I had a hunch that most of this was unnecessary 
because the information is already there. I also thought it would be 
convenient to have a helper script that could display everything before 
I decide whether I want to add a font to my texmf-font tree... Will play 
with this and then wikify!


All best

Thomas
___
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] font features

2022-11-03 Thread Hans Hagen via ntg-context

On 11/3/2022 2:03 PM, Thomas A. Schmitz via ntg-context wrote:

On 11/3/22 13:27, Henning Hraban Ramm via ntg-context wrote:
If it works for you, then it’s a problem of my installation, otherwise 
a regression in current LMTX...


No, I get the same error message, this looks promising but doesn't work.

And at the risk of sounding grumpy, but all of this is too much manual 
intervention; I would like to have a completely automated script. So 
I'll show what I have and add a few comments:


local Feature_Table = { }
local Parsed_Features = { }

local My_Font = environment.arguments["font"]

local Font_Features = os.resultof("otfinfo -f " .. My_Font)

for Feature_Sigla, Feature_Name in
   string.gmatch(Font_Features, "(%S-)\t(.-)\n") do
   Feature_Table[Feature_Sigla] = Feature_Name
end

COMMENTS

Expectation: this should return a list of all features and their 
descriptions as a lua table. If you run the file as


context test.cld --font="/path/to/font"

this works, and you get a table

Feature_Table={
  ["aalt"]="Access All Alternates",
  ["c2sc"]="Small Capitals From Capitals"} etc.

CODE

for name, _ in pairs(Feature_Table) do
   Context_Name = "f:" .. name
   Parsed_Features[name] = Context_Name
   context.definefontfeature( { Context_Name }, { name="yes" } )
end

COMMENTS

This should produce a lua table with ConTeXt fontfeatures and define 
those features. The table appears to be correct:


Parsed_Features={
  ["aalt"]="f:aalt",
  ["c2sc"]="f:c2sc"} etc.

So I expected that this should be equivalent to

\definefontfeature [f:aalt] [aalt=yes]

and return a list of defined features.

CODE

local Test_String = [[
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 1234567890 1/4 2/8 
3/9 ffi ft fi fl ffl

]]

local Font_Name =  os.resultof("otfinfo -a " .. My_Font)

context.definefontfamily( { "Test" }, { "serif" }, { Font_Name }, {} )

context.setupbodyfont{ "Test, 12pt" }

COMMENTS

Again, this works; the font is set as bodyfont.

CODE

context.starttext()

for name, feature in pairs(Feature_Table) do
   context.start ()
   context.addfeature { Parsed_Features[name] }
   context.midaligned (feature)
   context.bold (Parsed_Features[name])
   context.par ()
   context.blank{ "medium" }
   context(Test_String)
   context.par ()
   context.stop ()
end

context.stoptext()

COMMENTS

And this doesn't work: the names are picked up, but the font features 
are not defined; the sample text does not reflect any features. So this 
is what I've got... maybe one of the wizards can help.
You're going way too complex. Access to features and info has alwaye 
been part of mkic (and therefore lmtx). You can peek into the s-font* 
styles for all kind of ways to get overviews. Anyway, the following 
helper operates on the current font:


\starttext

\startluacode
function document.ShowFeatures(script)
local test = [[
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
1234567890
1/4 2/8 3/9
ffi ft fi fl ffl
]]

local font = fonts.hashes.identifiers[true]
local features = font.resources.features
 -- inspect(features)
for name, detail in table.sortedhash(features.gsub) do
if #name == 4 then
context.type(name)
context.quad()
if script then
context.type(script)
context.quad()
end
-- this should be doen once in order to save memory
-- not too hard to do ..
context.definefontfeature(
  { "f:"..name },
  { [name] = "yes", script = script }
)
context.start()
context.addff("f:"..name)
context(test)
context.stop()
context.blank()
end
end
end
\stopluacode

\definedfont[LibertinusSerif-Regular.otf*always]

\ctxlua{document.ShowFeatures()}
% \ctxlua{document.ShowFeatures("latn")}
% \ctxlua{document.ShowFeatures("grek")}

\stoptext

But, be aware that (1) features can combine in weird ways, (2) some 
features are only meant to be applied to a sunset of characters, (3) 
some are driven by script and/or language. Also, (4) you need to load 
the font without any features except the ones that enable node mode.


So, now you need to wikify ...

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
-

_

Re: [NTG-context] never add a hyphen to break a URL

2022-10-24 Thread Pablo Rodriguez via ntg-context
On 10/24/22 18:54, Steffen Wolfrum via ntg-context wrote:
> Hi,
>
> according to the Chicago Manual of Style we should «never add a hyphen to 
> break a URL»:
>
> (https://www.chicagomanualofstyle.org/qanda/data/faq/topics/URLs/faq0008.html)

Hi Steffen,

I think this is not even a question of style.

myhouse.com and my-house.com are different domains.

> Is there a switch to forbid \useURL adding hyphens?

\hyphenatedurl{} is the way to go. Although you add a hyphen (and a
blank space [spaces as part of urls need to be escaped) to your url.

I would also enclose the url inside \startasciimode...\stopasciimode to
avoid escaping the percent sign.

The percent sign has to be escaped as \letterpercent (otherwise, you get
\%) in text.

A simpler approach would read (there is a single url, instead of two
[less typos in the end]):

\setupinteraction[state=start]

\starttext

\def\MyURL[#1]{\goto{\tt\hyphenatedurl{#1}}[url(#1)]}

\MyURL[https://litteraturbanken.se/författare/CollijnI/titlar/ActaEtProcessusCanon/sida/614/faksimil?show_search_work_query=retractata_lbworkid=lb487378_mediatype=faksimil_word_form_only]
\stoptext

But https://wiki.contextgarden.net/URL has more info.

Just in case it might help,

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] new upload

2022-10-17 Thread Aditya Mahajan via ntg-context
On Mon, 17 Oct 2022, Hans Hagen via ntg-context wrote:

> On 10/17/2022 3:38 AM, Aditya Mahajan via ntg-context wrote:
> > On Sun, 16 Oct 2022, Mikael Sundqvist via ntg-context wrote:
> > 
> >> Hi,
> >>
> >> On Sun, Oct 16, 2022 at 6:07 PM Aditya Mahajan via ntg-context
> >>  wrote:
> >>>
> >>> On Fri, 14 Oct 2022, Hans Hagen via ntg-context wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> I uploaded a new version. Apart from a few fixes / extensions already
> >>>> mentioned here (or known to those who wanted it) the main changes are in
> >>>> the math goodie files (work in progress, we will clean them up later) as
> >>>> part of improving the rendering of math.
> >>>
> >>> Something is wrong with the placement of limits around an integral with
> NeoEuler:
> >>>
> >>> \usetypescriptfile[euler]
> >>>
> >>> \definetypeface[mainfont][rm][specserif][CharisSil][default]
> >>> \definetypeface[mainfont][mm][math] [eulernova][default]
> >>> \definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8,
> features=none]
> >>> \setupbodyfont[mainfont,10pt]
> >>>
> >>> \starttext
> >>> \startTEXpage[offset=1mm]
> >>>$\displaystyle \int_{0}^{1} f(x) dx$
> >>> \stopTEXpage
> >>> \stoptext
> >>>
> >>> gives the attached result.
> >>
> >> This is because the integral "sits wrong" in its boundingbox. Almost
> >> all fonts have the glyph centered around the math axis, but there are
> >> a few that doesn't. In euler-math.lfg, add the tweak
> >>
> >> {
> >> tweak = "fixoldschool",
> >> },
> > 
> > This fixes the issue with eulernova, but not with pagellaovereuler.
> pagellaovereuler uses euler-with-pagella-math as a goodie file, but that is
> missing from the distribution. (I simply copied euler-math.lfg for my use
> case).
> > 
> > With tweak=fixoldschool, \startcases doesn't work correctly (see attached):
> > 
> > \usetypescriptfile[euler]
> > 
> > \definetypeface[mainfont][rm][specserif][CharisSil][default]
> > \definetypeface[mainfont][mm][math] [eulernova][default]
> > \definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8,
> features=none]
> > \setupbodyfont[mainfont,10pt]
> > 
> > \starttext
> > \startTEXpage[offset=1mm]
> >\startformula
> >  \startcases
> >\NC A \NC B \NR
> >\NC C \NC D \NR
> >  \stopcases
> >\stopformula
> > \stopTEXpage
> > \stoptext
> 
> Looks like some older experimental value is wrong:
> 
> parameters = {
> -- DelimiterPercent=  901,
>  DelimiterShortfall  =  500,
>  },
> 
> (that whole lfg is a todo)

Thanks. This fixes the delimiters. 

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] new upload

2022-10-17 Thread Hans Hagen via ntg-context

On 10/17/2022 3:38 AM, Aditya Mahajan via ntg-context wrote:

On Sun, 16 Oct 2022, Mikael Sundqvist via ntg-context wrote:


Hi,

On Sun, Oct 16, 2022 at 6:07 PM Aditya Mahajan via ntg-context
 wrote:


On Fri, 14 Oct 2022, Hans Hagen via ntg-context wrote:


Hi,

I uploaded a new version. Apart from a few fixes / extensions already
mentioned here (or known to those who wanted it) the main changes are in
the math goodie files (work in progress, we will clean them up later) as
part of improving the rendering of math.


Something is wrong with the placement of limits around an integral with 
NeoEuler:

\usetypescriptfile[euler]

\definetypeface[mainfont][rm][specserif][CharisSil][default]
\definetypeface[mainfont][mm][math] [eulernova][default]
\definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, 
features=none]
\setupbodyfont[mainfont,10pt]

\starttext
\startTEXpage[offset=1mm]
   $\displaystyle \int_{0}^{1} f(x) dx$
\stopTEXpage
\stoptext

gives the attached result.


This is because the integral "sits wrong" in its boundingbox. Almost
all fonts have the glyph centered around the math axis, but there are
a few that doesn't. In euler-math.lfg, add the tweak

{
tweak = "fixoldschool",
},


This fixes the issue with eulernova, but not with pagellaovereuler. 
pagellaovereuler uses euler-with-pagella-math as a goodie file, but that is 
missing from the distribution. (I simply copied euler-math.lfg for my use case).

With tweak=fixoldschool, \startcases doesn't work correctly (see attached):

\usetypescriptfile[euler]

\definetypeface[mainfont][rm][specserif][CharisSil][default]
\definetypeface[mainfont][mm][math] [eulernova][default]
\definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, 
features=none]
\setupbodyfont[mainfont,10pt]

\starttext
\startTEXpage[offset=1mm]
   \startformula
 \startcases
   \NC A \NC B \NR
   \NC C \NC D \NR
 \stopcases
   \stopformula
\stopTEXpage
\stoptext


Looks like some older experimental value is wrong:

   parameters = {
-- DelimiterPercent=  901,
DelimiterShortfall  =  500,
},

(that whole lfg is a todo)

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] new upload

2022-10-17 Thread Otared Kavian via ntg-context
Hi Mikael,

I use Lucida in my documents and did not notice any problem with the integrals 
and other large operators. 
Do you mean in the future I have to update to a new version of Lucida (and pay 
again…) or will future versions of LuaMetaTeX handle correctly large operators 
typeset in Lucida ?

The issue I observed with the new upload of 2022.10.15 is that the 
presentations I typeset with the simpleslides module are broken after three 
pages, but could not set up a minimal working example to send to the list. 
Those presentations are typeset correctly with previous versions.
Has Metapost changed some crucial settings ?

Best regards: Otared

> On 16 Oct 2022, at 19:03, Mikael Sundqvist via ntg-context 
>  wrote:
> 
> Hi,
> 
> On Sun, Oct 16, 2022 at 6:07 PM Aditya Mahajan via ntg-context
>  wrote:
>> 
>> On Fri, 14 Oct 2022, Hans Hagen via ntg-context wrote:
>> 
>>> Hi,
>>> 
>>> I uploaded a new version. Apart from a few fixes / extensions already
>>> mentioned here (or known to those who wanted it) the main changes are in
>>> the math goodie files (work in progress, we will clean them up later) as
>>> part of improving the rendering of math.
>> 
>> Something is wrong with the placement of limits around an integral with 
>> NeoEuler:
>> 
>> \usetypescriptfile[euler]
>> 
>> \definetypeface[mainfont][rm][specserif][CharisSil][default]
>> \definetypeface[mainfont][mm][math] [eulernova][default]
>> \definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, 
>> features=none]
>> \setupbodyfont[mainfont,10pt]
>> 
>> \starttext
>> \startTEXpage[offset=1mm]
>>  $\displaystyle \int_{0}^{1} f(x) dx$
>> \stopTEXpage
>> \stoptext
>> 
>> gives the attached result.
> 
> This is because the integral "sits wrong" in its boundingbox. Almost
> all fonts have the glyph centered around the math axis, but there are
> a few that doesn't. In euler-math.lfg, add the tweak
> 
> {
> tweak = "fixoldschool",
> },
> 
> In fact, we have not updated the euler goodie file for a while it
> seems. I think there are more things that can be improved. Hopefully
> before next release.
> 
> It can also be mentioned that some fonts (Daniel Flipo was quick to
> fix concrete, erewhon and kpfonts) was fixed recently regarding this,
> and it is reported on and fixed in development of Lucida.
> 
> /Mikael
> ___
> 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
> ___

Otared Kavian
e-mail: ota...@gmail.com
Phone: +33 6 88 26 70 95



___
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] new upload

2022-10-16 Thread Aditya Mahajan via ntg-context
On Sun, 16 Oct 2022, Mikael Sundqvist via ntg-context wrote:

> Hi,
> 
> On Sun, Oct 16, 2022 at 6:07 PM Aditya Mahajan via ntg-context
>  wrote:
> >
> > On Fri, 14 Oct 2022, Hans Hagen via ntg-context wrote:
> >
> > > Hi,
> > >
> > > I uploaded a new version. Apart from a few fixes / extensions already
> > > mentioned here (or known to those who wanted it) the main changes are in
> > > the math goodie files (work in progress, we will clean them up later) as
> > > part of improving the rendering of math.
> >
> > Something is wrong with the placement of limits around an integral with 
> > NeoEuler:
> >
> > \usetypescriptfile[euler]
> >
> > \definetypeface[mainfont][rm][specserif][CharisSil][default]
> > \definetypeface[mainfont][mm][math] [eulernova][default]
> > \definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, 
> > features=none]
> > \setupbodyfont[mainfont,10pt]
> >
> > \starttext
> > \startTEXpage[offset=1mm]
> >   $\displaystyle \int_{0}^{1} f(x) dx$
> > \stopTEXpage
> > \stoptext
> >
> > gives the attached result.
> 
> This is because the integral "sits wrong" in its boundingbox. Almost
> all fonts have the glyph centered around the math axis, but there are
> a few that doesn't. In euler-math.lfg, add the tweak
> 
> {
> tweak = "fixoldschool",
> },

This fixes the issue with eulernova, but not with pagellaovereuler. 
pagellaovereuler uses euler-with-pagella-math as a goodie file, but that is 
missing from the distribution. (I simply copied euler-math.lfg for my use 
case). 

With tweak=fixoldschool, \startcases doesn't work correctly (see attached):

\usetypescriptfile[euler]

\definetypeface[mainfont][rm][specserif][CharisSil][default]
\definetypeface[mainfont][mm][math] [eulernova][default]
\definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, 
features=none]
\setupbodyfont[mainfont,10pt]

\starttext
\startTEXpage[offset=1mm]
  \startformula
\startcases
  \NC A \NC B \NR
  \NC C \NC D \NR
\stopcases
  \stopformula
\stopTEXpage
\stoptext


Aditya

test.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 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] new upload

2022-10-16 Thread Mikael Sundqvist via ntg-context
Hi,

On Sun, Oct 16, 2022 at 6:07 PM Aditya Mahajan via ntg-context
 wrote:
>
> On Fri, 14 Oct 2022, Hans Hagen via ntg-context wrote:
>
> > Hi,
> >
> > I uploaded a new version. Apart from a few fixes / extensions already
> > mentioned here (or known to those who wanted it) the main changes are in
> > the math goodie files (work in progress, we will clean them up later) as
> > part of improving the rendering of math.
>
> Something is wrong with the placement of limits around an integral with 
> NeoEuler:
>
> \usetypescriptfile[euler]
>
> \definetypeface[mainfont][rm][specserif][CharisSil][default]
> \definetypeface[mainfont][mm][math] [eulernova][default]
> \definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, 
> features=none]
> \setupbodyfont[mainfont,10pt]
>
> \starttext
> \startTEXpage[offset=1mm]
>   $\displaystyle \int_{0}^{1} f(x) dx$
> \stopTEXpage
> \stoptext
>
> gives the attached result.

This is because the integral "sits wrong" in its boundingbox. Almost
all fonts have the glyph centered around the math axis, but there are
a few that doesn't. In euler-math.lfg, add the tweak

{
tweak = "fixoldschool",
},

In fact, we have not updated the euler goodie file for a while it
seems. I think there are more things that can be improved. Hopefully
before next release.

It can also be mentioned that some fonts (Daniel Flipo was quick to
fix concrete, erewhon and kpfonts) was fixed recently regarding this,
and it is reported on and fixed in development of Lucida.

/Mikael
___
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] new upload

2022-10-16 Thread Aditya Mahajan via ntg-context
On Fri, 14 Oct 2022, Hans Hagen via ntg-context wrote:

> Hi,
> 
> I uploaded a new version. Apart from a few fixes / extensions already 
> mentioned here (or known to those who wanted it) the main changes are in 
> the math goodie files (work in progress, we will clean them up later) as 
> part of improving the rendering of math.

Something is wrong with the placement of limits around an integral with 
NeoEuler:

\usetypescriptfile[euler]

\definetypeface[mainfont][rm][specserif][CharisSil][default]
\definetypeface[mainfont][mm][math] [eulernova][default]
\definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, 
features=none]
\setupbodyfont[mainfont,10pt]

\starttext
\startTEXpage[offset=1mm]
  $\displaystyle \int_{0}^{1} f(x) dx$
\stopTEXpage
\stoptext

gives the attached result.

Thanks,
Aditya

test.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 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] new upload

2022-10-15 Thread Hans Hagen via ntg-context

On 10/15/2022 10:48 AM, Pablo Rodriguez via ntg-context wrote:

On 10/15/22 09:41, Hans Hagen via ntg-context wrote:

On 10/14/2022 4:14 PM, Pablo Rodriguez via ntg-context wrote:

[...]
Many thanks for the new version, Hans.

I have discovered that it includes in
tex/texmf-context/source/luametatex what should be the LMTX source
(about 11MB).


It zips to 2 MB and totals to less of a picture on a fancy phone ...


Many thanks for your reply, Hans.

At least on my system, I think every file is downloaded uncompressed.

With a low speed connection (here, the service isn’t great all the
time), having to download over 400 files is a killer.


as has been pointed out, you only download the changed files and those 
are not many


when sources are not included some complain, when they are others 
com-plain ...



The storage space on disk is irrelevant, I totally agree with you.

I wish I could say that large updates such as these weren’t a problem in
some cases. But sometimes this isn’t true here.

With incremental updates, the downloading process takes way shorter in
subsequent updates (as Alan pointed out). But the first time it might
take too much (so the script quits).


just run twice as the script will pick up


the idea is to provide the user with all he needs as archive so no
dependencies (apart from a compiler). Also by including the source we
can sort of guaranteed that you get what you expect to work with the tex
files (no interference with distribution patches our of our control). It
has always been part of the plan with luametatex. So ... it will not be
optional.


I asked to make this optional not to avoid having the source, but to be
able to complete the update process.


i guess a few extra fonts are more demanding, actually the number of 
fonts in the installation dropped (for now) so that compensates the 
larger source tree



I’m not extremely confident, but I hope I will manage to update ConTeXt
at the office (next working day).

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] new upload

2022-10-15 Thread Pablo Rodriguez via ntg-context
On 10/15/22 09:41, Hans Hagen via ntg-context wrote:
> On 10/14/2022 4:14 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> Many thanks for the new version, Hans.
>>
>> I have discovered that it includes in
>> tex/texmf-context/source/luametatex what should be the LMTX source
>> (about 11MB).
>
> It zips to 2 MB and totals to less of a picture on a fancy phone ...

Many thanks for your reply, Hans.

At least on my system, I think every file is downloaded uncompressed.

With a low speed connection (here, the service isn’t great all the
time), having to download over 400 files is a killer.

The storage space on disk is irrelevant, I totally agree with you.

I wish I could say that large updates such as these weren’t a problem in
some cases. But sometimes this isn’t true here.

With incremental updates, the downloading process takes way shorter in
subsequent updates (as Alan pointed out). But the first time it might
take too much (so the script quits).

> the idea is to provide the user with all he needs as archive so no
> dependencies (apart from a compiler). Also by including the source we
> can sort of guaranteed that you get what you expect to work with the tex
> files (no interference with distribution patches our of our control). It
> has always been part of the plan with luametatex. So ... it will not be
> optional.

I asked to make this optional not to avoid having the source, but to be
able to complete the update process.

I’m not extremely confident, but I hope I will manage to update ConTeXt
at the office (next working day).

Many thanks for your help,

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] new upload

2022-10-15 Thread Hans Hagen via ntg-context

On 10/14/2022 4:14 PM, Pablo Rodriguez via ntg-context wrote:

On 10/14/22 10:21, Hans Hagen via ntg-context wrote:

Hi,

I uploaded a new version. Apart from a few fixes / extensions already
mentioned here (or known to those who wanted it) the main changes are in
the math goodie files (work in progress, we will clean them up later) as
part of improving the rendering of math.


Many thanks for the new version, Hans.

I have discovered that it includes in
tex/texmf-context/source/luametatex what should be the LMTX source
(about 11MB).
It zips to 2 MB and totals to less of a picture on a fancy phone .. tre 
idea is to provide the user with all he needs as archive so no 
dependenccies (apart from a compiler). Also by including the source we 
can sort of guaranteed that you get what you expect to work with the tex 
files (no interference with distribution patches our of our control). It 
has always been part of the plan with luametatex.  So .. it wil not be 
optional.


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] atan2 function

2022-10-14 Thread Alan Braslau via ntg-context
On Fri, 14 Oct 2022 16:09:41 -0700
Thangalin  wrote:

> Would making the conditional part of the API be useful to others?

Of course, $\tan^{-1}(\pm 1)$ is undefined (mathematically).

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
___


Re: [NTG-context] atan2 function

2022-10-14 Thread Thangalin via ntg-context
That's certainly tighter, thank you, Alan.

Would making the conditional part of the API be useful to others?

Cheers!

On Fri, Oct 14, 2022 at 3:42 PM Alan Braslau  wrote:
>
> On Fri, 14 Oct 2022 11:59:49 -0700
> Thangalin  wrote:
>
> > I don't think an atantwo is needed. I *thought* I had read somewhere
> > that atan( y, x ) was equivalent to calling atan2 in Lua. Ensuring
> > there's no breakage when x == y would be nice, though. It was a little
> > surprising to see angle return degrees rather than radians, but it
> > does simplify my code:
> >
> >   dc := vbc - vac;
> >   dr := vbr - var;
> >   vi := 0;
> >
> >   if not( dc == dr ):
> > vi := round( angle( dc, dr ) / 60 );
> >   fi;
> >
> >   % Compute the direction towards the first segment (to vertex of
> > an edge). vangle := vi * 60 * pi / 180;
> >
> > Even simpler would be:
> >
> >   dc := vbc - vac;
> >   dr := vbr - var;
> >   vi := round( angle( dc, dr ) / 60 ); % returns 0 when dc == dr
> >
> >   % Compute the direction towards the first segment (to vertex of
> > an edge). vangle := vi * 60 * pi / 180;
> >
> > Or accepting a third argument as the return value in the special case:
> >
> >   vi := round( angle( dc, dr, 0 ) / 60 ); % returns 0 when dc ==
> > dr
> >
> > Cheers!
>
> vi := if (dc = dr) : 0 else : round (angle(dc,dr)/60) fi ;
>
> 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
___


Re: [NTG-context] new upload

2022-10-14 Thread Pablo Rodriguez via ntg-context
On 10/14/22 10:21, Hans Hagen via ntg-context wrote:
> Hi,
>
> I uploaded a new version. Apart from a few fixes / extensions already
> mentioned here (or known to those who wanted it) the main changes are in
> the math goodie files (work in progress, we will clean them up later) as
> part of improving the rendering of math.

Many thanks for the new version, Hans.

I have discovered that it includes in
tex/texmf-context/source/luametatex what should be the LMTX source
(about 11MB).

I wonder whether this could be made optional. Internet speed is not
constant where I live and it was impossible for me to update at work
(after many attempts to download the newer version).

Just in case it would be possible, modules (also as an option) would be
more useful for many of us.

Many thanks for your excellet work,

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
___


[NTG-context] new upload

2022-10-14 Thread Hans Hagen via ntg-context

Hi,

I uploaded a new version. Apart from a few fixes / extensions already 
mentioned here (or known to those who wanted it) the main changes are in 
the math goodie files (work in progress, we will clean them up later) as 
part of improving the rendering of math.


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] \quotation, protrusion and linebreaking

2022-10-12 Thread Henning Hraban Ramm via ntg-context

Am 11.10.22 um 21:06 schrieb Leah Neukirchen:

Henning Hraban Ramm via ntg-context  writes:

\setupdelimitedtext[quotation][method=font]


That fixes both issues, thanks!

Not sure where I should have learned this exists, however. ;)


Oops, I answered only to Leah:

I agree. Someone (Hans or Wolfgang, probably) told me at one time, or I 
picked it up from a discussion on the list, and it’s part of my default 
setup since.


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
___


<    1   2   3   4   5   6   7   8   9   10   >