[NTG-context] running head for TOC

2021-01-18 Thread jbf
I have a very long Table of Contents (runs across five pages) and the 
author would like the running head on recto pages for this to be 'Table 
of Contents'.


I am using the following to create the TOC head:

\definehead
  [tochead]
  [title]

\starttochead[title={Table of Contents}]
\setupheader[state=start]
  \placecombinedlist[content]
\stoptochead

And I use the following to set up the headertexts for the book as a whole:

\setupheadertexts
  [{\hfill\getmarking[chapter]\hfill}][] %recto pages
  [{\hfill\documentvariable{metadata:title}\hfill}][] %verso pages

The problem is that I am unable to get 'Table of Contents' as a running 
head for the two recto pages where I need it. I realise I need to get 
'tochead' recognised somehow for this.  If I set up a separate 
\setupheadertexts [{\hfill\getmarking[tochead]\hfill}][] then I end up 
with 'Table of Contents as the running head on all recto pages, which I 
don't want.


Can anyone suggest how can I get 'Table of Contents' as the running head 
just for the two recto pages of a five page TOC?


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] 3 questions about xtables after reading manuals

2021-01-18 Thread Andres Conrado Montoya
I've been trying out xtables and reading the manual, some things I can't
find how to do (or if it's possible on xtables):

1. How to align whole columns. It seems I have to add [align=middle] to
each cell I want to have centered in a raggedright aligned table. In
tabulate you can use [|l|c|] to do this, is it possible in xtables? Seems
weird if it's not. Or did I miss something?

2. I know how to use [option=stretch] to fill the textwidth, but can I make
specific columns "tight", so they don't get stretched beyond their content?

3. When I use [option=tight] sometimes columns are narrowed so much as to
break a line of 4 or 5 words. MWE:

%
\startplacetable[location=none]
%\startxtable[align={middle,lohi},option=tight] % This makes the first
column too narrow. Lines are not that long
\startxtable[align={middle,lohi}]
\startxtablehead[head]
\startxrow
\startxcell[align=right] \strong{Concepto}\crlf\small{Cifras en miles de
pesos} \stopxcell
\startxcell \strong{Dato} \stopxcell
\stopxrow
\stopxtablehead
\startxtablebody[body]
\startxrow
\startxcell[align=right] Bono \stopxcell
\startxcell Ordinario \stopxcell
\stopxrow
\startxrow
\startxcell[align=right] Valor nominal \stopxcell
\startxcell \$100\,000 \stopxcell
\stopxrow
\startxrow
\startxcell[align=right] Tasa cupón - periodicidad anual \stopxcell
\startxcell 12,50\,\letterpercent{} \stopxcell
\stopxrow
\startxrow
\startxcell[align=right] Cupón \stopxcell
\startxcell \$12\,500 \stopxcell
\stopxrow
\startxrow
\startxcell[align=right] Vencimiento en años \stopxcell
\startxcell 5 \stopxcell
\stopxrow
\startxrow
\startxcell[align=right] Tasa de negociación (tasa de mercado) \stopxcell
\startxcell 12,50\,\letterpercent{} \stopxcell
\stopxrow
\startxrow
\startxcell[align=right] Precio de venta \stopxcell
\startxcell \$100\,000 \stopxcell
\stopxrow
\startxrow
\startxcell[align=right] Costos de transacción/ precio de venta \stopxcell
\startxcell 0 \stopxcell
\stopxrow
\startxrow
\startxcell[align=right] Fecha de emisión \stopxcell
\startxcell 30-mar-X6 \stopxcell
\stopxrow
\stopxtablebody
\stopxtable
\stopplacetable


Can I make this table to be "tight" but only so much as to allow "short
lines" (i.e: lines that don't make the table go wider than textwidth). I
can do it with manual width, but wondering if it's possible.

Thank you .

-- 
Andrés Conrado Montoya
Andi Kú
andresconr...@gmail.com
http://sesentaycuatro.com
http://messier87.com
http://chiquitico.org

Los fines no justifican los medios, porque la medida verdadera de nuestro
carácter está dada por los medios que estamos dispuestos a utilizar, no por
los fines que proclamamos.


“You develop an instant global consciousness, a people orientation, an
intense dissatisfaction with the state of the world, and a compulsion to do
something about it. From out there on the moon, international politics look
so petty. You want to grab a politician by the scruff of the neck and drag
him a quarter of a million miles out and say, ‘Look at that, you son of a
bitch.’” — Apollo 14 astronaut Edgar Mitchell
___
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] LMTX isn't typesetting math correctly with Pagella

2021-01-18 Thread Mikael Sundqvist
On Sun, Jan 17, 2021 at 10:00 PM Hans Hagen  wrote:

> On 1/16/2021 12:33 AM, Hans Hagen wrote:
> > On 1/15/2021 1:33 PM, Jack Hill wrote:
> >> Hi,
> >>
> >> I've been having some trouble with ConTeXt not typesetting math
> >> correctly when using the Pagella font (I do not know if the same issue
> >> occurs with other fonts as I haven't tested them).
> >>
> >> If I compile with LMTX, the spacing between letters becomes very small
> >> so that when I type "|f|", for example, the second "|" intersects the
> >> f and looks rather ugly. However, compiling with the --luatex switch
> >> fixes these issues and the math looks nice again.
> >>
> >> Can anybody else replicate this issue, and does anybody know why it is
> >> happening?
> >>
> >> This the code I used to test:
> >>
> >> |\setupbodyfont[pagella] \starttext \startformula |f| = \sqrt{\int_0^1
> >> |f(t)|^2 \text{d}t} \stopformula \stoptext |||
> > I'll check it ... smells like some interference between newer and older
> > corrections (these gyre fonts need some special treatment).
> I uploaded lmtx.
>
> Here is the story about math:
>
> - there is traditional math, the 8 bit fonts (from Don Knuth)
> - and there is opentype math (originating at Microsoft)
>
> the eight bit fonts are all modelled after the cmr fonts so they have
> the same set of parameters, the same assumptions about family 2 and 3,
> use the same width/height/depth trickery
>
> one thing is that they lie about the width: the italic correction is
> subtracted from the width and the engine always adds it when a glyph is
> dealt with but then removes in some cases afterwards
>
> in opentype we also have italic correction but that is applied in
> specific cases; there the shapes have a real width
>
> (there are tricks to make fonts seen as opentype be treated as old
> school which work ok for virtual constructs that only use those 8 bit
> fonts but often fail for gyre fonts)
>
> now, the gust foundation fonts are a mix: they are opentype, have its
> parameters and properties but have the wrong width and assume the italic
> hackery
>
> the microsoft cambria font is the reference for opentype math (and to
> some extend microsoft word also is)
>
> afaik xetex uses the old tex approach also for opentype so that is why
> probably the old width approach works ok there but i never looked into
> it; cambria is an opentype font but probably seldom used so side effects
> will go unnoticed, also, texies often have no problem blaming microsoft,
> even when they got it right; of course we have to admit that 'moving
> forward wrt math fonts' didn't come from our community so we just have
> to follow
>
> now, when we move on (with context + luametatex) to a variants font
> scaling model, i need to adapt the math machinery to deal with that ...
> this can have side effects as you noticed but these will be dealt with
> (or fixed when something is wrong)
>
> in context we have font goodies that can handle this (widths, kerns etc)
> and we do so for at least the 'f' which also has a strange left offset
> ... i now adapted that to also serve the new (compact context font)
> model and also make sure that the smaller sizes for mkiv are handled; we
> can add more in those files, but that's also a (math) user effort
>
> to be decided is of we use the feature setting "mathkerns=yes" (this was
> a directive but i made it just a feature)
>
> Now, ideally:
>
> \enableexperiments[fonts.compact] % for the definitions
>
> should give nearly similar results (but less mem usage, less fonts
> loaded and possibly some performance gain)
>
> I also updated some test features:
>
> \definefontfeature[mathextra][staircase=yes,boundingbox=frame]
>
> as part of the general lmtx upgrading process. Only cambria (and lucida)
> have these staircase kerns and e.g. pagella and friends have a few
> defined in the font goodies but one has to do something liek this:
>
>
>
> \definefontfeature[mathextra][mathkerns=yes,staircase=yes,boundingbox=frame]
>
> more such tracers will be added in due time (and some old ones will go
> away as they lost their purpose).
>
> Hans
>
>
I got curious about those staircase kerns. Is there a simple example that
shows their effect? I greped the source, but did not find anything where I
could see a difference.

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

2021-01-18 Thread Hans Hagen

Hi,

There's a new lmtx upload with a few fixes in publication lists (TS made 
some tests).


For those who like fonts, there is an update of the punk font (the mkiv 
variants dates from 2008 which is ancient on a software timeline).


You can run

  meta-imp-punk.mkxl

to get an idea. There's also a typescript:

  type-imp-punk.mkxl

one can create different versions and play with random variants and 
such. The question is: do we need more metapost font magic and 
infrastructure?


For "pdf features that browsers implement fuzzy or not at all" lovers 
there is


test
\startalternate[text={A}]
\dorecurse{10}{A }
\startalternate[text={B}]
 \dorecurse{10}{B }
\stopalternate
 \dorecurse{10}{A }
\stopalternate
test \par


test \startalternate[text={e=mc^2}]!$e=mc^2$\stopalternate\par
test \alternate{e=mc^2}{copy:}\nbsp$e=mc^2$\par

which cheats on cut and paste (if you know where to click). (It actually 
will replace something more low level which is probably not used 
anyway.)


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] "Nicefracs" hidden in math-frc.mkiv

2021-01-18 Thread Hans Hagen

On 1/18/2021 5:17 PM, Andres Conrado Montoya wrote:

Hello, list.

I Was checking out math-frc.mkiv to learn stuff, and found out that at 
the end of that file, from line 673, there is a couple commented out 
macros to generate "nice fractions'', i.e.: ½ (as in the LaTeX package 
nicefrac). Why has this code been commented out? These are quite useful.
because text fraction seldom look good in math when combined with other 
script sizes that are needed to complement the missing nice fractions


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
___


[NTG-context] "Nicefracs" hidden in math-frc.mkiv

2021-01-18 Thread Andres Conrado Montoya
Hello, list.

I Was checking out math-frc.mkiv to learn stuff, and found out that at the
end of that file, from line 673, there is a couple commented out macros to
generate "nice fractions'', i.e.: ½ (as in the LaTeX package nicefrac). Why
has this code been commented out? These are quite useful.

-- 
Andrés Conrado Montoya
Andi Kú
andresconr...@gmail.com
http://sesentaycuatro.com
http://messier87.com
http://chiquitico.org

Los fines no justifican los medios, porque la medida verdadera de nuestro
carácter está dada por los medios que estamos dispuestos a utilizar, no por
los fines que proclamamos.


“You develop an instant global consciousness, a people orientation, an
intense dissatisfaction with the state of the world, and a compulsion to do
something about it. From out there on the moon, international politics look
so petty. You want to grab a politician by the scruff of the neck and drag
him a quarter of a million miles out and say, ‘Look at that, you son of a
bitch.’” — Apollo 14 astronaut Edgar Mitchell
___
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] Getting dimensions in Lua

2021-01-18 Thread Jairo A. del Rio
To be wikified (by me, obviously). Thank you for such a great number of
alternatives.

Jairo :)

El lun, 18 de ene. de 2021 a la(s) 04:45, Hans Hagen (j.ha...@xs4all.nl)
escribió:

> On 1/18/2021 1:58 AM, Jairo A. del Rio wrote:
> > Hi, list.
> >
> > I want to get some dimensions in Lua. See, for instance
> >
> > \starttext
> >
> > \the\dimexpr\availablehsize\relax %say, 426pt
> >
> > \stoptext
> >
> > Is there an equivalent in ConTeXt for Lua, i.e. without passing values
> > from TeX or, at least, using only Lua commands? Thank you in advance.
> tex being tex, there is always a way ...
>
> 1: \number\dimexpr\availablehsize\relax
>
> 2: \startluacode
>
> token.set_macro(tex.ctxcatcodes,"temp","\\scratchdimen\\availablehsize")
>  token.expand_macro("temp")
>  context(tex.getdimen("scratchdimen"))
> \stopluacode
>
> 3: \startluacode
>
> token.set_macro(tex.ctxcatcodes,"temp","\\scratchdimen\\availablehsize")
>  tex.runlocal("temp")
>  context(tex.getdimen("scratchdimen"))
> \stopluacode
>
> 4: \startluacode
>  tex.print("\\scratchdimen\\availablehsize")
>  tex.pushlocal()
>  tex.poplocal()
>  context(tex.getdimen("scratchdimen"))
> \stopluacode
>
> 5: \startluacode
>  tex.print("\\dimensiondef\\temp\\availablehsize")
>  tex.pushlocal()
>  tex.poplocal()
>  context(tex.getdimensionvalue("temp"))
> \stopluacode
>
> \def\calculateavailablehsize{\dimensiondef\temp\availablehsize}
>
> 6: \startluacode
>  token.expand_macro("calculateavailablehsize")
>  context(tex.getdimensionvalue("temp"))
> \stopluacode
>
> \newtoks\tcalculateavailablehsize
> \tcalculateavailablehsize{\dimensiondef\temp\availablehsize}
>
> 7: \startluacode -- mkiv
>  tex.runtoks("tcalculateavailablehsize")
>  context(tex.getdimensionvalue("temp"))
> \stopluacode
>
> i'm (still) considering a way to flag a macro to be an expression (or
> value) but there are several variants possible but normally it takes a
> while before i decide what makes most sense (as i need to apply it in
> real code to see if it looks nice)
>
> 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] Getting dimensions in Lua

2021-01-18 Thread Jairo A. del Rio
Woah, nice! I was trying to pass some values to MetaPost via Lua (usual
laziness to learn macro languages). Thank you a lot, especially because I
was looking at the wrong functions in the token namespace. I'll upload a
more specific example soon while I polish some code. Very thankful.

Jairo :)

El lun, 18 de ene. de 2021 a la(s) 05:02, Taco Hoekwater (t...@bittext.nl)
escribió:

