[NTG-context] \frac error

2021-04-18 Thread thierry horsin

Hi everybody

Since I updated to the last version of context , I cannot use \frac 
anymore in \startformula.


I get the following message "I can't work with sizes bigger than about 
19 feet. Continue and I'll use the

largest value I can."

Yet, between $ $ it is fine.



Any ideas ?

Many thanks.


___
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] Change to wordright behavior?

2021-04-18 Thread Rik Kabel

Dear all,

At some time in the last couple of years the behavior of \wordright 
seems to have changed, at least in the following situation. With the 
following example:


   \starttext
   \hsize3cm
  Aaa\wordright{Aaa}\par
  \sc{Bbb\wordright{Bbb}}\par
  {\sc Ccc\wordright{Ccc}}\par
  \sc{Ddd}\wordright{\sc{Ddd}}\par
   \stoptext

Produces:

The second and third lines with \wordright (Bbb and Ccc) each generate 
two lines. They previously produced one line each. Placing each part of 
the line in its own \sc addresses it here (Ddd), but it does seem that 
it should not be necessary to do that. Was this an intentional change?


--
Rik


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

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


[NTG-context] Analyze hyphenations

2021-04-18 Thread denis.maier
Hi,

a couple of weeks ago Hans has implemented a tracker that adds a list of 
hyphentated words to the log file. I finally managed to play with this. The 
result is attached to this mail.
This will permit analyzing hyphenations based on a ConTeXt log file. You need 
to enable hyphenation tracking in the ConTeXt file with 
\enabletrackers[hyphenation.applied]. Then, you can run the script with
lua check-hyphens.lua input_file whitelist.ending
As we assume .log for the input_file, the input file should be supplied without 
file ending. For the (optional) whitelist a file ending has to be supplied.

Maybe I should wikify this, any suggestion where that would fit?
HTH,
Denis


check-hyphens.lua
Description: check-hyphens.lua
___
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] lmtx update: two experimental features

2021-04-18 Thread Hans Hagen

Hi,

I uploaded a new version. There are two new features that are 
experimental. This time we attempt to deal with the more tricky things 
and artifacts of the otherwise nice tex machinery we need to get rid of. 
One can rightfully argue that they are not really issues as one can work 
around them (and so they are never brought to attention) but why not 
make things better (cleaner) if we can.



(1) Languages: hyphenation normally uses a hyphen and the engine has 
some messy work-around-border-cases in the hyphenator. So, I wondered if 
we could improve that.


First of all, there can now be more than one hyphen character so here is 
the way to deal with it (the hyphenchar code is like the other 'codes'):


\hccode"002D = "002D
\hccode"2010 = "2010
\hccode"2013 = "2013
\hccode"2014 = "2014

This makes all these four into (kind of) compound word seperators:

\startTEXpage \hsize3mm
firstpart\char"002D secondpart\blank
firstpart\char"2010 secondpart\blank
firstpart\char"2013 secondpart\blank
firstpart\char"2014 secondpart
\stopTEXpage

will work ok. There are provisions for those characters being at the 
left and right edges. All is under low level (engine) option controls 
(compatibility and such) but currently I enable all. With a bit of 
definitions one can for the 002D and 2010 cases deal with pre/post 
variants .. the question is do we need that for more, if so, then I need 
to add some more code (doable).


This feature relates to Denis collection of German compound words and 
ligature prevention data. Dutch has the same issue. (Denis: we can ditch 
the compound word entries now, the ones with -.)


Also, this kind of automatism (keep in mind that normally tex won't 
hyphenate the first word in such a compound) is especially handy in 
cases where there is no control over the input as with xml (when we do 
have control you can use || as compound word marker).


(I'm wondering if we should deal with the typical somewhat archaic tex 
-- and --- in a different manner, but I'll come back to that.)



(2) Math: what is added is not so much an issue in traditional tex math 
usage which is for journals but as context is used for educational 
purposes and thereby has quite some tricks built in. Some of these jump 
through ugly hoops to get it done. Here I stick to color as example.


Just try this (notice the spacing):

\startTEXpage[offset=10pt]
\showmakeup[mathglue]%
\enableexperiments[simplegroups]%
$ a = b \color[red]{=} c \startcolor[blue]=\stopcolor d $\par
$ \sin \color[green]{(x)} = \sin {(x)} $\par
\disableexperiments[simplegroups]%
$ a = b \color[red]{=} c \startcolor[blue]=\stopcolor d $\par
$ \sin \color[green]{(x)} = \sin {(x)}$\par
\stopTEXpage

The 'simplegroups' experiment enables a more hybrid grouping model but 
we (read: Wolfgang, Aditya and I, but input is welcome) need to check 
for side effects carefully.


The 'mathglue' tracker is also new, and it exposes what actually goes 
on. It has to do with the fact that something grouped with { } creates a 
math list which enforces different spacing but in the case of color that 
is a side effect we don't want (of course it relates to how context 
implements the \color macro and one could work around it, but the 
problem is of a more general nature.



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] Sorting items in Lua

2021-04-18 Thread Jairo A. del Rio
Oh, yes, I've just found it. Thanks!

Jairo

El dom, 18 de abr. de 2021 a la(s) 10:52, Hans Hagen (j.ha...@xs4all.nl)
escribió:

