[NTG-context] --luatex option failing

2021-05-27 Thread jbf

Hi list,

Not at all sure why this is happening. In my most recent install of lmtx 
(which works fine as lmtx) on Linux, I wanted to choose the --luatex 
option just to make a comparison between the mkiv output and lmtx.


The redirection part seems to work (... --script mtx-context --luatex 
myfile.tex --redirected), but no 'resolvers' follow. Instead I get 
mtxrun  | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua'.


I have tried both luatextools --generate and mtxrun --generate, but 
neither of these fix the problem. Would someone know why this is not 
working? Or even better, how to fix it? I installed lmtx on another 
machine and have no problems using the --luatex option there, so the 
matter is not urgent for me, just puzzling! I do have a separate mkiv 
installation as well, but my understanding is that they would not 
conflict. LMTX contains everything that is needed.


Julian

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] no leavevmode

2021-05-27 Thread Hans van der Meer
Why is there not implemented in \subsection a \leavevmode at the end of it? 
Here a minimal example showing that starting with the first word in an \hbox 
encounters vertical mode. Thus requiring a \leavevmode to put it on line with 
the following text. Whereas not starting with an \hbox does an implicite switch 
to horizontal mode.
I can imagine that this behaviour could be confusing for users not well versed 
in the different behaviour of the horizontal and vertical modes.
Therefore my question: Wouldn't it be wise to implement that \leavevmode?

\startsubsection[title=TEST]
\hbox{abc} def\crlf
ghi jkl xyz
\stopsubsection


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 / http://www.ntg.nl/mailman/listinfo/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] t-vim module: no highlighting for custom filetypes

2021-05-27 Thread Nicola
 total callbacks: 0
system  >   backend callbacks : 0
system  >
mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: 
/Users/me/Applications/context-osx-64/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.007 seconds, 0 scans with 
scantime 0.000 seconds, 0 shared scans, 18 found files, scanned paths: 
mkiv lua stats  > stored bytecode data: 490 modules (0.278 sec), 99 tables 
(0.014 sec), 589 chunks (0.293 sec)
mkiv lua stats  > traced context: maxstack: 1549, freed: 0, unreachable: 1549
mkiv lua stats  > cleaned up reserved nodes: 72 nodes, 9 lists of 434
mkiv lua stats  > node memory usage: 8 attribute, 4 attribute_list, 1 glue, 58 
glue_spec, 3 kern, 2 penalty, 2 temp
mkiv lua stats  > node list callback tasks: 9 unique task lists, 8 instances 
(re)created, 47 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf output)
mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.000 seconds loading
mkiv lua stats  > callbacks: internal: 0, file: 0, direct: 0, late: 0, function 
0, total: 0 (0 per page)
mkiv lua stats  > randomizer: resumed with value 0.41693551017344
mkiv lua stats  > loaded tex modules: 5 requested, all found (*-filter 
*-module-catcodes *-syntax-groups *-syntax-highlight *-vim)
mkiv lua stats  > loaded patterns: en::1, load time: 0.000
mkiv lua stats  > loaded fonts: 4 files: latinmodern-math.otf, 
lmmono10-regular.otf, lmmono12-regular.otf, lmroman12-regular.otf
mkiv lua stats  > font engine: otf 3.116, afm 1.513, tfm 1.000, 9 instances, 3 
shared in backend, 3 common vectors, 0 common hashes, load time 0.148 seconds
mkiv lua stats  > font embedding time: 0.002 seconds, 2 fonts
mkiv lua stats  > result saved in file: en-dash.pdf, compresslevel 1, 
objectcompresslevel 3
mkiv lua stats  > used platform: osx-64, type: unix, binary subtree: 
texmf-osx-64
mkiv lua stats  > used engine: luametatex version: 2.0911, functionality level: 
20210527, format id: 575, compiler: clang
mkiv lua stats  > tex properties: 740032 hash slots used of 2097152, 46676 
control sequences, approximate memory usage: 30 MB
mkiv lua stats  > lua properties: engine: lua 5.4, used memory: 55 MB, ctx: 53 
MB, max: 53 MB, symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 0.592 seconds, 1 processed pages, 1 shipped pages, 
1.688 pages/second


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] BibTeX inproceedings entries not rendered correctly in APA style