>
>
> > On 18 Jan 2021, at 10:45, Hans Hagen  wrote:
> >
> > On 1/18/2021 1:58 AM, Jairo A. del Rio wrote:
> >> Hi, list.
> >> I want to get some dimensions in Lua. See, for instance
> >> \starttext
> >> \the\dimexpr\availablehsize\relax %say, 426pt
> >> \stoptext
> >> Is there an equivalent in ConTeXt for Lua, i.e. without passing values
> from TeX or, at least, using only Lua commands? Thank you in advance.
> > tex being tex, there is always a way ...
>
> There is also this option:
>
>% function returns scaled points
>\startluacode
>function availablehsize()
>   local l = tex.dimen.hsize - tex.skip.leftskip.width -
> tex.skip.rightskip.width
>   if tex.count.hangafter<0 then
>  local h = tex.dimen.hangindent
>  if h>0 then  l = l - h else l = l + h end
>   end
>   return l
>end
>\stopluacode
>
> But I suspect that there are multiple cases where this does not work
> (like when used in horizontal mode, for example if the par setting changes
> before the \par is seen, or when there is data in the local par node)
>
> Best wishes,
> Taco
>
> —
> Taco Hoekwater  E: t...@bittext.nl
> genderfluid (all pronouns)
>
>
>
>
>
>
>
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 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] Getting dimensions in Lua

2021-01-18 Thread Taco Hoekwater


> On 18 Jan 2021, at 10:45, Hans Hagen  wrote:
> 
> On 1/18/2021 1:58 AM, Jairo A. del Rio wrote:
>> Hi, list.
>> I want to get some dimensions in Lua. See, for instance
>> \starttext
>> \the\dimexpr\availablehsize\relax %say, 426pt
>> \stoptext
>> Is there an equivalent in ConTeXt for Lua, i.e. without passing values from 
>> TeX or, at least, using only Lua commands? Thank you in advance.
> tex being tex, there is always a way ...

There is also this option:

   % function returns scaled points
   \startluacode
   function availablehsize() 
  local l = tex.dimen.hsize - tex.skip.leftskip.width - 
tex.skip.rightskip.width
  if tex.count.hangafter<0 then
 local h = tex.dimen.hangindent
 if h>0 then  l = l - h else l = l + h end
  end
  return l 
   end
   \stopluacode

But I suspect that there are multiple cases where this does not work
(like when used in horizontal mode, for example if the par setting changes 
before the \par is seen, or when there is data in the local par node)

Best wishes,
Taco

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







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

maillist : ntg-context@ntg.nl / 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] Getting dimensions in Lua

2021-01-18 Thread Hans Hagen

On 1/18/2021 1:58 AM, Jairo A. del Rio wrote:

Hi, list.

I want to get some dimensions in Lua. See, for instance

\starttext

\the\dimexpr\availablehsize\relax %say, 426pt

\stoptext

Is there an equivalent in ConTeXt for Lua, i.e. without passing values 
from TeX or, at least, using only Lua commands? Thank you in advance.

tex being tex, there is always a way ...

1: \number\dimexpr\availablehsize\relax

2: \startluacode

token.set_macro(tex.ctxcatcodes,"temp","\\scratchdimen\\availablehsize")
token.expand_macro("temp")
context(tex.getdimen("scratchdimen"))
\stopluacode

3: \startluacode

token.set_macro(tex.ctxcatcodes,"temp","\\scratchdimen\\availablehsize")
tex.runlocal("temp")
context(tex.getdimen("scratchdimen"))
\stopluacode

4: \startluacode
tex.print("\\scratchdimen\\availablehsize")
tex.pushlocal()
tex.poplocal()
context(tex.getdimen("scratchdimen"))
\stopluacode

5: \startluacode
tex.print("\\dimensiondef\\temp\\availablehsize")
tex.pushlocal()
tex.poplocal()
context(tex.getdimensionvalue("temp"))
\stopluacode

\def\calculateavailablehsize{\dimensiondef\temp\availablehsize}

6: \startluacode
token.expand_macro("calculateavailablehsize")
context(tex.getdimensionvalue("temp"))
\stopluacode

\newtoks\tcalculateavailablehsize 
\tcalculateavailablehsize{\dimensiondef\temp\availablehsize}


7: \startluacode -- mkiv
tex.runtoks("tcalculateavailablehsize")
context(tex.getdimensionvalue("temp"))
\stopluacode

i'm (still) considering a way to flag a macro to be an expression (or 
value) but there are several variants possible but normally it takes a 
while before i decide what makes most sense (as i need to apply it in 
real code to see if it looks nice)


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] question about vardef variables

2021-01-18 Thread Taco Hoekwater


> On 17 Jan 2021, at 11:17, Damien Thiriet  wrote:
> 
> Hi,
> 
> 
> I have some troubles with understanding metafun's macro mechanism.
> 
> Given this MWE:
> 
> \starttext
> \startMPpage
> 
> vardef Test (expr ab,cd)=
>   %numeric ab;
>   %numeric cd;
>   draw unitsquare scaled 10 xshifted ab;
>   draw unitsquare scaled 10 yshifted cd;
> enddef;
> 
> Test (50,100);
> \stopMPpage
> \stoptext
> 
> Uncommenting the two declarations makes me run intro a silent error. I was 
> lucky enough yesterday to get an explicit error message with a more 
> complex macro.  It made me figure out where my problems came from.
> 
> So here are my two questions:
> - Why shouldn't we tell metafun if expr is a path, a pair or so on?

You were (attempting to) redefine the macro’s arguments, but they are read-only.

A somewhat longer answer: the type of macro arguments in this case is “expr”. 
Metapost argument types are based solely on what the internal language parser 
needs to interpret the code; the language is not strongly typed.

Also, during macro expansion, your code is replaced by:

  %numeric (READONLY TEMP VALUE 1);
  %numeric (READONLY TEMP VALUE 2);
  draw unitsquare scaled 10 xshifted (READONLY TEMP VALUE 1);
  draw unitsquare scaled 10 yshifted (READONLY TEMP VALUE 2);

Best wishes,
Taco

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







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

maillist : ntg-context@ntg.nl / 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] Getting dimensions in Lua

2021-01-17 Thread Jairo A. del Rio
Hi, list.

I want to get some dimensions in Lua. See, for instance

\starttext

\the\dimexpr\availablehsize\relax %say, 426pt

\stoptext

Is there an equivalent in ConTeXt for Lua, i.e. without passing values from
TeX or, at least, using only Lua commands? Thank you in advance.

Best wishes,

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] expansion of xml userdata

2021-01-17 Thread Jano Kula
On Sun, 17 Jan 2021 at 21:27, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> > Do you know how to force expansion of userdata?
>
> You can drop "expansion=yes" when you use
>
> \normalexpanded{\startsection[..,..=..,..][..,..=..,..]}
>
> Wolfgang
>

Wow, this was fater then filling my glass. And it works even for userdata.
Thank you, Wolfgang.
Added to wiki \setuphead  and
Interaction .

To finish the story of expansion parameter, what is expansion=xml good for?

Jano
___
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] LMTX isn't typesetting math correctly with Pagella

2021-01-17 Thread Hans Hagen

On 1/16/2021 12:33 AM, Hans Hagen wrote:

On 1/15/2021 1:33 PM, Jack Hill wrote:

Hi,

I've been having some trouble with ConTeXt not typesetting math 
correctly when using the Pagella font (I do not know if the same issue 
occurs with other fonts as I haven't tested them).


If I compile with LMTX, the spacing between letters becomes very small 
so that when I type "|f|", for example, the second "|" intersects the 
f and looks rather ugly. However, compiling with the --luatex switch 
fixes these issues and the math looks nice again.


Can anybody else replicate this issue, and does anybody know why it is 
happening?


This the code I used to test:

|\setupbodyfont[pagella] \starttext \startformula |f| = \sqrt{\int_0^1 
|f(t)|^2 \text{d}t} \stopformula \stoptext |||
I'll check it ... smells like some interference between newer and older 
corrections (these gyre fonts need some special treatment).

I uploaded lmtx.

Here is the story about math:

- there is traditional math, the 8 bit fonts (from Don Knuth)
- and there is opentype math (originating at Microsoft)

the eight bit fonts are all modelled after the cmr fonts so they have 
the same set of parameters, the same assumptions about family 2 and 3, 
use the same width/height/depth trickery


one thing is that they lie about the width: the italic correction is 
subtracted from the width and the engine always adds it when a glyph is 
dealt with but then removes in some cases afterwards


in opentype we also have italic correction but that is applied in 
specific cases; there the shapes have a real width


(there are tricks to make fonts seen as opentype be treated as old 
school which work ok for virtual constructs that only use those 8 bit 
fonts but often fail for gyre fonts)


now, the gust foundation fonts are a mix: they are opentype, have its 
parameters and properties but have the wrong width and assume the italic 
hackery


the microsoft cambria font is the reference for opentype math (and to 
some extend microsoft word also is)


afaik xetex uses the old tex approach also for opentype so that is why 
probably the old width approach works ok there but i never looked into 
it; cambria is an opentype font but probably seldom used so side effects 
will go unnoticed, also, texies often have no problem blaming microsoft, 
even when they got it right; of course we have to admit that 'moving 
forward wrt math fonts' didn't come from our community so we just have 
to follow


now, when we move on (with context + luametatex) to a variants font 
scaling model, i need to adapt the math machinery to deal with that ... 
this can have side effects as you noticed but these will be dealt with 
(or fixed when something is wrong)


in context we have font goodies that can handle this (widths, kerns etc) 
and we do so for at least the 'f' which also has a strange left offset 
... i now adapted that to also serve the new (compact context font) 
model and also make sure that the smaller sizes for mkiv are handled; we 
can add more in those files, but that's also a (math) user effort


to be decided is of we use the feature setting "mathkerns=yes" (this was 
a directive but i made it just a feature)


Now, ideally:

   \enableexperiments[fonts.compact] % for the definitions

should give nearly similar results (but less mem usage, less fonts 
loaded and possibly some performance gain)


I also updated some test features:

   \definefontfeature[mathextra][staircase=yes,boundingbox=frame]

as part of the general lmtx upgrading process. Only cambria (and lucida) 
have these staircase kerns and e.g. pagella and friends have a few 
defined in the font goodies but one has to do something liek this:



\definefontfeature[mathextra][mathkerns=yes,staircase=yes,boundingbox=frame]

more such tracers will be added in due time (and some old ones will go 
away as they lost their purpose).


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] expansion of xml userdata

2021-01-17 Thread Wolfgang Schuster

Jano Kula schrieb am 17.01.2021 um 21:22:

Hello to everybody!

\setuphead[section][expansion=yes] expands xml reference to the actual 
content in TUC file:


\xmlatt {xml:name::4}{title} → First section

for titles & bookmarks. The same is not true for userdata (mkiv & mkxl). 
Do you know how to force expansion of userdata?



You can drop "expansion=yes" when you use

\normalexpanded{\startsection[..,..=..,..][..,..=..,..]}

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] expansion of xml userdata

2021-01-17 Thread Jano Kula
Hello to everybody!

\setuphead[section][expansion=yes] expands xml reference to the actual
content in TUC file:

\xmlatt {xml:name::4}{title} → First section

for titles & bookmarks. The same is not true for userdata (mkiv & mkxl). Do
you know how to force expansion of userdata?

MWE attached.

Thank you,
Jano

\startbuffer[doc]



text


text


\stopbuffer

\setuphead[section][expansion=yes]
\setuplist[section][alternative=command,
command=\SectionListCommand]

\define[3]\SectionListCommand{%
   {\bf#1\par
   title: #2\par
   usertitle: \structurelistuservariable{usertitle}}\par
   \blank
   \endgraf}

\startxmlsetups xml:name
\xmlsetsetup{\xmldocument}{document|section}{xml:name:*}
\stopxmlsetups
\xmlregistersetup{xml:name}

\startxmlsetups xml:name:document
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:name:section
\startsection[title=\xmlatt{#1}{title}]
 [usertitle=\xmlatt{#1}{title}]
\stopsection
\stopxmlsetups

\starttext
\placelist[section]
\xmlprocessbuffer{xml:name}{doc}{}
\stoptext


xml-one-file-head-toc.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 / 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] question about vardef variables

2021-01-17 Thread Jeong Dal
Dear Damien Thiriet,

If you change ‘vardef’ to ‘def’, you will get the figure.
There is a difference between ‘vardef’ and ‘def’.
AFAIK, vardef returns the value of the last statement in the macro.
Please see  the examples in Metafun manual from page 32 ~ .
I hope that you find your answer there.

I am sorry that I am not good enough to explain the variables.

Best regards,

Dalyoung

> 2021. 1. 17. 오후 8:00, ntg-context-requ...@ntg.nl 작성:
> 
> \starttext
> \startMPpage
> 
> vardef Test (expr ab,cd)=
>   %numeric ab;
>   %numeric cd;
>   draw unitsquare scaled 10 xshifted ab;
>   draw unitsquare scaled 10 yshifted cd;
> enddef;
> 
> Test (50,100);
> \stopMPpage
> \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] question about vardef variables

2021-01-17 Thread Damien Thiriet
Hi,


I have some troubles with understanding metafun's macro mechanism.

Given this MWE:

\starttext
\startMPpage

vardef Test (expr ab,cd)=
   %numeric ab;
   %numeric cd;
   draw unitsquare scaled 10 xshifted ab;
   draw unitsquare scaled 10 yshifted cd;
enddef;

Test (50,100);
\stopMPpage
\stoptext

Uncommenting the two declarations makes me run intro a silent error. I was 
lucky enough yesterday to get an explicit error message with a more 
complex macro.  It made me figure out where my problems came from.

So here are my two questions:
- Why shouldn't we tell metafun if expr is a path, a pair or so on?
- Would it be possible to issue an error message each time this wrong
declaration is made?

Thanks,


Damien Thiriet 
___
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] Hatch a cell : meta:hash:left

2021-01-16 Thread Wolfgang Schuster

Fabrice Couvreur schrieb am 16.01.2021 um 16:58:

Hi,
I seem to have seen a method for hatching the cell of a table, but 
maybe it's my imagination.The following code does not work.

Thanks for your help.


Look into section 7.4 (Shape libraries) of the metafun manual.

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] Hatch a cell : meta:hash:left

2021-01-16 Thread Fabrice Couvreur
Hi,
I seem to have seen a method for hatching the cell of a table, but maybe
it's my imagination. The following code does not work.
Thanks for your help.
Fabrice

## hatching.tex #

\setupcolors[state=start]
\usemodule[xwi]
\starttext
\startxtable
 [align={lohi,middle}, width=1.5cm,framecolor=purple]
\startxrow
\startxcell[background=color,backgroundcolor=paleturquoise]
  i
\stopxcell
\startxcell
 [background=meta:hash:left, meta:hash:linecolor=green]

\stopxcell
\startxcell
   0
\stopxcell
\startxcell
   1
\stopxcell
\startxcell
   2
\stopxcell
\stopxrow
\stopxtable
\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
___


Re: [NTG-context] Floating object in text - Spacing

2021-01-15 Thread Johann Birnick
Thank you.

And is it possible to distribute the space equally between top and bottom?
Or to set it to some specific dimension?

Johann


