Re: [NTG-context] Bad argument #1 to 'prehypenchar'

2020-09-15 Thread Hans Hagen

On 9/15/2020 9:51 PM, Aditya Mahajan wrote:


This is a leftover from the old days. Thank for the suggestion on how to fix 
this. I'll play around a bit and perhaps add the  option `hyphens=yes|no`  
instead of the current `option=hyphenated`.

the latest lmtx should be ok (predefines language zero)

but wolfgangs suggestions are the ones to follow ... language=0 is a 
hack, just as is setting left/right hyphenmin so we now have a proper 
disabler (in luametatex/lmtx that is; luatex/mkiv should not be affected)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Bad argument #1 to 'prehypenchar'

2020-09-15 Thread Aditya Mahajan
On Tue, 15 Sep 2020, Wolfgang Schuster wrote:

> Aditya Mahajan schrieb am 15.09.2020 um 21:19:
> > On Tue, 15 Sep 2020, Wolfgang Schuster wrote:
> > 
> > > You have to add \resetbreakpoints to the vim/filter module.
> > 
> > Thanks. I had:
> > 
> >\doifnotinset{\v!hyphenated}{\externalfilterparameter\c!option}
> >{\language\minusone}%
> > 
> > which I changed to
> > 
> >\doifnotinset{\v!hyphenated}{\externalfilterparameter\c!option}
> >{\language\minusone
> > \resetbreakpoints}%
> > 
> > and this fixed the error.
> 
> Don't use the \language hack, the official and supported commands are
> \nohypens and \dohyphens or when you need a interface for it use
> 
> \usehyphensparameter\...parameter
> 
> which allows
> 
> \setup...[hyphens=yes|no]

This is a leftover from the old days. Thank for the suggestion on how to fix 
this. I'll play around a bit and perhaps add the  option `hyphens=yes|no`  
instead of the current `option=hyphenated`.

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

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


Re: [NTG-context] Bad argument #1 to 'prehypenchar'

2020-09-15 Thread Wolfgang Schuster

Aditya Mahajan schrieb am 15.09.2020 um 21:19:

On Tue, 15 Sep 2020, Wolfgang Schuster wrote:


You have to add \resetbreakpoints to the vim/filter module.


Thanks. I had:

   \doifnotinset{\v!hyphenated}{\externalfilterparameter\c!option}
   {\language\minusone}%

which I changed to

   \doifnotinset{\v!hyphenated}{\externalfilterparameter\c!option}
   {\language\minusone
\resetbreakpoints}%

and this fixed the error.


Don't use the \language hack, the official and supported commands are 
\nohypens and \dohyphens or when you need a interface for it use


\usehyphensparameter\...parameter

which allows

\setup...[hyphens=yes|no]

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

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


Re: [NTG-context] Bad argument #1 to 'prehypenchar'

2020-09-15 Thread Aditya Mahajan
On Tue, 15 Sep 2020, Wolfgang Schuster wrote:

> Aditya Mahajan schrieb am 15.09.2020 um 05:30:
> > The following MWE gives an error with LMTX 2020.09.05
> > 
> > 
> > \usemodule[vim]
> > \definevimtyping[MATLABCODE][syntax=matlab]
> > 
> > \starttext
> > \startMATLABCODE
> >saveas(gcf(), "output/same-sigma.png")
> > \stopMATLABCODE
> > \stoptext
> > 
> > The error message is:
> > 
> > callback error:
> > ...metatex/texmf-context/tex/context/base/mkiv/lang-ini.lua:509: bad
> > argument #1 to 'prehyphenchar' (luatex.lang expected, got no value)
> > stack traceback:
> >  [C]: in function 'lang.prehyphenchar'
> >  ...metatex/texmf-context/tex/context/base/mkiv/lang-ini.lua:509: in
> > field 'prehyphenchar'
> >  ...metatex/texmf-context/tex/context/base/mkiv/typo-brk.lua:171: in
> > local 'method'
> >  ...metatex/texmf-context/tex/context/base/mkiv/typo-brk.lua:392: in
> > upvalue 'typesetters_breakpoints_handler'
> >  [string "local tonut  = nodes.tonut..."]:16: in function <[string
> > "local tonut  = nodes.tonut..."]:11>
> >  (...tail calls...)
> >  ...metatex/texmf-context/tex/context/base/mkiv/node-pro.lua:88: in
> > function <...metatex/texmf-context/tex/context/base/mkiv/node-pro.lua:79>
> > 
> > 1 >>  \SYNBOL{}saveas(gcf(), \SYN[String]{"output/same-sigma.png"})\SYNEOL{}
> > 2
> > mtx-context | fatal error: return code: 256
> > 
> > Any idea what is going on?
> 
> You have to add \resetbreakpoints to the vim/filter module.

Thanks. I had:

  \doifnotinset{\v!hyphenated}{\externalfilterparameter\c!option}
  {\language\minusone}%