2021-05-27 Thread Nicola
On 2021-05-25, Alan Braslau  wrote:
> On Mon, 24 May 2021 23:10:34 -0400
> Rik Kabel  wrote:
>
>>
>> On 5/24/2021 22:12, Alan Braslau wrote:
>> > On Mon, 24 May 2021 17:53:49 -0400
>> > Rik Kabel  wrote:
>> >
>> >> This is intended. Or rather, it is a side-effect of the intended
>> >> behavior.
>> >>
>> >> If you add an editor ("editor={Baz, Bar}") you will get something
>> >> like:
>> >>
>> >>  Foo, B. (1983). Title of the paper. In B. Baz (Ed.),
>> >> /Booktitle/. Author.
>> >>
>> >> And if you then add a publisher ("publisher={Paymefirst}") you will
>> >> get:
>> >>
>> >>  Foo, B. (1983). Title of the paper. In B. Bar (Ed.),
>> >> Booktitle. Paymefirst.
>> >>
>> >> The APA presumes that you have both an editor and a publisher for
>> >> pieces contained in other works. It calls for the use of the author
>> >> as publisher if no publisher is present. It is silent about what to
>> >> do if you have no editor.
>> > It looks like a missing editor field should be caught. What should
>> > the rule be?
>> >
>> > Actually, @inproceedings should not be used without an editor -
>> > makes no sense. If the author of the paper happens to be the
>> > editor, then the .bib data file should define this with an editor=
>> > field.
>> >
>> > We can change the behavior if a clear case can be made as to what
>> > fallback would make sense. Keep in mind the dictum: "garbage
>> > in/garbage out"...
>> >
>> > Alan
>>
>> For the case of works within works (inproceedings, inbook,
>> incollection, perhaps conference) I would think that the simplest
>> solution is to simply drop it, so that in the example above one would
>> simply get:
>>
>> Foo, B. (1983). Title of the paper. In /Booktitle/. Paymefirst.
>>
>> Although I do think that, at least for inproceedings, lack of an
>> editor should at least be flagged. A simple compilation of works may
>> have no named editor, of I see no reason to require it for inbook or
>> incollection. Cheap publishers regularly put out such collections of
>> out-of-copyright works.
>>
>> The implicit assumption that a work with no documented publisher is a
>> self-published work is not especially to my liking -- publishers may
>> have good reason to not identify themselves (think of the publishers
>> of the works of Spinoza and, in part, Voltaire) -- but I understand
>> that the APA thinks it important. Of course, if you cannot document
>> the publisher for an entry, you can explicitly list it as unknown or
>> /sine nomine/, as appropriate, to avoid the infelicity of having the
>> author's name just stuck in there.
>
> I sent a simple fix to Hans that handles the missing editor, silently.
> Someone who would want "Anonymous" or "unknown", or anything else can
> always put editor="Anonymous", etc. in their .bib database.

Thank you all for the precious comments.

The current LMTX appears to have almost fixed my issue, except that
inproceedings entries without a publisher have the text "Author"
instead of the publisher's name.

I must say that I have no requirement to use the APA style specifically;
I do it only because it uses the format (Name, Year) for the citation.
I guess that I could use another style (aps seems fine) and just
customize the citation format. I have tried with

\usebtxdataset[main.bib]
\setupbtx[default:cite][alternative=authoryear]
\usebtxdefinitions[aps]

but it seems that the setup command has no effect: the citations still
use numbers.

Nicola


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] t-vim module: no highlighting for custom filetypes

2021-05-27 Thread Aditya Mahajan
On Thu, 27 May 2021, Nicola wrote:

> On 2021-05-24, Aditya Mahajan  wrote:
> > On Fri, 21 May 2021, Nicola wrote:
> >
> >> I have only a minor annoyance: I have just noticed that -- is typeset as
> >> an en-dash in LMTX (but not in MKIV, as documented). Could you look into
> >> that?
> >
> > Fixed in the new release.
> 
> Thanks. I have updated to version 2021.05.23 and run `mtxrun
> --generate`. Syntax highlighting is fine, but with LMTX I'm still
> getting an en-dash. Below, a MWE.

Can you test if the file tests/vim/21-en-dash.tex works fine at your end:

https://github.com/adityam/filter/blob/dev/tests/vim/21-en-dash.tex

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] t-vim module: no highlighting for custom filetypes

2021-05-27 Thread Nicola
On 2021-05-24, Aditya Mahajan  wrote:
> On Fri, 21 May 2021, Nicola wrote:
>
>> I have only a minor annoyance: I have just noticed that -- is typeset as
>> an en-dash in LMTX (but not in MKIV, as documented). Could you look into
>> that?
>
> Fixed in the new release.