On Fri, 2021-01-15 at 21:43 -0500, Aditya Mahajan wrote:
> On Sat, 16 Jan 2021, Johann Birnick wrote:
> 
> > Consider the following example:
> > 
> > \setupexternalfigures[location=default]
> > \starttext
> > \placefigure[right,none]{}{\externalfigure[hacker.jpg][scale=518]}
> > \samplefile{lorem}
> > \stoptext
> > 
> > What bothers me is the top spacing. There is space to the top, and I dont
> > want
> > it to be there. On the bottom there is no spacing. I would expect it to be
> > evenly distributed. But the spacing on the top will always be there. How to
> > remove this?
> 
> Add 'high' keyword:
> 
> \placefigure[right,high,none]{}{\externalfigure[hacker.jpg][scale=518]}
> 
> 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
> __
> _

___
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] Floating object in text - Spacing

2021-01-15 Thread Aditya Mahajan
On Sat, 16 Jan 2021, Johann Birnick wrote:

> Consider the following example:
> 
> \setupexternalfigures[location=default]
> \starttext
> \placefigure[right,none]{}{\externalfigure[hacker.jpg][scale=518]}
> \samplefile{lorem}
> \stoptext
> 
> What bothers me is the top spacing. There is space to the top, and I dont want
> it to be there. On the bottom there is no spacing. I would expect it to be
> evenly distributed. But the spacing on the top will always be there. How to
> remove this?

Add 'high' keyword:

\placefigure[right,high,none]{}{\externalfigure[hacker.jpg][scale=518]}

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] Floating object in text - Spacing

2021-01-15 Thread Johann Birnick
Consider the following example:

\setupexternalfigures[location=default]
\starttext
\placefigure[right,none]{}{\externalfigure[hacker.jpg][scale=518]}
\samplefile{lorem}
\stoptex

What bothers me is the top spacing. There is space to the top, and I dont want
it to be there. On the bottom there is no spacing. I would expect it to be
evenly distributed. But the spacing on the top will always be there. How to
remove this?

Thank you,
Johann

___
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] LMTX isn't typesetting math correctly with Pagella

2021-01-15 Thread Hans Hagen

On 1/15/2021 1:33 PM, Jack Hill wrote:

Hi,

I've been having some trouble with ConTeXt not typesetting math 
correctly when using the Pagella font (I do not know if the same issue 
occurs with other fonts as I haven't tested them).


If I compile with LMTX, the spacing between letters becomes very small 
so that when I type "|f|", for example, the second "|" intersects the f 
and looks rather ugly. However, compiling with the --luatex switch fixes 
these issues and the math looks nice again.


Can anybody else replicate this issue, and does anybody know why it is 
happening?


This the code I used to test:

|\setupbodyfont[pagella] \starttext \startformula |f| = \sqrt{\int_0^1 
|f(t)|^2 \text{d}t} \stopformula \stoptext |||
I'll check it ... smells like some interference between newer and older 
corrections (these gyre fonts need some special treatment).


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] LMTX isn't typesetting math correctly with Pagella

2021-01-15 Thread Otared Kavian
Hi Jack,I tested your example both with Pagella and Lucida OT: indeed typesetting with the latest LMTX, with Pagella the math italic « f » runs into the right bar of « |f| ».However the result with mkiv is correct.I am attaching the PDF output with LMTX.Best regards: Otared

bar-distance-f.pdf
Description: Adobe PDF document
On 15 Jan 2021, at 13:33, Jack Hill  wrote:
  


  
  Hi,I've been having some trouble with ConTeXt not typesetting math
  correctly when using the Pagella font (I do not know if the same
  issue occurs with other fonts as I haven't tested them).If I compile with LMTX, the spacing between letters becomes very
  small so that when I type "|f|", for example, the second "|"
  intersects the f and looks rather ugly. However, compiling with
  the --luatex switch fixes these issues and the math looks nice
  again.Can anybody else replicate this issue, and does anybody know why
  it is happening?This the code I used to test:

\setupbodyfont[pagella]

\starttext
\startformula
|f| = \sqrt{\int_0^1 |f(t)|^2 \text{d}t}
\stopformula
\stoptext
Jack

  

___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-contextwebpage  : http://www.pragma-ade.nl / http://context.aanhet.netarchive  : 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] LMTX isn't typesetting math correctly with Pagella

2021-01-15 Thread Jack Hill

Hi,

I've been having some trouble with ConTeXt not typesetting math 
correctly when using the Pagella font (I do not know if the same issue 
occurs with other fonts as I haven't tested them).


If I compile with LMTX, the spacing between letters becomes very small 
so that when I type "|f|", for example, the second "|" intersects the f 
and looks rather ugly. However, compiling with the --luatex switch fixes 
these issues and the math looks nice again.


Can anybody else replicate this issue, and does anybody know why it is 
happening?


This the code I used to test:

|\setupbodyfont[pagella] \starttext \startformula |f| = \sqrt{\int_0^1 
|f(t)|^2 \text{d}t} \stopformula \stoptext |||


Jack

||

___
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] \setupcolors and \underbar bug?

2021-01-14 Thread Henning Hraban Ramm

> Am 14.01.2021 um 21:48 schrieb Henning Hraban Ramm :
> 
> 
> 
>> Am 14.01.2021 um 16:58 schrieb Alan Bowen :
>> 
>> The mwe
>> 
>> \starttext
>> \setupcolors[state=stop]
>> {\darkred Test}
>> 
>> \underbar{Here}
>> \stoptext
>> 
>> fails: “Here” does not appear above the underbar (which has the correct 
>> length).
>> 
>> When \setupcolors[state=stop] is commented out, the file runs as it should.
> 
> It happens also if you set rgb=no, and the result in my project is even worse:

Hans, the fix you sent to Alan fixes the problem for me. Thank you!

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
___


Re: [NTG-context] \setupcolors and \underbar bug?

2021-01-14 Thread Henning Hraban Ramm


> Am 14.01.2021 um 16:58 schrieb Alan Bowen :
> 
> The mwe
> 
> \starttext
> \setupcolors[state=stop]
> {\darkred Test}
> 
> \underbar{Here}
> \stoptext
> 
> fails: “Here” does not appear above the underbar (which has the correct 
> length).
> 
> When \setupcolors[state=stop] is commented out, the file runs as it should.

It happens also if you set rgb=no, and the result in my project is even worse:



\setupcolors[rgb=no]

\starttext

Liszt bat den Klavierfabrikanten darum, Dankesgrüße für den 
\quotation{\underbar{belorbeerten} schönen Blumenstrauss} anlässlich seines 
Geburtstages auszurichten.
\stoptext


The PDF contains only:

 schönen Blumenstrauss“ anlässlich seines Geburtstages auszurichten.


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
___


Re: [NTG-context] what’s up with \setupdelimitedtext[method=font]?

2021-01-14 Thread Henning Hraban Ramm


> Am 14.01.2021 um 14:58 schrieb Hans Hagen :
> 
> can you test with (in cont-new.mkxl)
> 
> \def\spac_narrower_start_apply#1%
>  {\narrowerparameter\c!before
>   \global\s_spac_narrower_left  \zeropoint
>   \global\s_spac_narrower_right \zeropoint
>   \global\s_spac_narrower_middle\zeropoint
>   \edef\askednarrower{#1}%
>   \ifx\askednarrower\v!reverse
> \ifconditional\s_spac_narrower_last_swap
>   \frozen\leftskip \s_spac_narrower_right_last
>   \frozen\rightskip\s_spac_narrower_left_last
>   \setfalse\s_spac_narrower_last_swap
> \else
>   \frozen\leftskip \s_spac_narrower_left_last
>   \frozen\rightskip\s_spac_narrower_right_last
>   \settrue\s_spac_narrower_last_swap
> \fi
>   \else
> \normalexpanded{\processcommalistwithparameters[\askednarrower]}\spac_narrower_initialize
> \frozen\advance\leftskip \dimexpr\s_spac_narrower_left 
> +\s_spac_narrower_middle\relax
> \frozen\advance\rightskip\dimexpr\s_spac_narrower_right+\s_spac_narrower_middle\relax
>   \fi
>   \seteffectivehsize}
> 

Yes, that works with LMTX, thank you!

MkIV still fails, but cont-new.mkxl is LMTX only, I guess?

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
___


[NTG-context] \setupcolors and \underbar bug?

2021-01-14 Thread Alan Bowen
The mwe

\starttext
\setupcolors[state=stop]
{\darkred Test}

\underbar{Here}
\stoptext

fails: “Here” does not appear above the underbar (which has the correct
length).

When \setupcolors[state=stop] is commented out, the file runs as it should.

Alan
___
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] what’s up with \setupdelimitedtext[method=font]?

2021-01-14 Thread Hans Hagen

On 1/14/2021 10:44 AM, Henning Hraban Ramm wrote:

Hi again,
the following example used to work with LMTX (but not MkIV) from September.

Now I get the "narrower" indentation only if I comment the first line (in both 
versions) – apparently there’s a setup conflict, and I don’t know any more why I needed 
this setup.

Could you explain what it does (did, should do)?

Hraban


\setupdelimitedtext[quotation][method=font] % hanging quotation marks
%\setupalign[hanging]
\setupnarrower[left=2em,right=1.5em]

\definenarrower[Zitat]
\setupnarrower[Zitat]
  [left=2em,
   right=1.5em,
   before=\dontleavehmode\hskip-0.33em\startquotation,
   % fake hanging quotation mark
   after=\stopquotation]

\usemodule[visual]

\starttext

\fakewords{50}{50}

\startquotation
quotation \fakewords{100}{100}
\stopquotation\footnote{about quotation}

\startZitat
Zitat \fakewords{100}{100}
\stopZitat\footnote{about Zitat}

\stoptext

can you test with (in cont-new.mkxl)

\def\spac_narrower_start_apply#1%
  {\narrowerparameter\c!before
   \global\s_spac_narrower_left  \zeropoint
   \global\s_spac_narrower_right \zeropoint
   \global\s_spac_narrower_middle\zeropoint
   \edef\askednarrower{#1}%
   \ifx\askednarrower\v!reverse
 \ifconditional\s_spac_narrower_last_swap
   \frozen\leftskip \s_spac_narrower_right_last
   \frozen\rightskip\s_spac_narrower_left_last
   \setfalse\s_spac_narrower_last_swap
 \else
   \frozen\leftskip \s_spac_narrower_left_last
   \frozen\rightskip\s_spac_narrower_right_last
   \settrue\s_spac_narrower_last_swap
 \fi
   \else

\normalexpanded{\processcommalistwithparameters[\askednarrower]}\spac_narrower_initialize
 \frozen\advance\leftskip \dimexpr\s_spac_narrower_left 
+\s_spac_narrower_middle\relax


\frozen\advance\rightskip\dimexpr\s_spac_narrower_right+\s_spac_narrower_middle\relax
   \fi
   \seteffectivehsize}



-
  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] what’s up with \setupdelimitedtext[method=font]?

2021-01-14 Thread Henning Hraban Ramm


> Am 14.01.2021 um 10:44 schrieb Henning Hraban Ramm :
> 
> Hi again,
> the following example used to work with LMTX (but not MkIV) from September.
> 
> Now I get the "narrower" indentation only if I comment the first line (in 
> both versions) – apparently there’s a setup conflict, and I don’t know any 
> more why I needed this setup.
> 
> Could you explain what it does (did, should do)?
> 
> Hraban
> 
> 
> \setupdelimitedtext[quotation][method=font] % hanging quotation marks
> %\setupalign[hanging]
> \setupnarrower[left=2em,right=1.5em]
> 
> \definenarrower[Zitat]
> \setupnarrower[Zitat]
> [left=2em,
>  right=1.5em,
>  before=\dontleavehmode\hskip-0.33em\startquotation,
>  % fake hanging quotation mark
>  after=\stopquotation]
> 
> \usemodule[visual]
> 
> \starttext
> 
> \fakewords{50}{50}
> 
> \startquotation
> quotation \fakewords{100}{100}
> \stopquotation\footnote{about quotation}
> 
> \startZitat
> Zitat \fakewords{100}{100}
> \stopZitat\footnote{about Zitat}
> 
> \stoptext

Ah, I recognized the problem again:

I need the footnote marker at the closing quotation mark. 
\setupdelimitedtext... does that, but kills the indent. Without the setup, I 
get the indent, but the footnote marker moves to the next line.

And there’s a problem with MkIV (--luatex): TeX stops with **, after entering 
\end, I get the PDF, so something’s unclosed.

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
___


[NTG-context] what’s up with \setupdelimitedtext[method=font]?

2021-01-14 Thread Henning Hraban Ramm
Hi again,
the following example used to work with LMTX (but not MkIV) from September.

Now I get the "narrower" indentation only if I comment the first line (in both 
versions) – apparently there’s a setup conflict, and I don’t know any more why 
I needed this setup.

Could you explain what it does (did, should do)?

Hraban


\setupdelimitedtext[quotation][method=font] % hanging quotation marks
%\setupalign[hanging]
\setupnarrower[left=2em,right=1.5em]

\definenarrower[Zitat]
\setupnarrower[Zitat]
 [left=2em,
  right=1.5em,
  before=\dontleavehmode\hskip-0.33em\startquotation,
  % fake hanging quotation mark
  after=\stopquotation]

\usemodule[visual]

\starttext

\fakewords{50}{50}

\startquotation
quotation \fakewords{100}{100}
\stopquotation\footnote{about quotation}

\startZitat
Zitat \fakewords{100}{100}
\stopZitat\footnote{about Zitat}

\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] LMTX problem with \input

2021-01-14 Thread Henning Hraban Ramm
Another LMTX/MkIV difference:

In a component, I include another file with \input, that starts with \page in 
the first line.

With LMTX I get an error:

"""
I can't figure out why you would want to use a tab mark here. If some right 
brace
up above has ended a previous alignment prematurely, you're probably due for 
more
error messages.
"""

It works if I insert a blank line, and it works in MkIV.

Sorry, I can’t reproduce this apparent edge case in a MWE yet.


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
___


[NTG-context] LMTX/MkIV difference in date handling

2021-01-14 Thread Henning Hraban Ramm
ConTeXt  ver: 2021.01.11 17:27 LMTX  fmt: 2021.1.11

The following works in MkIV, but not in LMTX:


\def\Jahr{\currentdate[year]}

\settaggedmetadata[
rights={© \Jahr{} Me}
]

\starttext
\strut
\stoptext


The error message is:

 1 \def\Jahr{\currentdate[year]}
 2 
 3 \settaggedmetadata[
 4 >>   rights={© \Jahr{} Me}
 5 ]
 6 
 7 \starttext
 8 \strut
 9 \stoptext
10 


You've closed more groups than you opened. Such booboos are generally harmless,
so keep going.




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
___


[NTG-context] Extra space in align if tagging is enabled