which I changed to

  \doifnotinset{\v!hyphenated}{\externalfilterparameter\c!option}
  {\language\minusone
   \resetbreakpoints}%

and this fixed the error. 

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

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


[NTG-context] update and meeting

2020-09-15 Thread Hans Hagen

Hi,

I uploaded a new version. It is a follow up on the ctx meeting of last 
week (in a country side compound in czech with also some remote 
attendants, daily infrared health scans, an excursion, talks, breaks, 
food, and the usual have fun with context friends moments).


There are a few changes that can affect users numbered 1 and 2 below.

(1) During one of the coffebreak discussions we agreed to drop the two 
units that were never official and are kind of meaningless: 'nc' (new 
cicero) and 'nd' (new didot). Arthur made some stroing arguments and 
only Tomas remembered ever entering one of them so there was no resistance.


We also considered that in order to enforce the use of si units the 'in' 
should go away but that has been postponed (it is anyway last in the 
checked keywords so has no overhead).


At some point the "true" prefix might go too (never really used, but no 
overhead either).


(2) Another change is in the \startdocument mechanism. This (already old 
and rusted) wrapper runs on top of variables but we think no one knows 
(or uses) that. So, it now is a real wrapper with inheritance and such. 
It is dedicated to Tomas Hala who had to struggle with the old one but 
still gave a presentation using it. Here's an example:


\definedocument[thesis]

\setupdocument[a=b,e=f]
\setupdocument[thesis][a=x,c=d]

% \startsetups[thesis:start]
\startsetups[document:start]
START
\stopsetups

\startsetups[thesis:stop]
% \startsetups[document:stop]
STOP
\stopsetups

% \startdocument[thesis]
\startthesis

(\currentdocument/a): \documentvariable{a}\par
(\currentdocument/c): \documentvariable{c}\par
(\currentdocument/e): \documentvariable{e}\par

\stopthesis
% \stopdocument

There's also a user mode set with the document enviroments name.

(3) Some other additions are for Taco so will not be disclosed here (yet).

(4) There are some summaries of my presentations added to the 
distribution (the wiki will collect more at some point).


1 context-2020-mkii-mkiv-mkxl.pdf
2 context-2020-luametatex.pdf
3 context-2020-concepts.pdf
4 context-2020-tokens.pdf
5 context-2020-implementers.pdf
6 context-2020-datatypes.pdf
7 context-2020-ecmascript.pdf
8 context-2020-svg.pdf
9 context-2020-mp.pdf

They use the new 'boring' presentation style and most are probably 
useless without demos and discussion but anyway ...  The first one is an 
overview of the three successive context versions. The second one is 
about the state of luametatex and the third discusses a couple of things 
introduced last year (luametatex and lmtx). The tokens talk is for low 
level tex lovers (or those who need to impress other texies with token 
speak), and the talk about implementers was probably only useful for 
wolfgang and me, but who knows. The datatypes are an overview over what 
is standard in tex and in lua as well as what we have extra on top of 
that. The seventh talk fits in the 'we also need to have some fun 
talks', and the eigths one was for a large part a discussion and 
accompanied by a demo by Hraban. The last one is (of course) also a fun 
one and (of course) discusses Don Knuths latest font which (of course) 
is kind of special


Anyway, it's all part of the 'we keep going' story, which is why they 
are in the distribution.


(5) We had several talks / discussions about the greatly improved wiki 
and users are invited to participate in completing the pages that need 
to be filled in, but I leave that to Taco to summarize.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Problem with fonts in Lua

2020-09-15 Thread Wolfgang Schuster

MANUEL GONZALEZ SUAREZ schrieb am 15.09.2020 um 12:00:

Hi all:

I have this minimal example (thanks to Pablo and Charles):

\mainlanguage [es]

\definefallbackfamily [mainface] [rm] [New Athena Unicode]

[preset = range: greek, force = yes]

% \definefallbackfamily [mainface] [rm] [Old Standard]

% [preset = range: greek, force = yes]

\definefontfamily [mainface] [rm] [TeX Gyre Pagella]

\definefontfamily [mainface] [ss] [TeX Gyre Heros, scale = 0.75]

\setupbodyfont [mainface]

\starttext

Spanish text

\input tufte

Greek Text:

Μετὰ δὲ ταῦτα οὐ πολλαῖς ἡμέραις ὕστερον ἦλθεν ἐξ

Ἀθηνῶν Θυμοχάρης ἔχων ναῦς ὀλίγας · καὶ εὐθὺς ἐναυμάχησαν αὖθις 
Λακεδαιμόνιοι καὶ Ἀθηναῖοι, ἐνίκησαν δὲ


Λακεδαιμόνιοι ἡγουμένου Ἀγησανδρίδου.

\stoptext

I compile with TeXLive 2020 and Windows 10. I have the two fonts (New 
Athena Unicode and Old Standard) installed on my system but with New 
Athena Unicode it does not compile; on the other hand, with Old Standard 
it does compile. I do not know what I can do.


1. Remove the spaces from the key-val entries

2. Don't mix key-val entries with arguments