> On 4/18/2021 4:21 PM, Jairo A. del Rio wrote:
>
> > Also, as registers allow to set a language for sorting, I want to know
> > how to do the same through Lua, e.g., sorting the same list according to
> > English and then Spanish rules. I've searched for examples in the
> > archive, but I've only found cases working on the TeX side. Thank you in
> > advance.
>
> hint: the test suite
>   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] Sorting items in Lua

2021-04-18 Thread Hans Hagen

On 4/18/2021 4:21 PM, Jairo A. del Rio wrote:

Also, as registers allow to set a language for sorting, I want to know 
how to do the same through Lua, e.g., sorting the same list according to 
English and then Spanish rules. I've searched for examples in the 
archive, but I've only found cases working on the TeX side. Thank you in 
advance.


hint: the test suite
 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] \externalfigure for only one page of a multiple page pdf

2021-04-18 Thread a . rosenstock
Thank you, Hraban!

 

A.

 
 

Gesendet: Donnerstag, 15. April 2021 um 19:01 Uhr
Von: "Henning Hraban Ramm" 
An: "mailing list for ConTeXt users" 
Betreff: Re: [NTG-context] \externalfigure for only one page of a multiple page pdf


> Am 15.04.2021 um 18:55 schrieb a.rosenst...@web.de:
>
> Hi all,
>
> how is it possible to include only one page of a multiple page pdf in my document? I found nothing in the manuals ...

Dou you mean via \externalfigure?
It has a documented "page" parameter:
https://wiki.contextgarden.net/Command/setupexternalfigure

To include a whole pdf as full pages, you can use \copypages,
but in your case you’d need \filterpages:
https://wiki.contextgarden.net/Command/filterpages

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

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



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

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


[NTG-context] Sorting items in Lua

2021-04-18 Thread Jairo A. del Rio
Hi, list. I want to know how to use ConTeXt sorters, as those used in
registers, in Lua. Like this:

\starttext

\startluacode

--Spanish

local list = {"ñandú", "perrera", "zócalo", "árnica"}

--What's "sortingfunction"?

context(table.concat(sortingfunction(list)," "))

\stopluacode

\stoptext

Also, as registers allow to set a language for sorting, I want to know how
to do the same through Lua, e.g., sorting the same list according to
English and then Spanish rules. I've searched for examples in the archive,
but I've only found cases working on the TeX side. Thank you in advance.

Jairo
___
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] No space between \cite and next word.

2021-04-18 Thread Mikael Sundqvist
Hi,

thanks! That seems like a fair list of commands.

To the mailing list: The commands listed in the previous mail all have
more than one argument (in square brackets [ ]). We had a discussion
off list, and commands such as \in will as I understood it also keep
spaces, but it has only one argument (in square brackets [ ], there
are two optional arguments in addition, but they come in braces { }).

I assume that I should wikify this, but I do not currently see where
it would be good to put it.

/Mikael

On Sun, Apr 18, 2021 at 1:40 PM Hans Hagen  wrote:
>
> On 4/16/2021 12:00 PM, Mikael Sundqvist wrote:
> > Hi,
> >
> > I think there has been some change recently. Is it on purpose that
> > there is no space after the \cite. Look how the parenthesis that ends
> > the citation and the word "text" are set without space inbetween.
> >
> > /Mikael
> >
> > \startbuffer[mybib]
> > @article{a,
> >author = {An Author},
> >title = {A title},
> >year = {2021},
> > }
> > \stopbuffer
> >
> > \usebtxdefinitions[apa]
> >   \usebtxdataset[mybib.buffer]
> >
> > \starttext
> >
> > Text \cite[a] text.
> >
> > \placelistofpublications
> >
> > \stoptext
> Wolfgang and I agreed upon the following commands keeping spaces
>
> \cite (and variants)
> \citation (and variants)
> \date
> \figuresymbol
> \note
> \notesymbol
> \symbol
> \typeinlinebuffer
> \externalfigure
>
> 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] No space between \cite and next word.

2021-04-18 Thread Hans Hagen

On 4/16/2021 12:00 PM, Mikael Sundqvist wrote:

Hi,

I think there has been some change recently. Is it on purpose that
there is no space after the \cite. Look how the parenthesis that ends
the citation and the word "text" are set without space inbetween.

/Mikael

\startbuffer[mybib]
@article{a,
   author = {An Author},
   title = {A title},
   year = {2021},
}
\stopbuffer

\usebtxdefinitions[apa]
  \usebtxdataset[mybib.buffer]

\starttext

Text \cite[a] text.

\placelistofpublications

\stoptext

Wolfgang and I agreed upon the following commands keeping spaces

\cite (and variants)
\citation (and variants)
\date
\figuresymbol
\note
\notesymbol
\symbol
\typeinlinebuffer
\externalfigure

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] Macro to write a letter with \ mathscript{}

2021-04-18 Thread Fabrice Couvreur
Hi Hans and Wolfgang,
I have tried your suggestions and it seems to work.
Thank you so much.
Fabrice

Le sam. 17 avr. 2021 à 19:04, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> a écrit :

> Fabrice Couvreur schrieb am 17.04.2021 um 16:30:
>
> Hi,
> This is going to be difficult to explain because the code below works but
> in a project with many components does not. Actually the macro does not
> work in the definition environment in my project but in the same
> environment of this simple code yes. Thank you for your possible help.
>
>
> Without more information or a better example there is nothing which can be
> done.
>
> It's possible you have multiple definitions for the command in your style
> file,
> you can also try if adding \usebodyfont[stixtwo] (or
> \definebodyfont[...pt] when
> you use a unconventional font size) to your setups.
>
> Wolfgang
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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