Thanks. I have updated to version 2021.05.23 and run `mtxrun
--generate`. Syntax highlighting is fine, but with LMTX I'm still
getting an en-dash. Below, a MWE.

Nicola

%
\usemodule[vim]

\startvimrc[name=pseudocode]
syntax keyword Statement while
syntax keyword Constant true
syntax region Comment start="--" end="\n" keepend
\stopvimrc

\definevimtyping[pseudocode][
  directory=code/, % NOTE: it MUST exist
  extras=pseudocode,
]

\starttext
  \startpseudocode
  while true -- Comment
  \stoppseudocode
\stoptext


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

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


[NTG-context] Advisable setupitaliccorrection in LuaMetaTeXT?

2021-05-27 Thread Eduardo Bohoyo

Hi.

Is it still necessary to use setupitaliccorrection if we have switched 
to LMTX?


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] setupindentations

2021-05-27 Thread Hans van der Meer
This macro \setupindentations  is mentioned in my ConText the manual from 
november 12, 2001.
It seems to have disappeared.
Is that so? Then why? What replacement?

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 / http://www.ntg.nl/mailman/listinfo/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] mathcolor attribute in MathML (mkiv)

2021-05-27 Thread Duncan Hothersall
Understood and appreciated, Hans, and many thanks for the patch which I
will be testing shortly.

Completely agree re the real world of MathML. We are still converting our
MathML masters to other formats after many years for various uses and fixes
because of the situation you describe with patchy and dodgy support
especially in the browser world. Maths on the web is still a little bit
wild west.

Thanks again.

Duncan

On Thu, 27 May 2021 at 18:00, Hans Hagen  wrote:

> On 5/27/2021 6:30 PM, Duncan Hothersall wrote:
> > Apologies Hans.
> >
> > MWE:
> >
> > \usemodule[newmml]
> > \starttext
> > \xmlprocessdata{}{
> >   
> >E
> >
> >  π
> >
> >   
> > }{}
> > \stoptext
> >
> > The π symbol does not show in red.
> Kind of trivial ... i'll send you a patched module.
>
> If you want you can check with the standard and see where we need to add
> it. I'll then adapt the mkiv file before taking a look at upgrading the
> lmtx one.
>
> For decades this mathml stuff has been a bit of a pain, because when one
> uses it for a mixed web / text project one always needs to satisfy the
> latest greatest either or not bugged web rendering, it disappearing from
> browsers, coming back, rendered remote or in the browser, mixed
> (in/with) asciimath which has its own tweaks. A pitty that content
> mathml never took off, probbably also due to the failure of openmath
> which took away attention from it and that we actually sort of
> support(ed). So when it comes to (reasonable quality) rendering in print
> one always runs a bit behind.
>
> I'm also always a bit hesitant to touch the code because it's actually
> used by a collegue in some (zero budget, so me looking at the mml is
> just hobbying) projects concerning math school books where often the web
> part controls the limitations and enforces weird coding (tens of
> thousands of files with plenty mathml). Btw, especially symbols are a
> mess and interfere with assumed structure, so that's always tricky to
> touch. Especially when you want to have it specific for (mid/high)
> school math.
>
> But anyway things like a bit of color and so are not that hard to
> support (more a matter of making sure performance is not hit).
>
> 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
> -
>


-- 
Duncan Hothersall, Operations Director
CAPDM Limited - Online Program Enablers
0131 677 2400  www.capdm.com
Registered in Scotland: SC168970   VAT: 682 846 983
Registered address: 20 Forth Street Edinburgh EH1 3LH UK


Capture, author, publish, deliver and manage your learning materials.


*Sign up to the CAPDM newsletter here *
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] mathcolor attribute in MathML (mkiv)

2021-05-27 Thread Hans Hagen

On 5/27/2021 6:30 PM, Duncan Hothersall wrote:

Apologies Hans.

MWE:

\usemodule[newmml]
\starttext
\xmlprocessdata{}{
  

   E
   
     π
   
  
}{}
\stoptext

The π symbol does not show in red.

Kind of trivial ... i'll send you a patched module.

If you want you can check with the standard and see where we need to add 
it. I'll then adapt the mkiv file before taking a look at upgrading the 
lmtx one.