2021-01-13 Thread Mikael Sundqvist
Hi,

There is an extra vertical space after displayed formulas with align if
pdftagging is enabled. If I remove the last \NR it goes away (but I have
got the idea that one should have that final \NR there?)

/Mikael

\setuptagging[state=start]

\starttext
\samplefile{knuth}
\startformula
\startalign
\NC A \NC = B\NR
\stopalign
\stopformula
\samplefile{knuth}
\startformula
\startalign
\NC A \NC = B
\stopalign
\stopformula
\samplefile{knuth}

\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] extra width in cropbox and trimbox

2021-01-12 Thread Pablo Rodriguez
Dear list,

I have already reported this before
(https://mailman.ntg.nl/pipermail/ntg-context/2020/099636.html).

I have the following sample:

  \setupinteractionscreen
[width=fit]

  \starttext
   \null
  \stoptext

Mediabox is fine:

  [ 0 0 595.2756 841.8898 ]

But cropbox and trimbox contain extra width:

  [ 0 0 741.4331 841.8898 ]

This is caused by \setupinteractionscreen[width=fit]. Generating
booklets from documents with the values above leads to wrong output.

Could anyone explain me what is wrong here?

Sorry, but I don’t know what I may be missing.

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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] xtable as list item

2021-01-12 Thread Pablo Rodriguez
Dear list,

I have the following sample:

  \starttext
  \startitemize[n][margin=yes]
  \item a
  \item
\startembeddedxtable[option={stretch, width}]
\dorecurse{25}{\startxrow
  \startxcell \Characters{\recurselevel}\stopxcell
  \startxcell \characters{\recurselevel}\stopxcell
\stopxrow}
  \stopembeddedxtable
  \stopitemize
  \stoptext

I want to add the xtable as a list item. I’m experiencing two issues:

1. Item number is placed at the bottom of the xtable.

2. There is an added horizontal space, so that the xtable has a minimal
indentation that the first item doesn’t have. (In my real document, this
horizontal space is huge.)

Is there any way to suppress both issues?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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 upload

2021-01-11 Thread Hans Hagen

Hi,

I uploaded a new lmtx. Nothing spectacular as I'm still playign with 
compact font support (as explained in previous mails). Most seem to work 
now.


New magic:

\startTEXpage[offset=10pt]
\vl\glyph  `M\vl\quad
\vl\glyph raise 3pt`M\vl\quad
\vl\glyph left  3pt`M\vl\quad
\vl\glyphright  2pt`M\vl\quad
\vl\glyph raise -4pt right  4pt`M\vl\quad
\vl\glyph left -1pt  right -1pt`M\vl
\stopTEXpage

This is part of some experiments with manipulating glyph dimensions 
instead of font kerns. These extensions will stay (who knows when it 
comes un handy) but we will probably stick to font kerns as default.


\startTEXpage[offset=10pt]
\showfontkerns
\showglyphs
\strut average\par
\vskip-2ex
\enabledirectives[fonts.injections.method=advance]
{\red \strut average}\par
\stopTEXpage

Both methods have their pros and cons.

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] A not so short introduction to ConTeXt Mark IV

2021-01-11 Thread Ivan Pešić
One nice tool that I use for translation is
https://po4a.org/index.php.en

I used it to translate (and maintain) complete Vim documentation.

It could be adapted to work with Context (there is already a Latex module)

Regards,
Ivan

сре, 6. јан 2021. 12:56  је написао/ла:

> Send ntg-context mailing list submissions to
> ntg-context@ntg.nl
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://mailman.ntg.nl/mailman/listinfo/ntg-context
> or, via email, send a message with subject or body 'help' to
> ntg-context-requ...@ntg.nl
>
> You can reach the person managing the list at
> ntg-context-ow...@ntg.nl
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ntg-context digest..."
> Today's Topics:
>
>1. Re: A not so short introduction to ConTeXt Mark IV
>   (Bruce Horrocks)
>2. Re: A not so short introduction to ConTeXt Mark IV
>   (Joaquín Ataz López)
>3. Re: A not so short introduction to ConTeXt Mark IV
>   (Augusto Stoffel)
>4. Re: Randomize order of blocks (Otared Kavian)
>5. Re: Randomize order of blocks (Otared Kavian)
>
>
>
> -- Forwarded message --
> From: Bruce Horrocks 
> To: "ntg-context@ntg.nl" 
> Cc:
> Bcc:
> Date: Wed, 6 Jan 2021 00:36:23 +
> Subject: Re: [NTG-context] A not so short introduction to ConTeXt Mark IV
>
>
> > On 5 Jan 2021, at 20:31, Garulfo  wrote:
> >
> > Hi all,
> >
> > I saw that Mojca created a directory
> > https://github.com/contextgarden/not-so-short-introduction-to-context
> >
> > Joaquín, if you agree, and if
> > - you provide me with the spanish + english source codes
> > - Mojca provide you and me with github write access (garulfogb account)
> >
> > i could :
> > 1/ push the current code
> > 2/ start to write a github wiki page (+ link on contextgarden) to
> describe :
> > - for you : how to update from your own computer (the official source)
> > - for any user : how to use git to get the source + link to this list
> for discussion.
> >
> > Does anybody has a guide about "how to set up a documentation
> translation project with git ?".
> > One requirement will probably to define how propositions are officially
> validated. Does it requires Joaquín to learn how to use git ? Can we just
> work by sending files (or patches) to Joaquín who will update with a single
> git command ?
>
> I think we need to be really clear about what we want to achieve here.
>
> 1) Is it just making the source plus the PDF available for download? If so
> then there are plenty of simpler ways to do that than using Git.
>
> 2) If it is to gather feedback on things like typos then we don't need
> Git. For example I spotted a missing ']' in the English translation so all
> I need is a way to submit a 'bug report' not access to the source.
>
> 3) So what is left? To provide a way for translators to be notified of
> changes to the original? To provide a collaboration mechanism for
> significant changes to the document?
>
> I don't see that Git adds much in the way of value unless Joaquín and the
> translators are already very familiar with it -- because the learning curve
> is very steep and recovering from mistakes (made to the repository itself
> rather than to the document content) can sometimes be extremely difficult.
>
> --
> Bruce Horrocks
> Hampshire, UK
>
>
>
>
>
> -- Forwarded message --
> From: "Joaquín Ataz López" 
> To: ntg-context@ntg.nl
> Cc:
> Bcc:
> Date: Wed, 6 Jan 2021 06:26:34 +0100
> Subject: Re: [NTG-context] A not so short introduction to ConTeXt Mark IV
> I don't really know anything about git, so I can't give my opinion about
> what is or isn't convenient to do. Certainly to report bugs in my text I
> don't think it takes anything more than an e-mail to send them to me.
> Having a repository can be useful to keep a version that is always up to
> date; but that, on the other hand, would force me to be continually
> modifying the text, which in principle is not my intention. I do not
> exclude that there will be other versions in the future, but for the
> moment this is not part of my plans. And if there were other versions,
> it would be more to add some chapter; mainly I think that the most
> important material that is missing is the one related to XML, Lua and
> Metapost, that is: the three additional languages in which a ConTeXt
> document can be written. But I am far from being able to write anything
> about any of those three aspects. Some member of the list has offered to
> help me with it, but not immediately (we all have a lot of work).
>
> The original idea, I think, was to provide a platform that would allow
> different collaborators to translate the text into different languages.
> Whether or not git is the best solution for that purpose, I really don't
> know.
>
> What I would appreciate is that guide on "how to set up a documentation
> translation project with git? that Garulfo proposes.
>
> El 5/1/21 a 

Re: [NTG-context] Org-Mode for ConTeXt

2021-01-11 Thread Roger Mason
Hell Jan,

Jan U. Hasecke writes:

> Dear all,
>
> Emacs and Org-Mode is central to my writing workflow as I use org-mode
> for organizing my Zettelkasten.[1]
>
> Now I am looking for a way to extend the workflow an include ConTeXt.
>
> Is anybody aware of a ConTeXt export tool for Org-Mode?

There was discussion of this very topic withing the last 14 days on the
Org-Mode mailing list.  Someone is working on this, see

https://github.com/Jason-S-Ross/ox-context/

Cheers,
Roger
___
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] Markdown module in LMTX

2021-01-10 Thread Christoph Reller
Hi,

In recent versions of ConTeXt LMTX, the builtin markdown module is missing.
(Files m-markdown.[lua|mkiv])
Just copying this module from an earlier version shows that they don't work
anymore.

MWE:

ConTeXt file:
-- 8< --
\usemodule[markdown]
\starttext
\processmarkdownfile{file.md}
\stoptext
-- 8< --

file.md:
-- 8< --
Title
=

Here comes a paragraph text.
-- 8< --

Are there plans to add and update this module?

Cheers,
Christoph
___
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] Org-Mode for ConTeXt

2021-01-10 Thread Jan U. Hasecke

Dear all,

Emacs and Org-Mode is central to my writing workflow as I use org-mode
for organizing my Zettelkasten.[1]

Now I am looking for a way to extend the workflow an include ConTeXt.

Is anybody aware of a ConTeXt export tool for Org-Mode?

Ciao!
juh

[1] https://www.hasecke.eu/post/luhmanns-zettelkasten-mit-org-brain/
-- 
Soziale Plastik. Die Kunst der Allmende
Essay zum 30. Todestag von Joseph Beuys
http://www.amazon.de/dp/1523458763/
Taschenbuch, 130 Seiten, EUR 9,90

-- 
http://hasecke.com * Business Communication * Werbung für den Mittelstand
Schubertstr. 4 * 42719 Solingen * Telefon ++49-212-2331483
https://keys.openpgp.org/vks/v1/by-fingerprint/F6911D6BDD74ABB8FE4586E03B3D738AE614D22D
Umsatzsteuer-Identifikationsnummer: DE196439205
Datenschutzerklärung: https://www.hasecke.com/datenschutz/
___
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] Org-Mode for ConTeXt

2021-01-10 Thread Saša Janiška
On Sun, 10 Jan 2021 20:27:57 +0100
"Jan U. Hasecke"  wrote:

> Is anybody aware of a ConTeXt export tool for Org-Mode?

Via Pandoc, maybe?

Sincerely,
Gour

-- 
Not by merely abstaining from work can one achieve freedom
from reaction, nor by renunciation alone can one attain perfection.


___
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] printing the current date

2021-01-10 Thread Peter Münster
On Sun, Jan 10 2021, Fabrice L wrote:

> For exemple:
>
>  \date[][weekday,day,month,year] and \currenttime[h,{\,:\,},m] 

Sorry, I should have mentioned, that I use the latest version:
context-2021.01.08

-- 
   Peter
___
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] printing the current date

2021-01-10 Thread Fabrice L


> Le 10 janv. 2021 à 13:23, Peter Münster  a écrit :
> 
> Hi,
> 
> I would expect, that \currentdate prints the current date, but it does
> not:
> 
> --8<---cut here---start->8---
> \starttext
> \date[d=1]% first day of this month, ok
> 
> \date% again first day, last parameters are used, this is ok
> 
> \currentdate% same as \date, but I would expect the day of today...
> \stoptext
> --8<---cut here---end--->8---
> 
> How could I print the current date please?

For exemple:

 \date[][weekday,day,month,year] and \currenttime[h,{\,:\,},m] 

F.

> 
> TIA for any hints,
> -- 
>   Peter
> ___
> 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] printing the current date

2021-01-10 Thread Peter Münster
Hi,

I would expect, that \currentdate prints the current date, but it does
not:

--8<---cut here---start->8---
\starttext
\date[d=1]% first day of this month, ok

\date% again first day, last parameters are used, this is ok

\currentdate% same as \date, but I would expect the day of today...
\stoptext
--8<---cut here---end--->8---

How could I print the current date please?

TIA for any hints,
-- 
   Peter
___
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] Math blackboard (bug?)

2021-01-09 Thread Hans Hagen

On 1/9/2021 1:31 PM, Johann Birnick wrote:

To write blackboard math, the syntax was

$\blackboard{N}$

, but now this also makes the rest of the text blackboard. So one has to use

${\blackboard N}$

. Is this indented? (the old way is a bit easier to use)

Secondly, I want to address the blackboard font. Try out

\starttext
${\blackboard NR}$
\stoptext

This looks different then in the past. It doesn't have serifs. It looks like the
wrong font, like sans. Is this a bug? To me it looks awful, honestly. It doesn't
fit the rest of the math font at all.
Basically we're talking alphabets here and in opentype math fonts these 
are complete alphabets. So, \blackboard is an alphabet switch. You can 
use \mathbb{X} as an argument variant.


About the shapes ... those are the ones that come with the font (and imo 
when blackboard is indeed that what gets drawn on blackboard serifs 
probaby make not that much sense, but that's personal).


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] Math align not working

2021-01-09 Thread Johann Birnick
Hi Aditya,

thank you very much, now I need to specify the alignment only for one "column"
and it gets applied for all of them. However, there is still the problem with
the standard setting of the alignment. For example, 

\starttext
\startformula \startalign[m=2, align={right,left}]
\NC ab \NC = cd
\NC efgh \NC = ijkl \NR
\NC efgh \NC = ijkl
\NC ab \NC = cd \NR
\stopalign \stopformula
\stoptext

works now. But the setting [align={right,left}] should be the standard when n is
not set. So (also according to your documentation) the following code 

\starttext
\startformula \startalign[m=2]
\NC ab \NC = cd
\NC efgh \NC = ijkl \NR
\NC efgh \NC = ijkl
\NC ab \NC = cd \NR
\stopalign \stopformula
\stoptext

should work, but it doesn't. The first column is right-oriented, the third (i.e.
the first in the right "column") not.

Could you please fix that?

Thanks you very much,
Johann