3. Load hyphenation patterns for greek (you can add them to spain 
because there is no overlap).


The following example works on my system but I suggest to add a math 
font (itemize uses math symbols as fallback).


\definefallbackfamily
  [mainface] [rm] [New Athena Unicode]
  [preset=range:greek,force=yes]

\definefontfamily [mainface] [rm] [TeX Gyre Pagella]

\definefontfamily [mainface] [ss] [TeX Gyre Heros] [scale=0.75]

\setuplanguage [es] [patterns={es,gr}]

\setupbodyfont [mainface]

\mainlanguage[es]

\starttext

\samplefile{cervantes-es}

\samplefile{aristotle-grc}

\stoptext

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

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


[NTG-context] Problem with fonts in Lua

2020-09-15 Thread MANUEL GONZALEZ SUAREZ
Hi all:

I have this minimal example (thanks to Pablo and Charles):

\mainlanguage [es]
\definefallbackfamily [mainface] [rm] [New Athena Unicode]
[preset = range: greek, force = yes]

% \definefallbackfamily [mainface] [rm] [Old Standard]
% [preset = range: greek, force = yes]
\definefontfamily [mainface] [rm] [TeX Gyre Pagella]
\definefontfamily [mainface] [ss] [TeX Gyre Heros, scale = 0.75]
\setupbodyfont [mainface]
\starttext
Spanish text

\input tufte
Greek Text:

Μετὰ δὲ ταῦτα οὐ πολλαῖς ἡμέραις ὕστερον ἦλθεν ἐξ
Ἀθηνῶν Θυμοχάρης ἔχων ναῦς ὀλίγας · καὶ εὐθὺς ἐναυμάχησαν αὖθις Λακεδαιμόνιοι 
καὶ Ἀθηναῖοι, ἐνίκησαν δὲ
Λακεδαιμόνιοι ἡγουμένου Ἀγησανδρίδου.
\stoptext


I compile with TeXLive 2020 and Windows 10. I have the two fonts (New Athena 
Unicode and Old Standard) installed on my system but with New Athena Unicode it 
does not compile; on the other hand, with Old Standard it does compile. I do 
not know what I can do.
Thanks for the help.
Manuel González.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Documentation for the database module

2020-09-15 Thread DesdeChaves
Some time ago I wrote metapost code for make a periodic table.

See:
https://tex.stackexchange.com/questions/233417/periodic-table-with-electron-counts-in-shells/233644

Have a nice day

Jorge


Sem
vírus. www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Em ter., 15 de set. de 2020 às 03:51,  escreveu:

> Hi,
>
> I want to typeset a Periodic Table of the Elements. The according data
> is prepared in a file with comma separated values (csv/UNIX). I found
> some *very* basic informations how to get file based csv-data typeset,
> but the result is hardly recognizable as Periodic Table of the
> Elements.
>
> To understand how to use the according commands I need a documentation
> of it.
>
> What I found was this:
> https://wiki.contextgarden.net/M-database
> which is more a summary of two examples with no explanations and
> starting with the warning "This may be outdated".
>
> Where can I find a good one?
>
> Thanks a lot for any help in advance!
> Cheers!
> mcc
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>


-- 
Atentamente

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

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


Re: [NTG-context] Bad argument #1 to 'prehypenchar'

2020-09-15 Thread Wolfgang Schuster

Aditya Mahajan schrieb am 15.09.2020 um 05:30:

The following MWE gives an error with LMTX 2020.09.05


\usemodule[vim]
\definevimtyping[MATLABCODE][syntax=matlab]

\starttext
\startMATLABCODE
   saveas(gcf(), "output/same-sigma.png")
\stopMATLABCODE
\stoptext

The error message is:

callback error: 
...metatex/texmf-context/tex/context/base/mkiv/lang-ini.lua:509: bad argument 
#1 to 'prehyphenchar' (luatex.lang expected, got no value)
stack traceback:
 [C]: in function 'lang.prehyphenchar'
 ...metatex/texmf-context/tex/context/base/mkiv/lang-ini.lua:509: in 
field 'prehyphenchar'
 ...metatex/texmf-context/tex/context/base/mkiv/typo-brk.lua:171: in 
local 'method'
 ...metatex/texmf-context/tex/context/base/mkiv/typo-brk.lua:392: in 
upvalue 'typesetters_breakpoints_handler'
 [string "local tonut  = nodes.tonut..."]:16: in function <[string "local tonut 
 = nodes.tonut..."]:11>
 (...tail calls...)
 ...metatex/texmf-context/tex/context/base/mkiv/node-pro.lua:88: in function 
<...metatex/texmf-context/tex/context/base/mkiv/node-pro.lua:79>

1 >>  \SYNBOL{}saveas(gcf(), \SYN[String]{"output/same-sigma.png"})\SYNEOL{}
2
mtx-context | fatal error: return code: 256

Any idea what is going on?


You have to add \resetbreakpoints to the vim/filter module.

Wolfgang

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

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