For decades this mathml stuff has been a bit of a pain, because when one 
uses it for a mixed web / text project one always needs to satisfy the 
latest greatest either or not bugged web rendering, it disappearing from 
browsers, coming back, rendered remote or in the browser, mixed 
(in/with) asciimath which has its own tweaks. A pitty that content 
mathml never took off, probbably also due to the failure of openmath 
which took away attention from it and that we actually sort of 
support(ed). So when it comes to (reasonable quality) rendering in print 
one always runs a bit behind.


I'm also always a bit hesitant to touch the code because it's actually 
used by a collegue in some (zero budget, so me looking at the mml is 
just hobbying) projects concerning math school books where often the web 
part controls the limitations and enforces weird coding (tens of 
thousands of files with plenty mathml). Btw, especially symbols are a 
mess and interfere with assumed structure, so that's always tricky to 
touch. Especially when you want to have it specific for (mid/high) 
school math.


But anyway things like a bit of color and so are not that hard to 
support (more a matter of making sure performance is not hit).


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] mathcolor attribute in MathML (mkiv)

2021-05-27 Thread Duncan Hothersall
Apologies Hans.

MWE:

\usemodule[newmml]
\starttext
\xmlprocessdata{}{
 
  E
  
π
  
 
}{}
\stoptext

The π symbol does not show in red.

Duncan


On Thu, 27 May 2021 at 17:18, Hans Hagen  wrote:

> On 5/27/2021 5:47 PM, Duncan Hothersall wrote:
> > Hello list.
> >
> > I'm trying to use colour in some MathML formulae using the mathcolor
> > attribute. It seems to have no effect on the output. I can
> > see \applymmlmathcolor in the x-mathml.mkiv source but I can't see how
> > to make it work. Does anyone have any pointers?
> >
> > (Does lmtx support this?)
> MWE needed
>
> -
>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] mathcolor attribute in MathML (mkiv)

2021-05-27 Thread Hans Hagen

On 5/27/2021 5:47 PM, Duncan Hothersall wrote:

Hello list.

I'm trying to use colour in some MathML formulae using the mathcolor 
attribute. It seems to have no effect on the output. I can 
see \applymmlmathcolor in the x-mathml.mkiv source but I can't see how 
to make it work. Does anyone have any pointers?


(Does lmtx support this?)

MWE needed

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

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


[NTG-context] mathcolor attribute in MathML (mkiv)

2021-05-27 Thread Duncan Hothersall
Hello list.

I'm trying to use colour in some MathML formulae using the mathcolor
attribute. It seems to have no effect on the output. I can
see \applymmlmathcolor in the x-mathml.mkiv source but I can't see how to
make it work. Does anyone have any pointers?

(Does lmtx support this?)

Thanks.

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

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


Re: [NTG-context] new upload

2021-05-27 Thread Hans Hagen

On 5/27/2021 12:17 PM, mf wrote:

Il 25/05/21 18:20, Hans Hagen ha scritto:


Inserts are somewhat complex (and interwoven) and are also somewhat 
fuzzy when one wants to do checking when making progress on a page.  
We already deal with that in context in a reasonable way but I get the 
feeling that we can do better. This and the above are reasons to come 
up with a variant memory model that permits playing with additional 
features more easily. The existing storage model is stil there (after 
all it's tex) but for those willing to check the alternative, in 
page-ins.mkxl one can uncomment


    % \insertmode\plustwo

and remake the format.


I tested it with 2 volumes (632 and 936 pages). Both have 2 kinds of 
footnotes; in the first there are also footnotes inside footnotes.


diffpdf says the resulting PDFs are identical to the ones obtained with 
that line commented out.


So, regarding those two samples, the change has no effect in the output.

That's good news!

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

2021-05-27 Thread mf

Il 25/05/21 18:20, Hans Hagen ha scritto:


Inserts are somewhat complex (and interwoven) and are also somewhat 
fuzzy when one wants to do checking when making progress on a page.  We 
already deal with that in context in a reasonable way but I get the 
feeling that we can do better. This and the above are reasons to come up 
with a variant memory model that permits playing with additional 
features more easily. The existing storage model is stil there (after 
all it's tex) but for those willing to check the alternative, in 
page-ins.mkxl one can uncomment


    % \insertmode\plustwo

and remake the format.


I tested it with 2 volumes (632 and 936 pages). Both have 2 kinds of 
footnotes; in the first there are also footnotes inside footnotes.


diffpdf says the resulting PDFs are identical to the ones obtained with 
that line commented out.


So, regarding those two samples, the change has no effect in the output.

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

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