On Sat, 2021-01-02 at 02:15 -0500, Aditya Mahajan wrote:
> On Fri, 1 Jan 2021, Hans Hagen wrote:
> 
> > On 1/1/2021 8:21 AM, Aditya Mahajan wrote:
> > > \startformula \startalign[m=2,distance=8em,n=5,
> > > align={right,middle,middle,middle,left, right,middle,middle,middle,left}]
> > > \NC 0 \NC < \NC 2x + 5y \NC < \NC 10
> > > \NC 4 \NC < \NC 3x + y \NC < \NC 9 \NR
> > > \NC 3 \NC < \NC 2y + 3z \NC < \NC 15
> > > \NC 10\NC < \NC 8y + 5z \NC < \NC 20 \NR
> > > \stopalign \stopformula
> > > 
> > > \stoptext
> > 
> > 
> > Aditya:
> > 
> > can you check this?
> > 
> > \def\math_build_eqalign
> >   {\scratchtoks\emptytoks
> >    \d_math_eqalign_distance\mathalignmentparameter\c!distance\relax
> >    \scratchcounterone\mathalignmentparameter\c!m
> >    \scratchcountertwo\mathalignmentparameter\c!n
> >    \etoksapp\scratchtoks{\the\t_math_align_a}%
> >    \scratchcounter\plusone
> >    \dorecurse{\numexpr\scratchcounterone*\scratchcountertwo-\plusone\relax}
> >  {\ifnum\scratchcounter=\scratchcountertwo
> >     \scratchcounter\plusone
> >     \etoksapp\scratchtoks{\math_eqalign_distance}%
> >     \etoksapp\scratchtoks{\global\c_math_eqalign_column\zerocount}%
> >   \else
> >     \advance\scratchcounter\plusone
> >   \fi
> >   \etoksapp\scratchtoks{\the\t_math_align_b}}%
> >    \etoksapp\scratchtoks{\the\t_math_align_c}}
> > 
> > 
> > I added:
> > 
> >     \etoksapp\scratchtoks{\global\c_math_eqalign_column\zerocount}%
> > 
> 
> This works nicely. Thanks.
> 
> I'll also go back to the mathalign document and try to update it for the
> current LMTX to catch other regressions which might have happened.
> 
> 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
> __
> _

___
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] Math blackboard (bug?)

2021-01-09 Thread Johann Birnick
To write blackboard math, the syntax was

$\blackboard{N}$

, but now this also makes the rest of the text blackboard. So one has to use

${\blackboard N}$

. Is this indented? (the old way is a bit easier to use)

Secondly, I want to address the blackboard font. Try out

\starttext
${\blackboard NR}$
\stoptext

This looks different then in the past. It doesn't have serifs. It looks like the
wrong font, like sans. Is this a bug? To me it looks awful, honestly. It doesn't
fit the rest of the math font at all.

Best regards
Johann

___
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] Weekdays and others as numbers

2021-01-08 Thread Jairo A. del Rio
ConTeXt has some inbuilt functions for dates. I see that the following

\mainlanguage[spanish]
\starttext

\dayoftheweek{4}{5}{1992}

\stoptext


gives "lunes" (Monday). How to get a weekday number (2 in this case)
instead?

Sincerely,

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
___


[NTG-context] RE : Missing kern when using \feature

2021-01-08 Thread Joseph
OK makes sense. I’ll see if I can remove this \feature macro.Yes 2nd case was only for reference for working case.Thanks De : Hans HagenEnvoyé le :vendredi 8 janvier 2021 16:32À : mailing list for ConTeXt users; JosephObjet :Re: [NTG-context] Missing kern when using \feature On 1/8/2021 2:45 PM, Joseph wrote:> Dear list,> > Still spot a minor difference with previous LMTX versions. MWE > reproduces it (in previous beta we had twice as kerning, now it’s no > kerning at all).> > Thanks a lot as usual.> > \definefontfeature[xvicentury][mode=node]> > \definefontfeature[default][default][kern=yes]> > \definefontfamily[mainfont][serif][EBGaramond]> > \setupbodyfont[mainfont, 9pt]> > \showfontkerns> > \starttext> > Chapitre {\feature[-][xvicentury]v}. % no kerning between v and . indeed there should be no kerning because there are two different font setups (lmtx is a bit better in these dynamic features: more strict testing at the cost of a bit more runtimen but optimized so not noticeable) > Chapitre v. i see a kern here > \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> ___>   --  -   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] Missing kern when using \feature

2021-01-08 Thread Hans Hagen

On 1/8/2021 2:45 PM, Joseph wrote:

Dear list,

Still spot a minor difference with previous LMTX versions. MWE 
reproduces it (in previous beta we had twice as kerning, now it’s no 
kerning at all).


Thanks a lot as usual.

\definefontfeature[xvicentury][mode=node]

\definefontfeature[default][default][kern=yes]

\definefontfamily[mainfont][serif][EBGaramond]

\setupbodyfont[mainfont, 9pt]

\showfontkerns

\starttext

Chapitre {\feature[-][xvicentury]v}. % no kerning between v and .


indeed there should be no kerning because there are two different font 
setups (lmtx is a bit better in these dynamic features: more strict 
testing at the cost of a bit more runtimen but optimized so not noticeable)



Chapitre v.


i see a kern here


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




--

-
  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] space after \date[]

2021-01-08 Thread Peter Münster
Hi,

There is no more space after \date[] with the latest version.
Is this wanted, or a bug?

Example:

\starttext
\date[d=1] X % no space before "X"
\stoptext

Kind regards,
-- 
   Peter
___
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] LuaTeX and PDF.js

2021-01-08 Thread Vedran Miletić

08. 01. 2021. u 05:41, Aditya Mahajan piše:

On Fri, 8 Jan 2021, Hans Hagen wrote:


On 1/8/2021 12:39 AM, Vedran Miletić wrote:


It's whatever ConTeXt standalone has. I don't have any extra Lua installed:


--credits should mention the lua version


Should I see it on non-HiDPI as well? Because it seems it's there.


depends on what you consider (non) hdpi ... the positioning of glyphs
depends on font scale, rounding of stems and such (hints in fonts but
these get less relevant with high res displays), caching, inter glyph
corrections (that pdftex/luatex/...) put in the text stream to resync
within certain tolerances, etc ... (often a print is a better reference
as displays are seldom 600+ dpi) .. it's also why often expansion looks
bad on screen because even a sub percentage difference can give such
effects


Another way to see it is just zoom in on the PDF. If the artifacts go away on 
zooming in, then they are due to anti-aliasing.

Aditya

Thanks to both of you for the detailed explanations. Printed page shows 
no artifacts and neither does PDF.js when the text is zoomed. So it is 
an issue with anti-aliasing after all.


I'll report it to PDF.js and see what they tell me.

Regards,
Vedran

--
Vedran Miletić
vedran.miletic.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] Missing kern when using \feature

2021-01-08 Thread Joseph
Dear list, Still spot a minor difference with previous LMTX versions. MWE reproduces it (in previous beta we had twice as kerning, now it’s no kerning at all).Thanks a lot as usual. \definefontfeature[xvicentury][mode=node]\definefontfeature[default][default][kern=yes]\definefontfamily[mainfont][serif][EBGaramond]\setupbodyfont[mainfont, 9pt]\showfontkerns \starttextChapitre {\feature[-][xvicentury]v}. % no kerning between v and . Chapitre v.\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] tikz-module not up to date (synchronisation problem with contextgarden?)

2021-01-08 Thread Christian Prim
Hi

It's been a long time, since a solution for the 'module wrapping error' in
tikz has been proposed here in the list:
https://mailman.ntg.nl/pipermail/ntg-context/2017/090404.html

Since July a fix has been published:
https://github.com/pgf-tikz/pgf/commit/9b24e5cdb8246b1075d02c02c75ff8bcac642c16

A few days ago the release containing the fix was released. On
contextgarden the manual under modules/t-tikz/doc/generic/pgf shows the
current version 3.1.8b, but the source doesn't include the fix. I compared
the source on context-garden (rsync://
contextgarden.net/minimals/current/modules/) with the zip (
https://github.com/pgf-tikz/pgf/archive/3.1.8b.zip). In the zip file the
fix is included, so I'm puzzled...

Is there a synchronisation-problem?

Just wanted to mention it. It's not crucial.

Thanks
Christian
___
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] A not so short introduction to ConTeXt Mark IV

2021-01-08 Thread Robert Zydenbos

Thank you, Joaquin, for this wonderfully systematic bit of work. I wish I had 
had this three or four years ago.

There has been a bit of a discussion here about whether ConTeXt manuals should 
start from the assumption that the reader already is familiar with LaTeX or 
not. If I may cast a vote here: I recommend that authors *SHOULD NOT* assume 
such familiarity, because

(1) Knowledge of LaTeX is not just irrelevant, but can actually confuse.

(2) ConTeXt is a complete system in itself that is built up in a more 
consistent way than LaTeX. It does not depend on LaTeX in any way, and authors 
should not risk creating the impression that it does.

Of course there’s nothing wrong if someone were to write parallel materials for 
LaTeX users (‘ConTeXt for LaTeX Users’, or something of the sort). But 
basically LaTeX ought to be ignored completely. I, for one, do not want to have 
anything to do with LaTeX any more, now that ConTeXt is there.

Now that this new manual exists, I can more confidently recommend ConTeXt to 
colleagues.

Thanks once again!

Robert

On 03.01.21 10:45, Joaquín Ataz López wrote:

Hello to all:

Two months ago I informed to the list […]


___
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] Size problems in fencing

2021-01-08 Thread Mikael Sundqvist
Hi,

I have written about these problems some months(year?) ago, but since I
noticed today that the problem persists, I write again. The first problem
is with sizes of nested fences, the second one with the size of lucida
fences. The test file is pasted below.

Let me also take the opportunity to thank for the nice card that arrived in
the mail. Last year's card was still on the refrigerator, and its message
is kind of funny/scary in retrospect. I wish you all a good 2021!

/Mikael

\definemathfence[Set][left="007B,right="007D,command=yes]
\definemathfence[Paren][left="0028,right="0029,command=yes]


\starttext

When using nested fences, if one set the size of the outer one, it applies
also to the inner one, with the same size:
\startformula
\Paren[size=2]{\int_0^1 \Paren{f_1(x)+f_2(x)}\,dx}
\stopformula
If one is not specifying the size of the outer fence, it seems to work
correctly:
\startformula
\Paren{\int_0^1 \Paren{f_1(x)+f_2(x)}\,dx}
\stopformula

\startformula
\Paren{\int_0^1 \Paren[size=1]{f_1(x)+f_2(x)}\,dx}
\stopformula

With most fonts, the sizing works well:

\startformula
\Set[size=0]{a}\quad
\Set[size=1]{a}\quad
\Set[size=2]{a}\quad
\Set[size=3]{a}
\stopformula

\switchtobodyfont[lucidaot]
If we switch to lucida, the \type{size=1} and \type{size=2} are the same:


\startformula
\Set[size=0]{a}\quad
\Set[size=1]{a}\quad
\Set[size=2]{a}\quad
\Set[size=3]{a}
\stopformula


\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] squeezed

2021-01-08 Thread Hans Hagen

Hi,

Another example:

\definetweakedfont[squeezed] [xscale=0.90]

\bTABLE
\bTR \bTD foo \eTD \bTD[style=\squeezed] $x = 1$ \eTD \eTR
\bTR \bTD oof \eTD \bTD[style=\squeezed] $x = 2$ \eTD \eTR
\eTABLE

\bTABLE[style=squeezed]
\bTR \bTD $x = 1$ \eTD \bTD  $x = 3$ \eTD \eTR
\bTR \bTD $x = 2$ \eTD \bTD  $x = 4$ \eTD \eTR
\eTABLE

\bTABLE[style=\squeezed\squeezed\squeezed]
\bTR \bTD $x = 1$ \eTD \bTD  $x = 3$ \eTD \eTR
\bTR \bTD $x = 2$ \eTD \bTD  $x = 4$ \eTD \eTR
\eTABLE


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

2021-01-08 Thread Hans Hagen


Hi,

A new upload ... I'm playing abit with font tweaks ...

\enableexperiments[fonts.compact] % for the definitions

\starttext

\definefont[FooA][Serif*default @ 12pt 1800 500]
\definefont[FooB][Serif*default @ 12pt 0.85 0.50]
\definefont[FooC][Serif*default @ 12pt]

\definetweakedfont[runwider] [xscale=1.5]
\definetweakedfont[runtaller][yscale=2.5,xscale=.8,yoffset=-.2ex]

{\FooA test test \runwider test test \runtaller test test}\par
{\FooB test test \runwider test test \runtaller test test}\par
{\FooC test test \runwider test test \runtaller test test}\par

\blank {\input tufte }

\blank {\glyphxscale 1070 \input tufte }

\definetweakedfont[squeezed] [xscale=0.9]

\blank $a = mb^2 + \sqrt{123}$
\blank {\squeezed $a = mb^2 + \sqrt{123}$}

\stoptext

Just run these examplex in lmtx to get an idea. It might come in handy 
for special cases, like making sure something fits in some area or make 
for instance last lines look a bit better (posters or so).


For the moment I decided for two additional (optional) scale directives 
in the font definition (hopefully i didn't mess up the ctx parser for 
that). Scales are either fractions or integers (the traditional tex 
scaling in permilles).


Hans

(also, odd in mp and ligs in some cases fixed)


-
  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] RE : Some ligatures don't work in latest LMTX

2021-01-08 Thread Hans Hagen

On 1/7/2021 11:05 PM, Joseph wrote:

\definefontfeature[default][default][liga=yes, dlig=yes, hlig=yes]

\definefontfamily[mainfont][serif][EBGaramond]

\setupbodyfont[mainfont, 9pt]

\starttext

start active justice

\stoptext

fixed in next upload

-
  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] RE : Some ligatures don't work in latest LMTX

2021-01-08 Thread Joseph
Yes but I am afraid I still see some cases where ligatures are missing. MWE below (in 2 last words between c t and s t): \definefontfeature[default][default][liga=yes, dlig=yes, hlig=yes]\definefontfamily[mainfont][serif][EBGaramond]\setupbodyfont[mainfont, 9pt] \starttext start active justice \stoptext ThanksBest Joseph De : Jairo A. del RioEnvoyé le :jeudi 7 janvier 2021 17:15À : Hans HagenCc : mailing list for ConTeXt usersObjet :Re: [NTG-context] Some ligatures don't work in latest LMTX Oh, yeah. It works again. Thank you very much :) Jairo El jue., 7 de ene. de 2021 10:20 a. m., Hans Hagen  escribió:On 1/7/2021 3:04 PM, Jairo A. del Rio wrote:> Hmm, it works for Persian because this uses less diacritics than Arabic. > The following fails with LMTX:> > \definefontfamily[main][serif][notonaskharabic][features=arabic]> > \setupdirections[bidi=global,method=one]> > \setupbodyfont[main]> > \starttext> > \obeylines> > %https://www.letsstartthinking.org/Islam/quran-short-phrases-and-verses.php > > > بِسْمِ اللَّـهِ الرَّحْمَـٰنِ الرَّحِيمِ> > \stoptext> > Hi, Hans. Could you please check this out? It works for MKIV, but in > LMTX vowels are misplaced. Thank you in advance.It works here but i have different code in the meantime. We're in a transition to an lmtx version of the font handler. In lmtx we need to do a bit more checking when we are in in compact font mode so it might be that there is temporary loss of some functionality. In principle mkiv and lmtx should do the same as there is no real change in logic.)I'll push an update later today,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] styling part of an index entry

2021-01-07 Thread Aditya Mahajan
On Fri, 8 Jan 2021, jbf wrote:

> Very useful!  And I'll be on the lookout for a newspaper called The Onion :-)
> one that I presume would bring you to tears.

Oh, it does:

https://www.theonion.com/

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] LuaTeX and PDF.js

2021-01-07 Thread Aditya Mahajan
On Fri, 8 Jan 2021, Hans Hagen wrote:

> On 1/8/2021 12:39 AM, Vedran Miletić wrote:
> 
> > It's whatever ConTeXt standalone has. I don't have any extra Lua installed:
> 
> --credits should mention the lua version
> 
> > Should I see it on non-HiDPI as well? Because it seems it's there.
> 
> depends on what you consider (non) hdpi ... the positioning of glyphs 
> depends on font scale, rounding of stems and such (hints in fonts but 
> these get less relevant with high res displays), caching, inter glyph 
> corrections (that pdftex/luatex/...) put in the text stream to resync 
> within certain tolerances, etc ... (often a print is a better reference 
> as displays are seldom 600+ dpi) .. it's also why often expansion looks 
> bad on screen because even a sub percentage difference can give such 
> effects

Another way to see it is just zoom in on the PDF. If the artifacts go away on 
zooming in, then they are due to anti-aliasing.

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] LuaTeX and PDF.js

2021-01-07 Thread Vedran Miletić

On 07. 01. 2021. 23:01, Hans Hagen wrote:

what lua does your 2.08 have? if it's 5.2. then such small differences 
can be a side effect of lua (different number models), serialization 
of numbers (default accuracy), or maybe rounding in the lua=>tex font 
interface (there were some fixes iir), the number of digist that the 
backend uses, etc



It's whatever ConTeXt standalone has. I don't have any extra Lua installed:

$ luametatex --version
This is LuaMetaTeX, Version 2.08.11

Execute 'luametatex --credits' for credits and version details.

There is NO warranty. Redistribution of this software is covered by the 
terms

of the GNU General Public License, version 2 or (at your option) any later
version. For more information about these matters, see the file named 
COPYING

and the LuaTeX source.

Functionality : level 20210107
Support   : cont...@ntg.nl
Copyright : The Lua(Meta)TeX Team(s) (2005-2020+)

The LuaMetaTeX project is related to ConTeXt development. This macro package
tightly integrates TeX and MetaPost in close cooperation with Lua.

$ luatex --version
This is LuaTeX, Version 1.13.0 (TeX Live 2021/dev)

Execute  'luatex --credits'  for credits and version details.

There is NO warranty. Redistribution of this software is covered by
the terms of the GNU General Public License, version 2 or (at your option)
any later version. For more information about these matters, see the file
named COPYING and the LuaTeX source.

LuaTeX is Copyright 2020 Taco Hoekwater and the LuaTeX Team.


Typing lua gives command not found and texlua is system one.

anyhow, so what you see (in the file) is (per line) transform matrices 
that are slightly different so what you then see is rounding to the 
device pixels



Should I see it on non-HiDPI as well? Because it seems it's there.


Regards,

Vedran

i wouldn't loose sleep over it .. nowadays fonts also evolve and that 
gives larger differences


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
-



--
Vedran Miletić
vedran.miletic.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
___


Re: [NTG-context] styling part of an index entry

2021-01-07 Thread jbf
Very useful!  And I'll be on the lookout for a newspaper called The 
Onion :-) one that I presume would bring you to tears.


And yes, had discovered that processors don't like split 'strings'!! But 
I would never have worked out your definition on my own, but it offers 
me ideas for other variations on the them. Many thanks


Julian

On 8/1/21 12:19 pm, Jairo A. del Rio wrote:


Oh, I would do it another way, as processors aren't very happy with 
commands which split "strings". The drawback of my quick and dirty 
method is the need for additional commands, but I hope this will be 
useful.


\defineregister[myindex]

%Sorry for the funny names

\def\myindexspaced#1{%

\splitstring{#1}\at{ }\to\myindexoneone\and\myindexonetwo%

\myindex[\myindexonetwo,\myindexoneone]{\myindexonetwo,\space\emph{\myindexoneone}}%

}

\def\myindexcomma#1{%

\splitstring{#1}\at,\to\myindextwoone\and\myindextwotwo%

\myindex[#1]{\myindextwoone,\emph{\myindextwotwo}}%

}

\starttext

In \myindexspaced{The Observer}{\em The Observer} of 31 July 2018...

In \myindexcomma{Onion, The}{\em The Onion} of 31 July 2018...

\placemyindex%

\stoptext

Maybe someone else in the list has a cleaner alternative?

Cordially,

Jairo


El jue, 7 de ene. de 2021 a la(s) 18:01, jbf (roma83...@gmail.com 
) escribió:


Thanks Jairo, with some tweaking I now have it working ( I had
\placeindex instead of \placemyindex! And altered the 'style' name
to something else as you hinted I should).

Now, this might be asking too much of ConTeXt, but some Newspaper
names don't italicise the 'The', only the main name. Is it
possible, do you think, to get the -> operator to work only on,
say 'Observer' and not 'The', and for that matter not on the page
number as well? Perhaps not, but worth asking the question anyway!

Julian

On 8/1/21 9:46 am, Jairo A. del Rio wrote:

Hi. In latest LMTX (2021.01.07 16:59), your example works as
expected:

\defineregister[myindex]

\defineprocessor[style][style=italic]%Isn't another name available?

\starttext

In \myindex{style->Observer, The}{\em The Observer} of 31 July 2018

\placemyindex%

\stoptext

Jairo


El jue, 7 de ene. de 2021 a la(s) 17:29, jbf (roma83...@gmail.com
) escribió:

I'm wondering if further progress has been made in Mk IV on
styling parts of an index (register) entry? I have followed
the explanation on the wiki, but do not seem to be able to
achieve what I need.

And what I need is to be able to italicise entries that refer
to newspaper names, e.g. The Observer

MWE

\defineregister[myindex]
\defineprocessor[style][style=italic]

\starttext

In \myindex{style->Observer, The} {\em The Observer} of 31
July 2018

\stoptext

The only result I am getting is:

->Observer, The   223

But what I want is /Observer, The/ (in other words, in italics).

Clearly I am doing something wrong, or not enough, or...
maybe there is another way to achieve waht I need?

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

___



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


Re: [NTG-context] styling part of an index entry

2021-01-07 Thread Jairo A. del Rio
Oh, I would do it another way, as processors aren't very happy with
commands which split "strings". The drawback of my quick and dirty method
is the need for additional commands, but I hope this will be useful.

\defineregister[myindex]

%Sorry for the funny names

\def\myindexspaced#1{%

\splitstring{#1}\at{ }\to\myindexoneone\and\myindexonetwo%

\myindex[\myindexonetwo,\myindexoneone]{\myindexonetwo,\space\emph{\myindexoneone}}%

}


\def\myindexcomma#1{%

\splitstring{#1}\at,\to\myindextwoone\and\myindextwotwo%

\myindex[#1]{\myindextwoone,\emph{\myindextwotwo}}%

}


\starttext


In \myindexspaced{The Observer}{\em The Observer} of 31 July 2018...

In \myindexcomma{Onion, The}{\em The Onion} of 31 July 2018...


\placemyindex%

\stoptext

Maybe someone else in the list has a cleaner alternative?

Cordially,

Jairo

El jue, 7 de ene. de 2021 a la(s) 18:01, jbf (roma83...@gmail.com) escribió:

> Thanks Jairo, with some tweaking I now have it working ( I had \placeindex
> instead of \placemyindex! And altered the 'style' name to something else as
> you hinted I should).
>
> Now, this might be asking too much of ConTeXt, but some Newspaper names
> don't italicise the 'The', only the main name. Is it possible, do you
> think, to get the -> operator to work only on, say 'Observer' and not
> 'The', and for that matter not on the page number as well? Perhaps not, but
> worth asking the question anyway!
>
> Julian
> On 8/1/21 9:46 am, Jairo A. del Rio wrote:
>
> Hi. In latest LMTX (2021.01.07 16:59), your example works as expected:
>
> \defineregister[myindex]
>
> \defineprocessor[style][style=italic]%Isn't another name available?
>
> \starttext
>
> In \myindex{style->Observer, The}{\em The Observer} of 31 July 2018
>
> \placemyindex%
>
> \stoptext
>
> Jairo
>
> El jue, 7 de ene. de 2021 a la(s) 17:29, jbf (roma83...@gmail.com)
> escribió:
>
>> I'm wondering if further progress has been made in Mk IV on styling parts
>> of an index (register) entry? I have followed the explanation on the wiki,
>> but do not seem to be able to achieve what I need.
>>
>> And what I need is to be able to italicise entries that refer to
>> newspaper names, e.g. The Observer
>>
>> MWE
>>
>> \defineregister[myindex]
>> \defineprocessor[style][style=italic]
>>
>> \starttext
>>
>> In \myindex{style->Observer, The} {\em The Observer} of 31 July 2018
>>
>> \stoptext
>>
>> The only result I am getting is:
>>
>> ->Observer, The   223
>>
>> But what I want is *Observer, The* (in other words, in italics).
>>
>> Clearly I am doing something wrong, or not enough, or... maybe there is
>> another way to achieve waht I need?
>>
>> 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
>>
>> ___
>>
>
> ___
> 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] LuaTeX and PDF.js

2021-01-07 Thread Vedran Miletić

Hello,

I compared latest ConTeXt standalone (LuaTeX 2.08) against TeX Live 2020 
(LuaTeX 1.12). The produced PDFs are:


https://miletic.net/lipsum-112.pdf
https://miletic.net/lipsum-208.pdf

Viewing them with Evince (and I assume Adobe Reader, I don't have it at 
hand to test) shows only minor differences in (horizontal) character 
spacing, which I would expect; the text looks reasonably good either 
way. However, viewing them with PDF.js shows a large difference:


https://miletic.net/lipsum-pdfjs-112.png
https://miletic.net/lipsum-pdfjs-208.png

As you can observe, b, m, n, p, and r (and possibly others) are moved 
slightly above other letters. Is this the expected behavior? If not, is 
this an issue with the way PDF.js is displaying the PDF or the way 
LuaTeX is producing it?


Thanks in advance.

Regards,
Vedran Miletić


--
Vedran Miletić
vedran.miletic.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
___


Re: [NTG-context] LuaTeX and PDF.js

2021-01-07 Thread Hans Hagen

On 1/8/2021 12:39 AM, Vedran Miletić wrote:


It's whatever ConTeXt standalone has. I don't have any extra Lua installed:


--credits should mention the lua version


Should I see it on non-HiDPI as well? Because it seems it's there.


depends on what you consider (non) hdpi ... the positioning of glyphs 
depends on font scale, rounding of stems and such (hints in fonts but 
these get less relevant with high res displays), caching, inter glyph 
corrections (that pdftex/luatex/...) put in the text stream to resync 
within certain tolerances, etc ... (often a print is a better reference 
as displays are seldom 600+ dpi) .. it's also why often expansion looks 
bad on screen because even a sub percentage difference can give such 
effects

 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] odd behaviour of mp odd function in lmtx

2021-01-07 Thread Hans Hagen

On 1/7/2021 8:03 PM, Damien Thiriet wrote:

Hi,


I may have found the bug that broke my metafun
file. Looks like it is connected to odd function.

This snippet of code:

\starttext

\startMPpage
path p;p:=origin--(20,20);
draw p;
draw p reflectedabout ((10,10),(10,-10)) withcolor red;
for i=1 upto 2:
if odd i:
   draw p yshifted 20 withcolor green;
else:
   draw p xshifted 20 withcolor blue;
fi;
endfor;


\stopMPpage

\stoptext

does not compile as I would expect (no green
line drawn). I noticed such behaviour in
2020.12.30 16:45
version. I updated a few minutes ago and have
the same output.

for now use this:

 let odd = relax;
 vardef odd expr n = ((abs(n) mod 2) == 1) enddef ;

I got it fixed (scaled, double and decimal) but no upload 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
-
___
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] styling part of an index entry

2021-01-07 Thread jbf
Thanks Jairo, with some tweaking I now have it working ( I had 
\placeindex instead of \placemyindex! And altered the 'style' name to 
something else as you hinted I should).


Now, this might be asking too much of ConTeXt, but some Newspaper names 
don't italicise the 'The', only the main name. Is it possible, do you 
think, to get the -> operator to work only on, say 'Observer' and not 
'The', and for that matter not on the page number as well? Perhaps not, 
but worth asking the question anyway!


Julian

On 8/1/21 9:46 am, Jairo A. del Rio wrote:

Hi. In latest LMTX (2021.01.07 16:59), your example works as expected:

\defineregister[myindex]

\defineprocessor[style][style=italic]%Isn't another name available?

\starttext

In \myindex{style->Observer, The}{\em The Observer} of 31 July 2018

\placemyindex%

\stoptext

Jairo


El jue, 7 de ene. de 2021 a la(s) 17:29, jbf (roma83...@gmail.com 
) escribió:


I'm wondering if further progress has been made in Mk IV on
styling parts of an index (register) entry? I have followed the
explanation on the wiki, but do not seem to be able to achieve
what I need.

And what I need is to be able to italicise entries that refer to
newspaper names, e.g. The Observer

MWE

\defineregister[myindex]
\defineprocessor[style][style=italic]

\starttext

In \myindex{style->Observer, The} {\em The Observer} of 31 July 2018

\stoptext

The only result I am getting is:

->Observer, The   223

But what I want is /Observer, The/ (in other words, in italics).

Clearly I am doing something wrong, or not enough, or... maybe
there is another way to achieve waht I need?

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

___


___
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] odd behaviour of mp odd function in lmtx

2021-01-07 Thread Damien Thiriet
Hi,


I may have found the bug that broke my metafun 
file. Looks like it is connected to odd function. 

This snippet of code:

\starttext

\startMPpage
path p;p:=origin--(20,20);
draw p;
draw p reflectedabout ((10,10),(10,-10)) withcolor red;
for i=1 upto 2:
   if odd i:
  draw p yshifted 20 withcolor green; 
   else:
  draw p xshifted 20 withcolor blue;
   fi;
endfor;


\stopMPpage

\stoptext

does not compile as I would expect (no green
line drawn). I noticed such behaviour in
2020.12.30 16:45
version. I updated a few minutes ago and have
the same output.

I hope I didn't miss anything.
Best regards,

Damien Thiriet 
___
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] styling part of an index entry

2021-01-07 Thread jbf
Thanks Jairo, with some tweaking I now have it working ( I had 
\placeindex instead of \placemyindex! And altered the 'style' name to 
something else as you hinted I should).


Now, this might be asking too much of ConTeXt, but some Newspaper names 
don't italicise the 'The', only the main name. Is it possible, do you 
think, to get the -> operator to work only on, say 'Observer' and not 
'The', and for that matter not on the page number as well? Perhaps not, 
but worth asking the question anyway!


Julian

On 8/1/21 9:46 am, Jairo A. del Rio wrote:

Hi. In latest LMTX (2021.01.07 16:59), your example works as expected:

\defineregister[myindex]

\defineprocessor[style][style=italic]%Isn't another name available?

\starttext

In \myindex{style->Observer, The}{\em The Observer} of 31 July 2018

\placemyindex%

\stoptext

Jairo


El jue, 7 de ene. de 2021 a la(s) 17:29, jbf (roma83...@gmail.com 
) escribió:


I'm wondering if further progress has been made in Mk IV on
styling parts of an index (register) entry? I have followed the
explanation on the wiki, but do not seem to be able to achieve
what I need.

And what I need is to be able to italicise entries that refer to
newspaper names, e.g. The Observer

MWE

\defineregister[myindex]
\defineprocessor[style][style=italic]

\starttext

In \myindex{style->Observer, The} {\em The Observer} of 31 July 2018

\stoptext

The only result I am getting is:

->Observer, The   223

But what I want is /Observer, The/ (in other words, in italics).

Clearly I am doing something wrong, or not enough, or... maybe
there is another way to achieve waht I need?

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

___


___
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] odd seems to be broken in lmtx-metafun

2021-01-07 Thread Damien Thiriet
Hi,

I think I found the bug that made me send a
"false positive" a few days ago.
Looks like something messes up with metafun odd function.

This snippet of code:

\starttext

\startMPpage
path p;p:=origin--(20,20);
draw p;
draw p reflectedabout ((10,10),(10,-10)) withcolor red;
for i=1 upto 2:
   if odd i:
  draw p yshifted 20 withcolor green; 
   else:
  draw p xshifted 20 withcolor blue;
   fi;
endfor;

%draw (0,0)--(20,20) withcolor red;
\stopMPpage

\stoptext
does not compile as I would expect it: no green line
is drawn (but there is an output). I hope I did not miss 
something and won't waste your time.

This appeared at least in 
2020.12.30 16:45 
version (I don't update often enough to give better hints)

Best regards,

Damien Thiriet


___
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] styling part of an index entry

2021-01-07 Thread Jairo A. del Rio
Hi. In latest LMTX (2021.01.07 16:59), your example works as expected:

\defineregister[myindex]

\defineprocessor[style][style=italic]%Isn't another name available?

\starttext

In \myindex{style->Observer, The}{\em The Observer} of 31 July 2018

\placemyindex%

\stoptext

Jairo

El jue, 7 de ene. de 2021 a la(s) 17:29, jbf (roma83...@gmail.com) escribió:

> I'm wondering if further progress has been made in Mk IV on styling parts
> of an index (register) entry? I have followed the explanation on the wiki,
> but do not seem to be able to achieve what I need.
>
> And what I need is to be able to italicise entries that refer to newspaper
> names, e.g. The Observer
>
> MWE
>
> \defineregister[myindex]
> \defineprocessor[style][style=italic]
>
> \starttext
>
> In \myindex{style->Observer, The} {\em The Observer} of 31 July 2018
>
> \stoptext
>
> The only result I am getting is:
>
> ->Observer, The   223
>
> But what I want is *Observer, The* (in other words, in italics).
>
> Clearly I am doing something wrong, or not enough, or... maybe there is
> another way to achieve waht I need?
>
> 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
>
> ___
>
___
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] styling part of an index entry

2021-01-07 Thread jbf
I'm wondering if further progress has been made in Mk IV on styling 
parts of an index (register) entry? I have followed the explanation on 
the wiki, but do not seem to be able to achieve what I need.


And what I need is to be able to italicise entries that refer to 
newspaper names, e.g. The Observer


MWE

\defineregister[myindex]
\defineprocessor[style][style=italic]

\starttext

In \myindex{style->Observer, The} {\em The Observer} of 31 July 2018

\stoptext

The only result I am getting is:

->Observer, The   223

But what I want is /Observer, The/ (in other words, in italics).

Clearly I am doing something wrong, or not enough, or... maybe there is 
another way to achieve waht I need?


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
___


Re: [NTG-context] LuaTeX and PDF.js

2021-01-07 Thread Hans Hagen

On 1/7/2021 10:10 PM, Vedran Miletić wrote:

Hello,

I compared latest ConTeXt standalone (LuaTeX 2.08) against TeX Live 2020 
(LuaTeX 1.12). The produced PDFs are:


https://miletic.net/lipsum-112.pdf
https://miletic.net/lipsum-208.pdf

Viewing them with Evince (and I assume Adobe Reader, I don't have it at 
hand to test) shows only minor differences in (horizontal) character 
spacing, which I would expect; the text looks reasonably good either 
way. However, viewing them with PDF.js shows a large difference:


https://miletic.net/lipsum-pdfjs-112.png
https://miletic.net/lipsum-pdfjs-208.png

As you can observe, b, m, n, p, and r (and possibly others) are moved 
slightly above other letters. Is this the expected behavior? If not, is 
this an issue with the way PDF.js is displaying the PDF or the way 
LuaTeX is producing it?
what lua does your 2.08 have? if it's 5.2. then such small differences 
can be a side effect of lua (different number models), serialization of 
numbers (default accuracy), or maybe rounding in the lua=>tex font 
interface (there were some fixes iir), the number of digist that the 
backend uses, etc


anyhow, so what you see (in the file) is (per line) transform matrices 
that are slightly different so what you then see is rounding to the 
device pixels


i wouldn't loose sleep over it .. nowadays fonts also evolve and that 
gives larger differences


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] Some ligatures don't work in latest LMTX

2021-01-07 Thread Jairo A. del Rio
Oh, yeah. It works again. Thank you very much :)

Jairo

El jue., 7 de ene. de 2021 10:20 a. m., Hans Hagen 
escribió:

> On 1/7/2021 3:04 PM, Jairo A. del Rio wrote:
> > Hmm, it works for Persian because this uses less diacritics than Arabic.
> > The following fails with LMTX:
> >
> > \definefontfamily[main][serif][notonaskharabic][features=arabic]
> >
> > \setupdirections[bidi=global,method=one]
> >
> > \setupbodyfont[main]
> >
> > \starttext
> >
> > \obeylines
> >
> > %
> https://www.letsstartthinking.org/Islam/quran-short-phrases-and-verses.php
> > <
> https://www.letsstartthinking.org/Islam/quran-short-phrases-and-verses.php
> >
> >
> > بِسْمِ اللَّـهِ الرَّحْمَـٰنِ الرَّحِيمِ
> >
> > \stoptext
> >
> > Hi, Hans. Could you please check this out? It works for MKIV, but in
> > LMTX vowels are misplaced. Thank you in advance.
>
> It works here but i have different code in the meantime. We're in a
> transition to an lmtx version of the font handler. In lmtx we need to do
> a bit more checking when we are in in compact font mode so it might be
> that there is temporary loss of some functionality. In principle mkiv
> and lmtx should do the same as there is no real change in logic.)
>
> I'll push an update later today,
>
> 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 show command in MetaFun

2021-01-07 Thread Keith McKay

Thanks Hans!

I had forgotten about \enabletrackers[metapost.tracingall].

Best Wishes

Keith

On 07/01/2021 15:35, Hans Hagen wrote:

On 1/7/2021 4:11 PM, Keith McKay wrote:
In the MWE below I would expect the "show" command to print the value 
of p in the console output (I use Texworks), however this does not 
seem to be happening. I haven't used "show" in MetaFun for a while, 
am I implementing it correctly?


Best Wishes

Keith McKay

 MWE %

\setuppapersize[A4, portrait]

\starttext

\startMPpage

StartPage;

width := PaperWidth ; height := PaperHeight ; unit := cm ;

numeric p;

p := 0;

for q = 0 step 1 until 10:

show p;

p := p + 1;

fill fullcircle xyscaled(3cm,4cm) shifted ((p +2)*cm, (p + 2)*cm) 
withcolor red ;


endfor;

StopPage;

\stopMPpage

\stoptext


\enabletrackers[metapost.tracingall]


but best use:

message(p);

-
  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 show command in MetaFun

2021-01-07 Thread Hans Hagen

On 1/7/2021 4:11 PM, Keith McKay wrote:
In the MWE below I would expect the "show" command to print the value of 
p in the console output (I use Texworks), however this does not seem to 
be happening. I haven't used "show" in MetaFun for a while, am I 
implementing it correctly?


Best Wishes

Keith McKay

 MWE %

\setuppapersize[A4, portrait]

\starttext

\startMPpage

StartPage;

width := PaperWidth ; height := PaperHeight ; unit := cm ;

numeric p;

p := 0;

for q = 0 step 1 until 10:

show p;

p := p + 1;

fill fullcircle xyscaled(3cm,4cm) shifted ((p +2)*cm, (p + 2)*cm) 
withcolor red ;


endfor;

StopPage;

\stopMPpage

\stoptext


\enabletrackers[metapost.tracingall]


but best use:

message(p);

-
  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] Some ligatures don't work in latest LMTX

2021-01-07 Thread Hans Hagen

On 1/7/2021 3:04 PM, Jairo A. del Rio wrote:
Hmm, it works for Persian because this uses less diacritics than Arabic. 
The following fails with LMTX:


\definefontfamily[main][serif][notonaskharabic][features=arabic]

\setupdirections[bidi=global,method=one]

\setupbodyfont[main]

\starttext

\obeylines

%https://www.letsstartthinking.org/Islam/quran-short-phrases-and-verses.php 



بِسْمِ اللَّـهِ الرَّحْمَـٰنِ الرَّحِيمِ

\stoptext

Hi, Hans. Could you please check this out? It works for MKIV, but in 
LMTX vowels are misplaced. Thank you in advance.


It works here but i have different code in the meantime. We're in a 
transition to an lmtx version of the font handler. In lmtx we need to do 
a bit more checking when we are in in compact font mode so it might be 
that there is temporary loss of some functionality. In principle mkiv 
and lmtx should do the same as there is no real change in logic.)


I'll push an update later today,

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
___


[NTG-context] Problem with show command in MetaFun

2021-01-07 Thread Keith McKay
In the MWE below I would expect the "show" command to print the value of 
p in the console output (I use Texworks), however this does not seem to 
be happening. I haven't used "show" in MetaFun for a while, am I 
implementing it correctly?


Best Wishes

Keith McKay

 MWE %

\setuppapersize[A4, portrait]

\starttext

\startMPpage

StartPage;

width := PaperWidth ; height := PaperHeight ; unit := cm ;

numeric p;

p := 0;

for q = 0 step 1 until 10:

show p;

p := p + 1;

fill fullcircle xyscaled(3cm,4cm) shifted ((p +2)*cm, (p + 2)*cm) 
withcolor red ;


endfor;

StopPage;

\stopMPpage

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


Re: [NTG-context] Some ligatures don't work in latest LMTX

2021-01-07 Thread Jairo A. del Rio
Hmm, it works for Persian because this uses less diacritics than Arabic.
The following fails with LMTX:

\definefontfamily[main][serif][notonaskharabic][features=arabic]

\setupdirections[bidi=global,method=one]

\setupbodyfont[main]

\starttext

\obeylines

%https://www.letsstartthinking.org/Islam/quran-short-phrases-and-verses.php

بِسْمِ اللَّـهِ الرَّحْمَـٰنِ الرَّحِيمِ

\stoptext

Hi, Hans. Could you please check this out? It works for MKIV, but in LMTX
vowels are misplaced. Thank you in advance.

Jairo

El jue, 7 de ene. de 2021 a la(s) 08:48, Jairo A. del Rio (
jairoadelr...@gmail.com) escribió:

> I didn't test it, but I could with some Iranian song lyrics as I did last
> time...
>
> Jairo
>
> El jue, 7 de ene. de 2021 a la(s) 01:33, 
> escribió:
>
>> Hi
>>
>> Does that work now?
>>
>> Best,
>>
>> Denis
>>
>>
>>
>> *Von:* ntg-context  *Im Auftrag von *Jairo
>> A. del Rio
>> *Gesendet:* Dienstag, 24. November 2020 08:12
>> *An:* mailing list for ConTeXt users 
>> *Betreff:* [NTG-context] Some ligatures don't work in latest LMTX
>>
>>
>>
>> Hi everyone. The following example works fine with MkIV, but fails with 
>> latest LMTX.
>>
>> To be specific, the lam-alif ligature isn't working. Compile with both to 
>> see differences.
>>
>> Majalla is a Windows font, so I guess it's available for testing:
>>
>>
>> \mainlanguage[arabic]
>>
>> \definefontfeature
>>
>>   [arabic]
>>
>>   [mode=node,language=dflt,script=arab,
>>
>>init=yes,medi=yes,fina=yes,isol=yes,
>>
>>liga=yes,dlig=yes,rlig=yes,clig=yes,
>>
>>mark=yes,mkmk=yes,kern=yes,curs=yes]
>>
>> \definefontfamily[main][serif][sakkalmajalla][features=arabic]
>>
>> \setupbodyfont[main]
>>
>> \setupdirections[bidi=global]
>>
>> \starttext
>>
>> أهلاً وسهلاً
>>
>> \stoptext
>>
>>
>>
>> Is that a bug or are more features to be specified? 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
>>
>> ___
>>
>
___
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] Some ligatures don't work in latest LMTX

2021-01-07 Thread Jairo A. del Rio
I didn't test it, but I could with some Iranian song lyrics as I did last
time...

Jairo

El jue, 7 de ene. de 2021 a la(s) 01:33,  escribió:

> Hi
>
> Does that work now?
>
> Best,
>
> Denis
>
>
>
> *Von:* ntg-context  *Im Auftrag von *Jairo A.
> del Rio
> *Gesendet:* Dienstag, 24. November 2020 08:12
> *An:* mailing list for ConTeXt users 
> *Betreff:* [NTG-context] Some ligatures don't work in latest LMTX
>
>
>
> Hi everyone. The following example works fine with MkIV, but fails with 
> latest LMTX.
>
> To be specific, the lam-alif ligature isn't working. Compile with both to see 
> differences.
>
> Majalla is a Windows font, so I guess it's available for testing:
>
>
> \mainlanguage[arabic]
>
> \definefontfeature
>
>   [arabic]
>
>   [mode=node,language=dflt,script=arab,
>
>init=yes,medi=yes,fina=yes,isol=yes,
>
>liga=yes,dlig=yes,rlig=yes,clig=yes,
>
>mark=yes,mkmk=yes,kern=yes,curs=yes]
>
> \definefontfamily[main][serif][sakkalmajalla][features=arabic]
>
> \setupbodyfont[main]
>
> \setupdirections[bidi=global]
>
> \starttext
>
> أهلاً وسهلاً
>
> \stoptext
>
>
>
> Is that a bug or are more features to be specified? 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
>
> ___
>
___
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] Continued chapter numbers

2021-01-07 Thread Henning Hraban Ramm

> Am 07.01.2021 um 12:20 schrieb Henning Hraban Ramm :
> 
> 
>> Am 07.01.2021 um 11:29 schrieb Marco Patzer :
>> 
>> Thanks for the info. I updated the wiki.
> 
> https://wiki.contextgarden.net/Titles
> 
> I did some more edits, but the page is still a mess.

I created the command page; not sure if I got the description right:

https://wiki.contextgarden.net/Command/defineresetset

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
___


Re: [NTG-context] Continued chapter numbers

2021-01-07 Thread Henning Hraban Ramm

> Am 07.01.2021 um 11:29 schrieb Marco Patzer :
> 
> Thanks for the info. I updated the wiki.

https://wiki.contextgarden.net/Titles

I did some more edits, but the page is still a mess.

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
___


Re: [NTG-context] HZ broken with latest 2020-12-27 LMTX

2021-01-07 Thread Jano Kula
Sorry for the hassle, now I have read the other thread confirming the fix.

Jano

On Thu, 7 Jan 2021 at 12:04, Jano Kula  wrote:

> Hello Hans,
>
> On Thu, 7 Jan 2021 at 11:48, Hans Hagen  wrote:
>
>> On 1/7/2021 11:22 AM, Jano Kula wrote:
>> > Hello,
>> >
>> > On Sun, 27 Dec 2020 at 22:45, Hans Hagen > > > wrote:
>> >
>> > hm, so what was the last version that it still worked ok?
>> >
>> >
>> > not sure about last version, but it is working with version
>> >
>> > system  > ConTeXt  ver: 2020.12.10 22:26 LMTX  fmt: 2020.12.11
>> >   int: english/english
>> >
>> > Tested with expansion-001.tex from the test suite.
>> wasn't that already fixed?
>>
>
> It might be fixed, I haven't seen the confirmation, so I did answer the
> question having older version installed.
>
> Jano
>
>
___
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] HZ broken with latest 2020-12-27 LMTX

2021-01-07 Thread Jano Kula
Hello Hans,

On Thu, 7 Jan 2021 at 11:48, Hans Hagen  wrote:

> On 1/7/2021 11:22 AM, Jano Kula wrote:
> > Hello,
> >
> > On Sun, 27 Dec 2020 at 22:45, Hans Hagen  > > wrote:
> >
> > hm, so what was the last version that it still worked ok?
> >
> >
> > not sure about last version, but it is working with version
> >
> > system  > ConTeXt  ver: 2020.12.10 22:26 LMTX  fmt: 2020.12.11
> >   int: english/english
> >
> > Tested with expansion-001.tex from the test suite.
> wasn't that already fixed?
>

It might be fixed, I haven't seen the confirmation, so I did answer the
question having older version installed.

Jano
___
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] HZ broken with latest 2020-12-27 LMTX

2021-01-07 Thread Hans Hagen

On 1/7/2021 11:22 AM, Jano Kula wrote:

Hello,

On Sun, 27 Dec 2020 at 22:45, Hans Hagen > wrote:


hm, so what was the last version that it still worked ok?


not sure about last version, but it is working with version

system          > ConTeXt  ver: 2020.12.10 22:26 LMTX  fmt: 2020.12.11 
  int: english/english


Tested with expansion-001.tex from the test suite.

wasn't that already fixed?

-
  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] Continued chapter numbers

2021-01-07 Thread Marco Patzer
On Thu, 7 Jan 2021 00:02:20 +0100
Wolfgang Schuster  wrote:

> > \definestructureresetset is the same as \defineresetset. I assume
> > that \definestructureresetset is the preferred way. But both will
> > work.  
> 
> No, \defineresetset is the main command and \definestructureresetset
> is a alias for backwards compatibility.

Thanks for the info. I updated the wiki.

Marco
___
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] HZ broken with latest 2020-12-27 LMTX

2021-01-07 Thread Jano Kula
Hello,

On Sun, 27 Dec 2020 at 22:45, Hans Hagen  wrote:

> hm, so what was the last version that it still worked ok?
>

not sure about last version, but it is working with version

system  > ConTeXt  ver: 2020.12.10 22:26 LMTX  fmt: 2020.12.11
 int: english/english

Tested with expansion-001.tex from the test suite.

Jano
___
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] Some ligatures don't work in latest LMTX

2021-01-06 Thread denis.maier
Hi
Does that work now?
Best,
Denis

Von: ntg-context  Im Auftrag von Jairo A. del Rio
Gesendet: Dienstag, 24. November 2020 08:12
An: mailing list for ConTeXt users 
Betreff: [NTG-context] Some ligatures don't work in latest LMTX


Hi everyone. The following example works fine with MkIV, but fails with latest 
LMTX.

To be specific, the lam-alif ligature isn't working. Compile with both to see 
differences.

Majalla is a Windows font, so I guess it's available for testing:

\mainlanguage[arabic]

\definefontfeature

  [arabic]

  [mode=node,language=dflt,script=arab,

   init=yes,medi=yes,fina=yes,isol=yes,

   liga=yes,dlig=yes,rlig=yes,clig=yes,

   mark=yes,mkmk=yes,kern=yes,curs=yes]

\definefontfamily[main][serif][sakkalmajalla][features=arabic]

\setupbodyfont[main]

\setupdirections[bidi=global]

\starttext

أهلاً وسهلاً

\stoptext



Is that a bug or are more features to be specified? 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] Randomize order of blocks

2021-01-06 Thread Jairo A. del Rio
Nice. I had something a little bit different in mind, but your examples
gave me some ideas, especially the shuffling stuff. If I have something new
to add, I will share my results with the list. Thank you a lot.

Best regards,

Jairo

El mié, 6 de ene. de 2021 a la(s) 03:56, Otared Kavian (ota...@gmail.com)
escribió:

> Following up my previous message, here is an example:
>
> %% begin shuffled list of exercises
> \setuprandomize[2021]
>
> \startluacode
> function shuffle(tableau)
> local maxsize, t, tt
> maxsize = #tableau
> tt = {}
> t = {}
> for i = 1, maxsize do
> t[i] = {}
> t[i]["columnOne"] = tableau[i]
> t[i]["columnTwo"] = math.random(1,100*maxsize)
> end
> table.sort(t, function(a,b) return a.columnTwo <
> b.columnTwo end)
> for i = 1, maxsize do
> tt[i] = t[i]["columnOne"]
> end
> return tt
> end
> \stopluacode
>
> % We define three arrays
> % with the names, the functions and their derivatives
> % One could also add a ListOfVariables...
>
> \startluacode
>
> ListOfNames = {
> "f",
> "g",
> "h",
> "u",
> "v",
> "F",
> "G",
> "H",
> }
>
> ListOfFunctions = {
> "\\cos(x^2)",
> "x\\sin(x)",
> "\\tan(x)",
> "x^3 - 3x^2 + 1",
> "\\frac{1}{1 + x^2}",
> "\\sin(\\log(x))",
> }
>
> ListOfDerivatives = {
> "-2x\\sin(x^2)",
> "x\\cos(x) + \\sin(x)",
> "1 + \\tan(x)^2",
> "3x^2 - 6x",
> "\\frac{-2x}{(1 + x^2)^2}",
> "\\frac{\\cos(\\log(x))}{x}",
> }
>
> \stopluacode
>
> \starttext
>
> % We define a buffer and a shuffled list of integers
>
> \startbuffer[test-derivatives]
> \startluacode
> ShuffledList = shuffle({1,2,3,4,5,6})
> \stopluacode
>
> Let $\cldcontext{ListOfNames[ShuffledList[\recurselevel]]}(x) :=
> \cldcontext{ListOfFunctions[ShuffledList[\recurselevel]]}$. Prove that
> \startformula
> \cldcontext{ListOfNames[ShuffledList[\recurselevel]]}'(x) =
> \cldcontext{ListOfDerivatives[ShuffledList[\recurselevel]]}
> \stopformula
> \stopbuffer
>
> \dorecurse{6}{\blank[medium]{\bf Exercise #1.}
> \getbuffer[test-derivatives]
> }
>
> \stoptext
>
> %% end shuffled list of exercises
>
>
> > On 6 Jan 2021, at 09:41, Otared Kavian  wrote:
> >
> > Hi Jairo,
> >
> > One can indeed make quizzes and exams with randomized order of problems,
> randomized values and even randomized names of functions and variables.
> > I have some examples which I have been using for several years (they are
> useful especially in these days of giving exams online…): I can send them
> to you as they are, or if you tell me what kind of problems you want, then
> I can adapt my examples before sending them to you.
> >
> > Best regards: Otared
> >
> >> On 5 Jan 2021, at 17:18, Jairo A. del Rio 
> wrote:
> >>
> >> Hi, list.
> >>
> >> Some time ago I realized ConTeXt has "blocks" which allow one to make
> quizzes, exams and related with ease. However, I want to know if there's an
> option to randomize their order when printed. 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
> >>
> ___
> >
>
>
> ___
> 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/

Re: [NTG-context] Display reference number as Roman number

2021-01-06 Thread Rik Kabel

On 11/24/2020 22:09, Rik Kabel wrote:


Hello all,

What I thought should be a simple conversion escapes me.

I have a reference (created originally via a label defined by 
\definelabel) that, when referenced as \in[label] or 
\ref[number][label] displays a number, and that is how I normally use 
it. However, I want to display it in one instance as a Roman numeral. 
\Romannumerals{\in[label]} complains that it is not being fed a number.


How can I display the label number in Roman number format in this one 
instance?


--
Rik

Okay, I have something that works. Perhaps not optimally, but it is 
functional.


   \definelabel[Qa]
   \definecounter[SAVE][numberconversion=R]
   \starttext
   This is labeled.\Qa\par
   This is labeled.\Qa[REF]\par
   \setcounter[SAVE][{\rawcountervalue[Qa]}]
   See \in[REF].\par
   See \ref[number][REF].\par
   See \in[REF].\par
   This is labeled.\Qa\par
   See \convertedcounter[SAVE].\par
   \stoptext

If you can improve it, please do. A solution that lets me use the label 
name (Qa here) and convert the associated number would be nice.


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


Re: [NTG-context] Continued chapter numbers

2021-01-06 Thread Wolfgang Schuster

Marco Patzer schrieb am 06.01.2021 um 22:09:

On Thu, 7 Jan 2021 07:09:46 +1100
jbf  wrote:


I had searched everywhere on the wiki and in the manuals for
something like this, based on 'reset' but could not find it.

AFAIK it's not mentioned in the manuals. But a variant is on the
wiki “Independent Section Numbering”:

   https://wiki.contextgarden.net/Titles

   \definestructureresetset
 [default][1,1,0][1] %% reset part, chapter, but not section

   \setuphead
 [sectionresetset=default]

\definestructureresetset is the same as \defineresetset. I assume
that \definestructureresetset is the preferred way. But both will
work.


No, \defineresetset is the main command and \definestructureresetset is 
a alias for backwards compatibility.


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] Continued chapter numbers

2021-01-06 Thread Marco Patzer
On Thu, 7 Jan 2021 07:09:46 +1100
jbf  wrote:

> I had searched everywhere on the wiki and in the manuals for
> something like this, based on 'reset' but could not find it.

AFAIK it's not mentioned in the manuals. But a variant is on the
wiki “Independent Section Numbering”:

  https://wiki.contextgarden.net/Titles

  \definestructureresetset
[default][1,1,0][1] %% reset part, chapter, but not section

  \setuphead
[sectionresetset=default]

\definestructureresetset is the same as \defineresetset. I assume
that \definestructureresetset is the preferred way. But both will
work.

Marco
___
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] Continued chapter numbers

2021-01-06 Thread jbf
Thanks Denis, as you said not tested, but now it has been tested... did 
not work, though I might try some variations of that just to see if it 
could work somehow.


In the meantime Marco's solution has worked so the immediate problem is 
resolved.


Julian

On 6/1/21 9:10 pm, denis.ma...@ub.unibe.ch wrote:

Not tested, but what about this?

\setupcounter[chapter][way=bytext]

Best,
Denis


-Ursprüngliche Nachricht-
Von: ntg-context  Im Auftrag von jbf
Gesendet: Mittwoch, 6. Januar 2021 10:24
An: mailing list for ConTeXt users 
Betreff: [NTG-context] Continued chapter numbers

I need chapter numbers to continue sequentially across several parts. At the
moment, when Part 2 begins, it begins with Chapter 1 once more, while it
should be (in continued sequence) Chapter 4.

I know that I can achieve the desired result by including ownnumber=4, so:

\startchapter[title={My chapter title},ownnumber=4] will do that for me.
But this means I have to do it for every chapter that follows (there are
11 more!).

Perhaps there is a single way to get the result I want in the preamble with
\setuphead[chapter] or similar. I have searched the wiki but it is not easy to
find an answer to this. Can anyone point me to where, in the wiki, I can find a
simple way to ensure sequential chapter numbers?

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

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


Re: [NTG-context] Continued chapter numbers

2021-01-06 Thread jbf

\defineresetset
   [jbfreset] [] [0]

\setuphead
   [chapter]
   [sectionresetset=jbfreset]

That does indeed work for me. I had searched everywhere on the wiki and 
in the manuals for something like this, based on 'reset' but could not 
find it. While it is clearly something you knew (and I now know!), do 
you know where this is mentioned in any ConTeXt documentation?


Grateful for the solution!

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
___


Re: [NTG-context] \definefontfeature and script

2021-01-06 Thread Pablo Rodriguez
On 1/6/21 1:41 PM, Hans Hagen wrote:
> On 1/5/2021 6:53 PM, Pablo Rodriguez wrote:
>> [...]
>> GFS Heraklit
>> (https://greekfontsociety-gfs.gr/_assets/fonts/GFS_Heraklit.zip [direct
>> link].) defines Greek c2sc and smcp for grek{dflt} (as displayed by
>> FontForge [which I read as: default language and Greek script]).
>
> kind of inconsistent:
>
> c2sc grek dflt
>   latn dflt
> onum cyrl dflt
>   dflt dflt
>   grek dflt
>   latn aze crt deu dflt mol rom srb trk
> smcp cyrl dflt
>   dflt dflt
>   grek dflt
>   latn dflt
>
> so just don't specify a script

I’m afraid that this doesn’t get the Greek small caps (either with
2020.12.30 16:45 or 2021.01.05 10:45).

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___
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
___


  1   2   3   4   5   6   7   8   9   10   >