Re: [NTG-context] XML-processing: Error with hyphenatedurl

2021-10-27 Thread Hans Hagen via ntg-context

On 10/27/2021 5:37 PM, Denis Maier via ntg-context wrote:


Oh, actually that leads to a similar problem as in my original question where 
Wolfgang suggested using \expandUx: if the URL is broken across lines, the link 
content is also broken. Interestingly, the plain

\startxmlsetups xml:ext-link-var-var
\goto{\hyphenatedurl{\xmlflush{#1}}}[url(\xmlflush{#1})]
\stopxmlsetups

seems to work now correctly.
it depends abit on what gets flushed, in those cases a low level flush 
has to be used


\xmltext
\xmltextonly
\xmlraw

to get the raw data .. depends on content

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] Failure to compile with new date code

2021-10-25 Thread Hans Hagen via ntg-context

On 10/25/2021 10:31 PM, Rik Kabel wrote:
This has been part of my setup interaction for a couple of years. 
Documents all pass verapdf pdf3a testing.


On Oct 25, 2021 15:54, Hans Hagen via ntg-context  
wrote:


On 10/25/2021 7:54 PM, Pablo Rodriguez via ntg-context wrote:
 > On 10/25/21 4:45 PM, Rik Kabel via ntg-context wrote:
 >> Hello all,
 >>
 >> The example below continues to work with MkIV, but now fails
with the
 >> most recent (ConTeXt  ver: 2021.10.24 21:45) LMTX:
 >>
 >>  \define\DraftOf   {Draft of \date}
 >>  \setupinteraction [date={\DraftOf}]
 >
 > Hi Rik,
 >
 > \setupinteraction[date=***] only accepts a date as input.
 >
 > Would it be possible that it was subtitle or title any of the options
 > you used?

we can of course accept anything but because these dates end up in
different spots it gets hairy ... also it can invalidate a pdf


next upload:

system  > invalid time specification 'Draft of October 25, 2021'
 -----
  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] Failure to compile with new date code

2021-10-25 Thread Hans Hagen via ntg-context

On 10/25/2021 10:31 PM, Rik Kabel wrote:
This has been part of my setup interaction for a couple of years. 
Documents all pass verapdf pdf3a testing.


the date only ended up in some places but now we try to be consistent on 
all places


On Oct 25, 2021 15:54, Hans Hagen via ntg-context  
wrote:


On 10/25/2021 7:54 PM, Pablo Rodriguez via ntg-context wrote:
 > On 10/25/21 4:45 PM, Rik Kabel via ntg-context wrote:
 >> Hello all,
 >>
 >> The example below continues to work with MkIV, but now fails
with the
 >> most recent (ConTeXt  ver: 2021.10.24 21:45) LMTX:
 >>
 >>  \define\DraftOf   {Draft of \date}
 >>  \setupinteraction [date={\DraftOf}]
 >
 > Hi Rik,
 >
 > \setupinteraction[date=***] only accepts a date as input.
 >
 > Would it be possible that it was subtitle or title any of the options
 > you used?

we can of course accept anything but because these dates end up in
different spots it gets hairy ... also it can invalidate a pdf

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

___





--

-----
  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] Failure to compile with new date code

2021-10-25 Thread Hans Hagen via ntg-context

On 10/25/2021 7:54 PM, Pablo Rodriguez via ntg-context wrote:

On 10/25/21 4:45 PM, Rik Kabel via ntg-context wrote:

Hello all,

The example below continues to work with MkIV, but now fails with the
most recent (ConTeXt  ver: 2021.10.24 21:45) LMTX:

 \define\DraftOf   {Draft of \date}
 \setupinteraction [date={\DraftOf}]


Hi Rik,

\setupinteraction[date=***] only accepts a date as input.

Would it be possible that it was subtitle or title any of the options
you used?


we can of course accept anything but because these dates end up in 
different spots it gets hairy ... also it can invalidate a pdf


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] Line breaks, \wordright and hyphenation

2021-10-24 Thread Hans Hagen via ntg-context

On 10/24/2021 1:08 PM, Benjamin Buchmuller via ntg-context wrote:

Maybe

\hfill author


It's anyway nicer to use

% \definenarrower
%   [amnata]
%   [left=\measure{amnatamargin},
%right=\measure{amnatamargin},
%default={left,right}]

\definenarrower
  [amnata]
  [middle=\measure{amnatamargin}]

but then them, the fact that we get something hyphenated interferes .. 
tricky



On 24. Oct 2021, at 04:12, kauśika cittūr  wrote:

Dear list,

In short, my question is: why does \wordright cause a line-break when the line
preceding it breaks with hyphenation and does not otherwise? How to avoid it
(if at all possible)?

I have this delimitedtext instance called 'amnata' defined as below:

\definemeasure[amnatamargin][3cm]
\definedelimitedtext
  [amnata]
\setupdelimitedtext
  [amnata]
  [
left=,
right=,
leftmargin={\measure{amnatamargin}},
rightmargin={\measure{amnatamargin}},
  ]

I am using this to quote paragraph(s) of other authors.
Since, I also want to indicate where the quote is from, I use this as follows:

\startamnata
  ⋮
\wordright{author}
\stopamnata

so that the author's name appears at the right-edge of the block.

When the penultimate line inside the block breaks without hyphenation, then
argument of \wordright is typeset as expected (i.e. in the same line).

On the other hand, when the penultimate line inside this block breaks with
hyphenation, the argument of \wordright is pushed to the next line even when
there is enough space for it on the same line.

Here is a sample illustrating this:

\startamnata
A quote from another author : Suppose that thereisalongwordhere.
\wordright{– author}
\stopamnata

\startamnata
A quote from another author : Here, the text does not cause
hyphenation in the first line.
\wordright{– author}
\stopamnata

[I have attached the output here as an image]

How do I ensure that this does not happen, if that is possible at all? I
suppose this is expected behaviour but I am not able to understand why.

Thanks,
kauśika


___
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] resetting setuphyphenatedurl...

2021-10-24 Thread Hans Hagen via ntg-context

On 10/23/2021 4:53 AM, Rik Kabel via ntg-context wrote:

Hello List,

As demonstrated in the following example, it does not seem possible to 
reset \setuphyphenatedurlbefore, after, or normal once changed from 
default. That is, the first change appears to be global and unchangeable.


If this is the case, can someone suggest a workaround?


in lmtx i can add support for grouping (in mkiv it would be a fragile 
hack; these settings happen in lua not in tex)


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] How to enable the use of the blackboard font in modern ConTeXt

2021-10-23 Thread Hans Hagen via ntg-context

On 10/23/2021 3:31 PM, Wolfgang Schuster via ntg-context wrote:

Gerben Wierda via ntg-context schrieb am 23.10.2021 um 15:24:
On 23 Oct 2021, at 15:15, Pablo Rodriguez via ntg-context 
mailto:ntg-context@ntg.nl>> wrote:


On 10/23/21 3:00 PM, Gerben Wierda via ntg-context wrote:

By the way, neither does \blackboard{Q} work. But \rationals works in
the case of the letter Q.


Hi Gerben,

it only seems to work inside math:

 \starttext
 \dorecurse{26}{$\blackboard\characters{\recurselevel}
 \Characters{\recurselevel}$}
 \stoptext

I hope it helps,


Yes, the new \blackboard command works, so $\blackboard{Q}$ works. Thanks.


The \blackboard command is a switch like \it, to keep it local to a 
single character put the left brace before the command.


     $Q {\blackboard Q} Q$

also, it is an math alphabet switch (one of the math alphabets)

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

2021-10-22 Thread Hans Hagen via ntg-context

On 10/22/2021 5:50 PM, Michal Vlasák wrote:

Hello,

On Thu Oct 21, 2021 at 8:04 PM CEST, Hans Hagen via ntg-context wrote:

I cleaned up some more backend code. There were some mails about dates
and such and although the date field in setupinteraction works ok a more
drastic overload is doen with directives. The reason is that the fact
that we can set the date (and traler) is only because it permits
generating pdf files that can be compared. No date as a bad idea anyway.

\setupinteraction[title=My Title]
% \enabledirectives[backend.date=2034-06-07]
\enabledirectives[backend.date=no]
\enabledirectives[backend.trailerid=no]


I checked the backend code and some of the related os functions. I put
together a patch that hopefully fixes some stuff and doesn't break
anything. The changes:

1) Dates parsed by ConTeXt (function converters.totime), such as those
that are input to backend.date, now allow specifying seconds and time
zone information. If there is no timezone the datetime is presumed to be
in local time, otherwise the datetime is offset by the local / specified
time zone difference (because ConTeXt outputs these dates as local times
with local timezone). Additionally both "T" and " " are now allowed as
date/time separator characters. Thus dates output by ConTeXt can be also
fed in.


i made the parser a bit more tolerant

"1234-12-30"
"1234/12/30"
"1234-12-30 23:45"
"1234-12-30 23:45:16"
"1234-12-30  23:45:16"
"1234-12-30T23:45:16+01:00"
"1234-12-30 23:45:16-02:00"
"1234-12-30 23:45:16+05:00"
"1234-12-30 23:45:16 05:00"
"1234-12-30  23:45:16  05:00"

(I'll send you the file to check/test)


2) Fix the os.timezone function. Previously, it could be wrong around
midnight, which I discovered only by chance. The trick is lifted from
http://lua-users.org/wiki/TimeZone, which I hope is OK. The before and
after (I am at +02:00):

 os.localtime()  2021-10-22 01:44:24
 os.now()2021-10-21 23:44:24
 os.timezone(true)   -22:00


 os.localtime()  2021-10-22 01:46:23
 os.now()2021-10-21 23:46:23
 os.timezone(true)   +02:00


shouldn't we also offer a -02:00 ? (relative)


I also extended the interface of os.timezone to accommodate 1), but as
this is probably a very public interface, I am not sure if these changes
are OK. If more changes to the interface can be made, I propose to get
rid of the delta parameter, since it seems like a remnant from the past.


maybe later, i need to check other files


Some caching can also be introduced, but I again wasn't sure if this
even would be the final form of the function, so didn't do anything in
that sense, yet.


i'll adapt it to that


3) Don't use %X in time formats. It is specified to be platform
dependent and we want %H:%M:%S everywhere. Also, it would be nice if
lpdf-xmp.lmt would use the os.fulltime() function to format dates (like
back-exp.lmt does), but there are multiple dates with different formats
and purposes and it is probably too late to change now.


(probably not that harmfull on the platforms we support)

the reason for different times is that i never liked the timezone in 
regular date/time (so only the mandate one had it) but in the end i 
don't care that much about times/date i never look at (i admit that i 
never consult any of this pdf meta data)



4) I changed the os.fulltime function, that returns date + time + local
time zone to output the _local_ time instead of UTC time. This is AFAICT
the right way to do times. The PDF spec says:

 If no UT information is specified, the relationship of the specified
 time to UT shall be considered to be GMT. Regardless of whether the
 time zone is specified, the rest of the date shall be specified in
 local time.

 EXAMPLE: For example, December 23, 1998, at 7:52 PM, U.S. Pacific
 Standard Time, is represented by the string D:199812231952-08'00

A test program:


 \enabletrackers[backend.info]
 
 \enabledirectives[backend.date=1234-12-30]% 1234-12-30T00:00:00+02:00

 \enabledirectives[backend.date=1234-12-30 23:45]  % 
1234-12-30T23:45:00+02:00
 \enabledirectives[backend.date=1234-12-30 23:45:16]   % 
1234-12-30T23:45:16+02:00
 \enabledirectives[backend.date=1234-12-30T23:45:16+01:00] % 
1234-12-31T00:45:16+02:00
 \enabledirectives[backend.date=1234-12-30 23:45:16-02:00] % 
1234-12-31T03:45:16+02:00
 \enabledirectives[backend.date=1234-12-30 23:45:16+05:00] % 
1234-12-31T20:45:16+02:00
 
 \starttext

 dummy text
 
 \startluacode

 print("os.timezone(true)", os.timezone(true)) -- +02:00
 print("os.fulltime()", os.fulltime()) -- 2021-10-22 17:38:38+02:00
 print("os.localtime()", os.localtime())   -- 2021-10-22 17:38:38
 print("os.now()", os.now())   -- 2021-1

Re: [NTG-context] another svg conversion=mp question

2021-10-22 Thread Hans Hagen via ntg-context

On 10/22/2021 3:58 PM, juh via ntg-context wrote:

Hi,

I include images with a variable via pandoc in a externalfigure
directive.

These images can be jpgs, pngs, pdfs and svgs.

Can I do any harm if I do:

\setupexternalfigures[conversion=mp]


probably not unless there is an mp conversion for the other formats

-
  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] vertical align in combination

2021-10-22 Thread Hans Hagen via ntg-context

On 10/22/2021 5:20 PM, Pablo Rodriguez via ntg-context wrote:

Dear list,

I have the following sample:

   \starttext
   \setupexternalfigure[location=default]
   \startcombination[nx=3, ny=2, location={middle}]
   {\externalfigure[mill.png][width=.25\textwidth]}
   {\externalfigure[cow.pdf][width=.25\textwidth]}
   {\externalfigure[cow.pdf][width=.25\textwidth]}
   {\externalfigure[spider.eps][width=.25\textwidth]}
   {\externalfigure[hacker.png][width=.25\textwidth]}
   {\externalfigure[mill.png][width=.25\textwidth]}
   \stopcombination
   \stoptext

The first line has the images vertically centered, but the second line
has them aligned to the top. Using "align=middle" made no difference.

How could I get all lines with images vertically centered?


maybe by using the command the right way ...

  \setupexternalfigure[location=default]
  \startcombination[nx=3, ny=2, location={middle}]
  {\externalfigure[mill.png][width=.25\textwidth]}  {}
  {\externalfigure[cow.pdf][width=.25\textwidth]}   {}
  {\externalfigure[cow.pdf][width=.25\textwidth]}   {}
  {\externalfigure[spider.eps][width=.25\textwidth]}{}
  {\externalfigure[hacker.png][width=.25\textwidth]}{}
  {\externalfigure[mill.png][width=.25\textwidth]}  {}
  \stopcombination



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
___




--

-
  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] another svg conversion=mp question

2021-10-22 Thread Hans Hagen via ntg-context

On 10/22/2021 3:58 PM, juh via ntg-context wrote:

Hi,

I include images with a variable via pandoc in a externalfigure
directive.

These images can be jpgs, pngs, pdfs and svgs.

Can I do any harm if I do:

\setupexternalfigures[conversion=mp]

unrelated to svg

\startMPcode
fill fullcircle scaled 1cm withcolor 1;
\stopMPcode

a missing return in line 295 of mlib-pps.lmt:

return checked_color_pair(f_gray,s,s)



-
  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] mp-geo Metapost package with ConTeXt

2021-10-22 Thread Hans Hagen via ntg-context

On 10/22/2021 4:16 PM, Henning Hraban Ramm via ntg-context wrote:



Am 22.10.2021 um 11:31 schrieb Henning Hraban Ramm via ntg-context 
:



Am 17.07.2021 um 12:45 schrieb Hans Hagen :


\startMPpage
   draw lmt_openstreetmap [
   filename = "hasselt.osm"
   grid = "dots",
   ] ;
\stopMPpage

The hasselt osm file is sime 12 MB, the colorful hasselt pdf file just below 1 
MB so that's okay (3.7 sec processing time on my machine so if all claims are 
right sub seconds on a fast new apple).


I finally tried this, hoping to replace my Maperitive workflow.

With a Bonn map from https://download.bbbike.org/osm/bbbike/ of 724 MB I 
started it last night (~13 h before), and it still didn’t finish. No messages 
after:

openstreetmap   > processing file '/Users/hraban/Downloads/ConTeXt/Bonn.osm'
openstreetmap   > original size 713811948 bytes, stripped down to 603309215 
bytes


Maybe I should try smaller files ;)


Indeed:

openstreetmap   > processing file '/Users/hraban/Downloads/ConTeXt/Limburg.osm'
openstreetmap   > original size 12431810 bytes, stripped down to 8768209 bytes
openstreetmap   > xml data loaded
openstreetmap   > 859154 characters metapost code, preprocessing time 3.165 
seconds
...
pdfview | command: open "osm-test.pdf" 1>/dev/null 2>/dev/null &
mtx-context | pdfview overhead: 0.005 seconds
system  | total runtime: 9.211 seconds of 9.328 seconds

The PDF is 488 kB.


Redefining color works, if you know what you’re looking for – and it’s partly 
really strange what is marked how...
Seems like I should start to work on OSM again.


yes, and we need to add more heuristics (i already added some after 
rendering don knuths university site (apart from the many fast food 
venue research institutes are also marked 'interestingly')



Are there any plans for text labels, e.g. street names? (I guess these are 
really tricky.)

depends on how

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] mp-geo Metapost package with ConTeXt

2021-10-22 Thread Hans Hagen via ntg-context

On 10/22/2021 11:31 AM, Henning Hraban Ramm via ntg-context wrote:



Am 17.07.2021 um 12:45 schrieb Hans Hagen :


\startMPpage
draw lmt_openstreetmap [
filename = "hasselt.osm"
grid = "dots",
] ;
\stopMPpage

The hasselt osm file is sime 12 MB, the colorful hasselt pdf file just below 1 
MB so that's okay (3.7 sec processing time on my machine so if all claims are 
right sub seconds on a fast new apple).


I finally tried this, hoping to replace my Maperitive workflow.

With a Bonn map from https://download.bbbike.org/osm/bbbike/ of 724 MB I 
started it last night (~13 h before), and it still didn’t finish. No messages 
after:

openstreetmap   > processing file '/Users/hraban/Downloads/ConTeXt/Bonn.osm'
openstreetmap   > original size 713811948 bytes, stripped down to 603309215 
bytes

Maybe I should try smaller files ;)


We hit a limti in lpeg that allocates memory by duplicating the size 
which then hits a top and falls back in allocating by + 1 every capture 
which then kind of stalls the xml interpretation. I can hack that to 
work (and need to check that with every lpeg update), but as we enter a 
next stage in th econversion mem starts going virtual anyway and I see 
my SSD being tortured so I aborted. More testing has to wait till I (if 
ever) have a faster machine, with (say) 64GB super fast memory.


On my machine the still ok size is some 200MB.

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] \rotate[rotation=270] adds extra vertical space

2021-10-22 Thread Hans Hagen via ntg-context

On 10/21/2021 6:34 PM, Pablo Rodriguez via ntg-context wrote:

Dear list,

I have the following imposition sample:

   \startbuffer[newbuff]
   \showframe\showgrid
   \setuppapersize[A3, landscape]
   \setuplayout[width=middle]
   \starttext
   \dorecurse{4}{\null\page}
   \stoptext
   \stopbuffer
   \startmode[*first]
   \savebuffer[newbuff][A3page.tex, prefix=no]
   \executesystemcommand{context --purgeall A3page.tex}
   \stopmode
   \showframe
   \setuplayout[page]
   \setuppapersize[A5][A4, landscape]
   \setuparranging [2UP]
   \setupinteractionscreen[option={landscape, paper}]
   \starttext
   \doiffile{A3page.pdf}
   {\def\Doc{A3page.pdf}
   \getfiguredimensions[\Doc]
   \dorecurse{\noffigurepages}
 {\ifodd\recurselevel
   \rotate[rotation=90]
 {\externalfigure[\Doc][page=\recurselevel, width=\textheight]}
 \else\rotate[rotation=270]
 {\externalfigure[\Doc][page=\recurselevel, width=\textheight]}
 \fi}}
   \stoptext

I’m afraid that if rotation values are 270 or 180, the imposed page has
an extra vertical space before.

nicer demo:

\showframe

\starttext
\topskip4cm
\dostepwiserecurse{0}{360}{10}{

\ruledhbox{\rotate[rotation=#1]{\blackrule[width=\textheight,height=\textwidth,depth=0cm,color=darkred]}}
}
\dostepwiserecurse{0}{360}{10}{

\ruledhbox{\rotate[rotation=#1,location=high]{\blackrule[width=\textheight,height=\textwidth,depth=0cm,color=darkgreen]}}
}
\dostepwiserecurse{0}{360}{10}{

\ruledhbox{\rotate[rotation=#1,location=fit]{\blackrule[width=\textheight,height=\textwidth,depth=0cm,color=darkblue]}}
}
\dostepwiserecurse{0}{360}{10}{

\ruledhbox{\rotate[rotation=#1,location=middle]{\blackrule[width=\textheight,height=\textwidth,depth=0cm,color=darkcyan]}}
}
\dostepwiserecurse{0}{360}{10}{

\ruledhbox{\rotate[rotation=#1,location=depth]{\blackrule[width=\textheight,height=\textwidth,depth=0cm,color=darkmagenta]}}
}
\dostepwiserecurse{0}{360}{10}{

\ruledhbox{\rotate[rotation=#1,location=broad]{\blackrule[width=\textheight,height=\textwidth,depth=0cm,color=darkyellow]}}
}
\stoptext


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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] upload

2021-10-22 Thread Hans Hagen via ntg-context

On 10/21/2021 9:13 PM, Pablo Rodriguez via ntg-context wrote:

On 10/21/21 8:04 PM, Hans Hagen via ntg-context wrote:

Hi,

I cleaned up some more backend code.  There were some mails about dates
and such and although the date field in setupinteraction works ok a more
drastic overload is doen with directives. The reason is that the fact
that we can set the date (and traler) is only because it permits
generating pdf files that can be compared. No date as a bad idea anyway.

\setupinteraction[title=My Title]
% \enabledirectives[backend.date=2034-06-07]


Many thanks for the new version, Hans.

Is there a way to add time and timezone in backend.date?


Pablo : transparencies should work again (wrong alias fixed).


Many thanks for this fix too.

Sorry for insisting, but could you check what is wrong with an extra
blank space in rotated imposition
(https://mailman.ntg.nl/pipermail/ntg-context/2021/103909.html)?

.. it was not really a minimal example ...

\showframe

\starttext
\topskip4cm
\rotate[rotation=90] 
{\externalfigure[A3page.pdf][page=1,width=\textheight]}\page


\rotate[rotation=270]{\externalfigure[A3page.pdf][page=2,width=\textheight]}\page
\rotate[rotation=90] 
{\externalfigure[A3page.pdf][page=1,width=\textheight]}\page


\rotate[rotation=270]{\externalfigure[A3page.pdf][page=2,width=\textheight]}\page
\stoptext

so, you need to wrap it, like

\startpagemakeup \rotate[rotation=90] 
{\externalfigure[A3page.pdf][page=1,width=\textheight]}\stoppagemakeup
\startpagemakeup 
\rotate[rotation=270]{\externalfigure[A3page.pdf][page=2,width=\textheight]}\stoppagemakeup
\startpagemakeup \rotate[rotation=90] 
{\externalfigure[A3page.pdf][page=1,width=\textheight]}\stoppagemakeup
\startpagemakeup 
\rotate[rotation=270]{\externalfigure[A3page.pdf][page=2,width=\textheight]}\stoppagemakeup


and not make it 'sort of text that breaks or not across the page'. Now 
it is an interesting question why ... (spoiler: nice animation:)


\starttext
\topskip4cm
\dostepwiserecurse{0}{360}{1}{

\rotate[rotation=#1]{\externalfigure[A3page.pdf][page=1,width=\textheight]}
}
\stoptext

so we probably cross some threshold with some angles and because these 
are basically lines, we then get an interplay woth topskip, maxdepth etc 
(which normally goes unnoticed)


the good news is that you can play with it because rotate is normally 
configured for inline usage (so we get depth and height) you can use the 
location parameter to do otherwise:


% normal default depth fit broad high middle

\starttext
\topskip4cm
\dostepwiserecurse{0}{360}{1}{

\ruledhbox{\rotate[rotation=#1,location=high]{\externalfigure[A3page.pdf][page=1,width=\textheight]}}
}
\stoptext

irr it's actually shown somewhere in a manual but the source also has this

% \dostepwiserecurse{0}{360}{10}
%   {\startlinecorrection[blank]
%\hbox
%  {\expanded{\setuprotate[rotation=\recurselevel]}%
%   \traceboxplacementtrue
%   \hbox to .2\hsize{\hss\ruledhbox{\rotate[location=depth] 
{\ruledhbox{\bfb  (depth)%
%   \hbox to .2\hsize{\hss\ruledhbox{\rotate[location=fit] 
{\ruledhbox{\bfb(fit)%
%   \hbox to .2\hsize{\hss\ruledhbox{\rotate[location=broad] 
{\ruledhbox{\bfb  (broad)%
%   \hbox to 
.2\hsize{\hss\ruledhbox{\rotate[location=normal]{\ruledhbox{\bfb 
(normal)%
%   \hbox to .2\hsize{\hss\ruledhbox{\rotate[location=high] 
{\ruledhbox{\bfb   (high)}

%\stoplinecorrection}

% \def\Test{\ruledhbox{%
% \def\DemoX{\vl\kern.5\emwidth\vl}%
% \kern\emwidth\ruledhpack{\green\rotate[rotation=20] 
{\ruledhpack{\DemoX}}}%
% \kern\emwidth\ruledhpack{\blue \rotate[rotation=0] 
{\ruledhpack{\DemoX}}}%
% \kern\emwidth\ruledhpack{\red  \rotate[rotation=-20] 
{\ruledhpack{\DemoX}}}%
% \kern\emwidth\ruledhpack{\green\rotate[rotation=200] 
{\ruledhpack{\DemoX}}}%
% \kern\emwidth\ruledhpack{\blue \rotate[rotation=180] 
{\ruledhpack{\DemoX}}}%
% \kern\emwidth\ruledhpack{\red 
\rotate[rotation=-200]{\ruledhpack{\DemoX}}}%

% \kern\emwidth}}

% \startTEXpage[offset=10pt,align=middle]
% \setuprotate[location=fit] \Test \par 
{\infofont\setstrut\strut fit} \par
% \setuprotate[location=depth]   \Test \par 
{\infofont\setstrut\strut depth}   \par
% \setuprotate[location=broad]   \Test \par 
{\infofont\setstrut\strut broad}   \par
% \setuprotate[location=high]\Test \par 
{\infofont\setstrut\strut high}\par
% \setuprotate[location=middle]  \Test \par 
{\infofont\setstrut\strut middle}  \par
% \setuprotate[location=default] \Test \par 
{\infofont\setstrut\strut default} \par

% \stopTEXpage

so, not a bug but a features (that code hasn't been touched for ages, 
apart from maybe some lmtx interface adaptation), and if it's not in the 
wiki .. you know what to do now


Hans

-
  Hans Hagen | PRAGMA ADE

Re: [NTG-context] some ConTeXt distribution's Fonts don't work

2021-10-22 Thread Hans Hagen via ntg-context

On 10/22/2021 6:30 AM, Luis Montgomery via ntg-context wrote:

See in

.../context/tex/texmf-context/tex/context/fonts/mkiv/

The names have chsnged... Ex. antykwa

For that reason

unknown library 'antykwatorunska'

Cheers,

Luis Montgomery



El jue., 21 de octubre de 2021 16:01, a badin via ntg-context 
mailto:ntg-context@ntg.nl>> escribió:


Hi all,
I suppose this is a bug or something unresolved, the following code
renders a pdf in LMRoman (lmserif) only:

\starttext
\startitemize[none]
\switchtobodyfont[antykwatorunska] \item font-test 123
\switchtobodyfont[kurier] \item font-test 123
\switchtobodyfont[almfixed] \item font-test 123
\switchtobodyfont[neoeuler] \item font-test 123
\switchtobodyfont[stixtwotext] \item font-test 123
\stopitemize
\stoptext

How to switch to these fonts? Could this be fixed by default? I'm on
ConTeXt  ver: 2021.10.21 19:57 LMTX.
I've tested all the fonts from
https://wiki.contextgarden.net/ConTeXt_distribution%27s_Fonts
<https://wiki.contextgarden.net/ConTeXt_distribution%27s_Fonts> and
these are the only one that do not work.

Kind regards and thanks for the great work on context, I just updated
and was able to run my previous code resulting in a slightly smaller
pdf, which I find great!
Andrej

also, some are ss or tt

\starttext
\startitemize[none]
\switchtobodyfont[antykwa] \item font-test 123
\switchtobodyfont[kurier,ss]   \item font-test 123
\switchtobodyfont[almfixed,tt] \item font-test 123
\switchtobodyfont[eulernova]   \item font-test 123
\switchtobodyfont[stixtwo] \item font-test 123
\stopitemize
\stoptext

best wikify this


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

2021-10-22 Thread Hans Hagen via ntg-context

On 10/21/2021 10:31 PM, Mikael Sundqvist via ntg-context wrote:


It works very nicely. I played with the test file you sent me, and I
find that in the .lfg file, the up parameter set to 0.06 instead of
0.1 looks better to me.
there are no ssty's for the quadruple prime in that font but if you need 
primes so badly you probably shouldn't use it anyway i guess (there are 
only super-textsize ssty variants for the 1/2/3 and their reverse)


anyway, as you desperately need these quads (why check otherwise), 
adding this to the lfg blob helps:


local four = characters[0x2057]
if four then
local one = characters[okay]
local owd = .75*one.width
local off = .6*one.height
four.width = 4*owd
four.commands = {
{ "offset", 0, off, okay },
{ "offset",   owd, off, okay },
{ "offset", 2*owd, off, okay },
{ "offset", 3*owd, off, okay },
}
else
-- we don't add (but we could), just patch, and there's no
-- reverse quad either
end

and no one will notice (unless you wikify al this)

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

2021-10-21 Thread Hans Hagen via ntg-context

Hi,

I cleaned up some more backend code.  There were some mails about dates 
and such and although the date field in setupinteraction works ok a more 
drastic overload is doen with directives. The reason is that the fact 
that we can set the date (and traler) is only because it permits 
generating pdf files that can be compared. No date as a bad idea anyway.


\setupinteraction[title=My Title]
% \enabledirectives[backend.date=2034-06-07]
\enabledirectives[backend.date=no]
\enabledirectives[backend.trailerid=no]
\starttext

\startTEXpage
\blackrule[height=1cm,depth=0cm,width=4cm,color=darkred]
\stopTEXpage

(there always were command line options for it)

More interesting is asome new experimental code:

\starttext

\dostepwiserecurse{40}{110}{2}{
\startTEXpage[offset=4mm,width=#1mm,align={stretch,normal,tolerant}]
\showmakeup[penalty]%
\orphanpenalties 4 4000 3000 2000 1000\relax
\updateparagraphpenalties
\samplefile{tufte}
\par
\stopTEXpage
}

\stoptext

it's an addendum to the widowpenalties and clubpenalties introduced by 
etex but this time it's horizontal; the orphan penalties will be 
inserted before spaces (aka spaceskip, xspaceskip and zerospaceskip 
glue) so in this case 4000 between the last two 'words' and this 
trickery can be used to make sure that the last line is not too short


\orphanpenalties 4 4000 3000 -12000 1000\relax

is also intereting

it's work in progress (i need to play more with it and figure out nice 
values for context) .. there might be more such 'simple' useful tricks


Mikael: you can test the math cheat (doesn't make the font nicer).
Pablo : transparencies should work again (wrong alias fixed).
Michal: you can check the dates (as for sure i messed up something).

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] transparency not working in current latest?

2021-10-21 Thread Hans Hagen via ntg-context

On 10/21/2021 6:28 PM, Pablo Rodriguez via ntg-context wrote:

Dear list,

since current latest (2021.10.18 23:14), I don’t get transparency working:

   \definecolor[transparent][b=1, a=1, t=0]

   \starttext
   \startTEXpage[offset=1em, align=middle]
   \color[transparent]{\ssbf totally\\transparent?}
   \stopTEXpage
   \stoptext

Am I missing something or is it a bug?

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
___


Re: [NTG-context] Indentation inside \framed won't go away

2021-10-21 Thread Hans Hagen via ntg-context

On 10/21/2021 10:32 AM, Ramkumar KB via ntg-context wrote:

Hello,

I have this nagging issue of indentation (in the 1st line) showing up 
inside \framed in spite of all the commands to skip indentation (see 
attached PDF).


It appears that *\setupindenting[no]* is not playing any role here and 
some other parameter is overriding  this.


Any tips would be appreciated.

best regards,
Ramkumar

\definepapersize[a4-portrait][A4][A4]
\setuppapersize[a4-portrait]
\setuplayout[topspace=10mm,backspace=15mm,header=50pt,footer=50pt,textwidth=165mm,height=middle,width=middle]

\starttext

\offset[x=\dimexpr11mm\relax,y=\dimexpr23mm\relax]
{\framed[frame=on,offset=none,align=flushleft]
{
% \startparagraph[align=high]
\setupindenting[no]
Chief Vitalstatistix\\
Getafix\\
Dogmatix\\
Asterix\\
Obelix\\
}
}
\stoptext

you get what you ask for: spaces

{\framed[frame=on,offset=none,align=flushleft]
{%
\setupindenting[no]%
Chief Vitalstatistix\\

or

\offset[x=11mm,y=23mm] \bgroup
\framed[frame=on,offset=none,align=flushleft] \bgroup
\setupindenting[no]%
Chief Vitalstatistix\\
Getafix\\
Dogmatix\\
Asterix\\
Obelix\\
\egroup
\egroup



-
  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] precedence of texmf trees

2021-10-20 Thread Hans Hagen via ntg-context

On 10/20/2021 4:21 PM, Henning Hraban Ramm via ntg-context wrote:



Am 20.10.2021 um 10:10 schrieb Hans Hagen :

On 10/19/2021 8:24 PM, Henning Hraban Ramm via ntg-context wrote:

Hi wizards,
if I have files with the same name in several texmf trees (e.g. texmf-context, 
texmf-local, texmf-project, ~/texmf or TeX Live’s texmf-dist, texmf-var), which 
one will be used?
I guess “local” trees or “local” directories take precedence over 
“distribution”, but which is “the localest” of ~/texmf/..., 
texmf-dist/.../local, texmf-local/... ?



context --generate


show all this


Where is the order defined? (Not in TDS.)

mtxrun --show-variables


Oh, yes, of course. Thank you!


etc ... it's all TDS


I meant, the order of trees is not defined in the TDS proposal 
(http://tug.org/tds/tds.html).
it's kind of defined by texlive but there it changed over time, (main, 
dist, local, var, home etc and also unix distributers add / patch these 
variables; some definitions and order can be hard coded in the binary 
part that deals with kpse file lookup)


anyway, in contest it hasn't changed much and we dont' use the kpse 
library in mkiv/lmtx so we're not affected by changes; you can of course 
add more of use a different order (in a local configuration file in e.g. 
texmf-local)


(there are plenty of trackers for checking how files are looked up)

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] Add ssty to libertinus

2021-10-20 Thread Hans Hagen via ntg-context

On 10/20/2021 1:01 PM, Mikael Sundqvist via ntg-context wrote:

Hi,

looking at the output of

\setupbodyfont[libertinus]
%\setupmathematics[stylealternative={ssty}]
\starttext
%\addff{ssty}
$y'=f'$
\switchtobodyfont[newcomputermodern-book]
$y'=f'$
\stoptext


ssty doesn't kick in as we're in textstyle here (and even then \addff 
doesn't work in math mode; ssty is applied when we load a font, if at 
all because not all characters in a math font have a ssty feature 
definition)



I think that the primes in libertinus are too small. Indeed, looking
in the font, they look like the output. In lualatex* I get larger
primes, and as far as I understand it is because unicode-math enables
ssty.


it's a design decision ... (imo the tex and math font community never 
could make up its mind about primes so it will always be a pain) .. 
looks like here the creator assumed a script design size for text size



I was not able to do so with \addff{ssty} or with
\setupmathematics[stylealternative={ssty}]. What do I miss?

Best regards, Mikael

*The file I used in lualatex was this:
\documentclass{article}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmathfont{LibertinusMath-Regular.otf}
\begin{document}
$u'f'$
\end{document}
whatever latex does to make these primes large is unlikely going to 
happen in context ... at some point, when these fonts stay as they are 
(all math fonts seem to have issues, but different ones) we can write 
font goodie files to 'fix them' at the font level, adding all kind of 
hacks to the context math handler is just stimulating 'not fixing a font'


\setupbodyfont[cambria]
\starttext
$y'=f'$
$\textstyle\prime$
$\scriptstyle\prime$
$\scriptscriptstyle\prime$
\switchtobodyfont[libertinus]
$y'=f'$
$\textstyle\prime$
$\scriptstyle\prime$
$\scriptscriptstyle\prime$
\switchtobodyfont[newcomputermodern-book]
$y'=f'$
$\textstyle\prime$
$\scriptstyle\prime$
$\scriptscriptstyle\prime$
\stoptext

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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] setting date in \setupinteraction

2021-10-20 Thread Hans Hagen via ntg-context

On 10/19/2021 10:38 PM, Michal Vlasák via ntg-context wrote:


I don't know how official these interfaces are. But you can try adapting
the following to your use case.

 \setupinteraction[state=start]
 
 %\luacode{lpdf.settime("2020-02-02 12:00")}

 %\luacode{lpdf.settime(1580641221)}
 
 \startluacode
 
 local Y, M, D, h, m, s, Zs, Zh, Zm = string.match("D:20200202120021+02'00'", "^D:(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)([%+%-])(%d%d)%'(%d%d)%'$")
 
 local time = os.time{year=Y,month=M,day=D,hour=h,min=m,sec=s}

 lpdf.settime(time)
 \stopluacode
 
 \starttext

 This document is from 02.02.2020 at 12:00:21.
 \stoptext

The pattern doesn't catch all the PDF spec cases, but should match what
ConTeXt emits. The timezone info gets overwritten by current timezone
though.

Requires the below patch.

Michal

--- a/tex/context/base/mkiv/core-con.lua
+++ b/tex/context/base/mkiv/core-con.lua
@@ -1991,7 +1991,7 @@ function converters.totime(s)
  end
  local n = tonumber(s)
  if n and n >= 0 then
-return date("*t",n)
+return osdate("*t",n)
  end
  end
  
diff --git a/tex/context/base/mkxl/lpdf-ini.lmt b/tex/context/base/mkxl/lpdf-ini.lmt

index 7979b80..9703ac0 100644
--- a/tex/context/base/mkxl/lpdf-ini.lmt
+++ b/tex/context/base/mkxl/lpdf-ini.lmt
@@ -1123,7 +1123,7 @@ do
  n = converters.totime(n)
  if n then
  converters.settime(n)
-timestamp = osdate("%Y-%m-%dT%X") .. ostimezone(true) -- 
probably not ok
+timestamp = osdate("%Y-%m-%dT%X", ostime(n)) .. 
ostimezone(true) -- probably not ok
  end
  end
  if metadata then

i'll fix it but also clean up the existing code a bit

(much has to do with omitting date and is for comparison reasons)

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] marginals from footnotes

2021-10-20 Thread Hans Hagen via ntg-context

On 10/19/2021 7:16 PM, Henning Hraban Ramm via ntg-context wrote:

Hi, this is an edge case, but I tried to replicate a feature from DANTE’s LaTeX 
DTK style where links in the text (and also in footnotes) get a QR code in the 
margin.

It works for me (using zint) in the running text, but not in footnotes. 
Actually, marginals in footnotes are never displayed. Maybe I shouldn’t expect 
it to work, but I’d like to have this... Is it possible?


you should know by now that in tex 'all is possible' somehow


\starttext

\samplefile{tufte}\inmargin{margin note}
bla\footnote{footnote\inmargin{margin note from footnote}} bla

\stoptext

\starttext
\samplefile{tufte}\inmargin{margin note}
bla\footnote{footnote\inmargin[scope=local]{margin note from 
footnote}} bla

\stoptext

(note content is not part of the page flow)

-
  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] precedence of texmf trees

2021-10-20 Thread Hans Hagen via ntg-context

On 10/19/2021 8:24 PM, Henning Hraban Ramm via ntg-context wrote:

Hi wizards,

if I have files with the same name in several texmf trees (e.g. texmf-context, 
texmf-local, texmf-project, ~/texmf or TeX Live’s texmf-dist, texmf-var), which 
one will be used?

I guess “local” trees or “local” directories take precedence over 
“distribution”, but which is “the localest” of ~/texmf/..., 
texmf-dist/.../local, texmf-local/... ?


> context --generate

show all this


Where is the order defined? (Not in TDS.)

mtxrun --show-variables

mtxrun -var-value TEXMF

etc ... it's all TDS

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

2021-10-20 Thread Hans Hagen via ntg-context

On 10/19/2021 8:43 AM, Axel Kielhorn via ntg-context wrote:




Am 18.10.2021 um 23:17 schrieb Hans Hagen via ntg-context :

Hi,

I uploaded a new lmtx. This one is a little experimental because I removed so 
redundant / intermediate code still present from teh transition from mkiv to 
lmtx (mostly backend related). I might have missed something (not all is in the 
test suite) but nothing that can't be fixed easy, most has to do with the 
timing of definitions.

But I assume users save their stable trees anyway …


Of course we do, especially after Hraban recommended the 2021-10-10 tree last 
week.

Just one question:

LMTX comes with an empty texmf-modules tree.
Are we still supposed to copy the context version?

There have been updates to letter, filter and some others lately.
That means we have to update the context tree as well.

Do you plan to include this tree in the future?


at some point yes, but then we can also sync from the garden server (on 
the todo list)

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

2021-10-18 Thread Hans Hagen via ntg-context

Hi,

I uploaded a new lmtx. This one is a little experimental because I 
removed so redundant / intermediate code still present from teh 
transition from mkiv to lmtx (mostly backend related). I might have 
missed something (not all is in the test suite) but nothing that can't 
be fixed easy, most has to do with the timing of definitions.


But I assume users save their stable trees anyway ...

(rpi bins should be in sync too.)

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] SVG not rendering correctly with LMTX and conversion=mp

2021-10-18 Thread Hans Hagen via ntg-context

On 10/18/2021 5:15 PM, Jason Ross via ntg-context wrote:

The following MWE fails to render the text in the attached SVG properly:


\starttext
\externalfigure[test.svg][conversion=mp]
\stoptext


The axis labels, tick labels, and title are all incorrect. This file was
generated with Matplotlib.
we actually can avoid that by using label remapping (i fixed a scanning 
buglet in the first example:)


\startTEXpage
\startMPcode
lmt_remaptext [ label = "here 1", where = "l", text = "\bfa 
let's try this one out" ] ;
lmt_remaptext [ label = "here 2", where = "r", text = 
"let's try this one out too" ] ;
lmt_remaptext [ label = "here 3", where = "l", text = "$e = 
mc^2$" ] ;
lmt_remaptext [ label = "here 5", where = "m", text = "this 
a bit longer label" ] ;
lmt_remaptext [ label = "here 4", where = "m", text = "!", 
dx = -1pt, dy = -30pt ] ;

draw lmt_svg [
filename  = "labels-003.svg",
] ;
\stopMPcode
\stopTEXpage

one can also have the labels externally

\startluacode
table.save ( "labels-001.lua", {
{ label = "here 1", where = "l", text = "let's try this one out" },
{ label = "here 2", where = "r", text = "let's try this one out 
too" },

{ label = "here 3", where = "l", text = "$e = mc^2$" },
{ label = "here 5", where = "m", text = "this a bit longer 
label" },

{ label = "here 4", where = "m", text = "!" },
} )
\stopluacode

\startMPpage
draw lmt_svg [
filename  = "labels-003.svg",
labelfile = "labels-001.lua",
] ;
\stopMPpage

the idea is then that in an svg editor one uses symbolic names and when 
including those get property typeset


(should work in in next upload; is independent of reported issue)

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] SVG not rendering correctly with LMTX and conversion=mp

2021-10-18 Thread Hans Hagen via ntg-context

On 10/18/2021 6:06 PM, mf via ntg-context wrote:

Il 18/10/21 17:15, Jason Ross via ntg-context ha scritto:

The following MWE fails to render the text in the attached SVG properly:


\starttext
\externalfigure[test.svg][conversion=mp]
\stoptext


The axis labels, tick labels, and title are all incorrect. This file was
generated with Matplotlib.



If you open test.svg with Inkscape, ungroup and then save, you get a SVG 
that is typeset right with LMTX.


Looking at the differences between the two SVGs, I can see that Inkscape 
changes all the transform="translate(...)scale(...)" attributes into 
transform="matrix(...)".


Now focus on the "y = sin(x)" text.
In the attachment I modified the transform attributes of that text, from 
"translate(...)scale(...)" to "matrix(...)", taking the values from the 
version obtained from Inkscape.


Use that SVG with your MWE and you'll see "y = sin(x)" appearing in the 
right place in the PDF.


I would say the "translate(...)scale(...)" specification is not 
supported in LMTX (yet).

does the spec say anywhere what teh order is?




this looks better but




how about 10 scales and 15 rotations and 3 transforms in any order?

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] SVG not rendering correctly with LMTX and conversion=mp

2021-10-18 Thread Hans Hagen via ntg-context

On 10/18/2021 6:06 PM, mf via ntg-context wrote:

Il 18/10/21 17:15, Jason Ross via ntg-context ha scritto:

The following MWE fails to render the text in the attached SVG properly:


\starttext
\externalfigure[test.svg][conversion=mp]
\stoptext


The axis labels, tick labels, and title are all incorrect. This file was
generated with Matplotlib.



If you open test.svg with Inkscape, ungroup and then save, you get a SVG 
that is typeset right with LMTX.


Looking at the differences between the two SVGs, I can see that Inkscape 
changes all the transform="translate(...)scale(...)" attributes into 
transform="matrix(...)".


Now focus on the "y = sin(x)" text.
In the attachment I modified the transform attributes of that text, from 
"translate(...)scale(...)" to "matrix(...)", taking the values from the 
version obtained from Inkscape.


Use that SVG with your MWE and you'll see "y = sin(x)" appearing in the 
right place in the PDF.


I would say the "translate(...)scale(...)" specification is not 
supported in LMTX (yet).
it is supported; i'll send you a snippet to test (as it was not really a 
minimal example)


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] Compilation error with the new version of lmtx

2021-10-17 Thread Hans Hagen via ntg-context

On 10/16/2021 7:34 PM, Fabrice Couvreur via ntg-context wrote:

Hi,
The latest version of lmtx does not allow me to compile the following 
file although there was no problem before.

Thank you
Fabrice

\startproduct[expertes-manual]

   \startfrontmatter

     \setuppagenumbering
        [location=]

     \definefont
       [ChapterTextStyle]
       [SansBold*default sa 2.2]

     \setuphead
       [title]
       [style=ChapterTextStyle,
        align=flushright]

     \setuplist
        [chapter]
        [style=bold,
         alternative=b,
         width=1em]

     \setuplist
        [section]
        [margin=1em,
         width=1.75em]

     \setuplist
        [subsection]
        [margin=2.75em,
         width=2em,
         distance=\spaceamount]


     \starttitle[title=Table des matières]

          \placelist
            [chapter,section,subsection]
            [criterium=all,
            interaction=all,
             alternative=c]

       \stoptitle

     \stopfrontmatter

     \startbodymatter
         \component[chapter_1]
         \component[chapter_2]
     \stopbodymatter


\stopproduct

##
tex error       > tex error on line 1 in file ./expertes.tex: Undefined 
control sequence \undefined


i need a better example

-
      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] Reading ConTeXt metadata values into Lua

2021-10-16 Thread Hans Hagen via ntg-context

On 10/16/2021 10:33 AM, Wolfgang Schuster via ntg-context wrote:

Ramkumar KB via ntg-context schrieb am 16.10.2021 um 06:00:

Hello All,

I was trying to read the value of '\totalnumberofpages' into lua to do 
something with it. As an example, see below.


Now, as I understand it, my example would not work as TeX gets the 
first go at this and therefore the variable 'pages' is the string 
'\totalnumberofpages' and not the actual value itself. And Lua cannot 
process this "calculation".


I tried to go thru the manual - *cld-mkiv.pdf *- in the distro but 
could not catch on how to read a metadata value (not print). I am sure 
that I am missing a small trick somewhere (or is it something more 
involved?).


\startluacode
function myFancyCalculations(pages)
  -- some fancy stuff but as an example
local myCal = tonumber(pages) + 1
return myCal
\stopluacode
\starttext

\blah

\ctxlua{context(myFancyCalculations("\\totalnumberofpages"))}

\stoptext


Everything gets easier when you use the Lua functions to access the 
counter values but be aware the values can be wrong when you're at a 
page break.


\startbuffer[pagenumber]
\startluacode
context.starttabulate()
     context.NC()
     context("Current page")
     context.EQ()
     context(structures.counters.get("realpage",1,"number"))
     context.NC()
     context.NR()
     context.NC()
     context("Last page")
     context.EQ()
     context(structures.counters.get("realpage",1,"last"))
     context.NC()
     context.NR()
context.stoptabulate()
\stopluacode
\stopbuffer

\starttext

\dorecurse
     {\randomnumber{5}{10}}
     {\getbuffer[pagenumber]
  \page}

\stoptext


As addendum ... The problem in general with macros is that one doesn't 
really knows by looking at the name what actually happens when it 
expands, which can be a lot. Now, because \totalnumberofpages is 
supposed to 'return' a number and not typeset something styled (which 
itself involved macro expansion) you can actually do this:


\startluacode
local n = tokens.getters.macro("totalnumberofpages",true)
print(">>>",type(n),n)
\stopluacode

but beware of the fact that you actually get back a string:

\startluacode
local n = tokens.getters.macro("totalnumberofpages",true)
print(">>>",type(n),n)
local n = tonumber(n)
print(">>>",type(n),n)
\stopluacode

etc etc

Hans

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

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


Re: [NTG-context] new upload

2021-10-14 Thread Hans Hagen via ntg-context

On 10/13/2021 10:37 PM, jbf via ntg-context wrote:
In fact, Hans, that was going to be my comment after updating yesterday 
to the 10-10-21 version: some of the breaks were a bit overdone. Are 
these changes you indicate as tests actually included in the latest 
upload, or should I wait a bit?
they are in there; but i still need to check multiple notes and spacing 
before the first (we have some trickery in mkiv and lmtx but maybe i can 
still make that better / more reliable in lmtx/luametatex)


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] Error: attempt to index a nil value

2021-10-13 Thread Hans Hagen via ntg-context

On 10/13/2021 6:54 PM, Hans Åberg wrote:



On 13 Oct 2021, at 18:37, Hans Hagen  wrote:

On 10/13/2021 6:01 PM, Hans Åberg via ntg-context wrote:

I was suggested a long ago to hack the file
  /usr/local/texlive/2021/texmf-dist/tex/generic/context/luatex/luatex-math.tex
and use LuaTeX directly, now using Version 1.13.2 (TeX Live 2021), but I get 
this error:
(./luaotfload.sty
(/usr/local/texlive/2021/texmf-dist/tex/latex/base/ltluatex.tex))
(./luatex-math-modified.tex[\directlua]:1: attempt to index a nil value (global
'arguments')
stack traceback:
[\directlua]:1: in main chunk.
l.132 }
? …
It is from this segment in the modified luatex-math.tex:
\ifdefined\directlua
\directlua {
if arguments["mtx:lucidabright"] then
tex.print("\string\\lucidabright")
else
tex.print("\string\\latinmodern")
end
}
\fi
Is there a workaround? —I may ditch this setup in favour of using 'context' 
directly, so it is not so important if there is no fix.

I have no clue ..


Has not stuff been moved from LuaTeX to ConTeXt? —If so, I thought it might 
have something with that to do.


luatex is just a tex engine and context is a macro package where context 
mkiv is geared for luatex; the context fontloader has a generic core so 
it can be used in plain and for latex some write a wrapper around that 
font hndler for latex that evolved over years


i have no clue why you get "(./luaotfload.sty ..." but it is not context 
that you run there (and i can't imagine some plain format loading it 
either)



it looks like you load a latex style so I suppose that 'arguments' is no longer 
defined there (as it worked for you in the past).


It does not contain it; it a copy in the same directory that has never changed.


hm, but i have no clue what this "mtx:..." does


Maybe 'arguments' lives in some namespace?

\directlua {for k, v in pairs(_G) do print(k,v) end}

This will show you what is in the global namespace, maybe 'arg'?


If I put this code in right before the \ifdefined\directlua it prints a lot of 
"nil".


print(k,v) should print two values, key and value

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] Error: attempt to index a nil value

2021-10-13 Thread Hans Hagen via ntg-context

On 10/13/2021 7:02 PM, Hans Åberg wrote:



On 13 Oct 2021, at 18:37, Hans Hagen  wrote:

On 10/13/2021 6:01 PM, Hans Åberg via ntg-context wrote:


… —I may ditch this setup in favour of using 'context' directly, so it is not 
so important if there is no fix.

I have no clue ..


I made this as experiment to make a texinfo file along with a manual generating 
a PDF to display math properly, which the Info format cannot do.


I'm not familiar with texinfo but in the context distribution are some 
luatex-* files that show how to load the generic context font loader (in 
plain tex). One can make a format with:


  mtxrun --script plain --make

an dprocess a plain file with:

  mtxrun --script plain foo.tex

I suppose that texinfo is close to plain so doable too.


However, it has been decided that the Info format should be extended with HTML, 
probably HTML5 then. So one might generate that directly with ConTeXt. —This 
was the reason for the other post.

ok

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] Error: attempt to index a nil value

2021-10-13 Thread Hans Hagen via ntg-context

On 10/13/2021 6:01 PM, Hans Åberg via ntg-context wrote:

I was suggested a long ago to hack the file
  /usr/local/texlive/2021/texmf-dist/tex/generic/context/luatex/luatex-math.tex
and use LuaTeX directly, now using Version 1.13.2 (TeX Live 2021), but I get 
this error:
(./luaotfload.sty
(/usr/local/texlive/2021/texmf-dist/tex/latex/base/ltluatex.tex))
(./luatex-math-modified.tex[\directlua]:1: attempt to index a nil value (global
'arguments')
stack traceback:
[\directlua]:1: in main chunk.
l.132 }

? …


It is from this segment in the modified luatex-math.tex:

\ifdefined\directlua
\directlua {
if arguments["mtx:lucidabright"] then
tex.print("\string\\lucidabright")
else
tex.print("\string\\latinmodern")
end
}
\fi

Is there a workaround? —I may ditch this setup in favour of using 'context' 
directly, so it is not so important if there is no fix.
I have no clue .. it looks like you load a latex style so I suppose that 
'arguments' is no longer defined there (as it worked for you in the 
past). Maybe 'arguments' lives in some namespace?


 \directlua {for k, v in pairs(_G) do print(k.v) end}

This will show you what is in the global namespace, maybe 'arg'?

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

2021-10-13 Thread Hans Hagen via ntg-context

Hi,

This midweek upload has something new. There has been some discussion 
about footnotes and one thing I noticed when playing with some new 
possibilities is that the stretch in topskip (we use a default amount 
that long ago was derived from plain tex and is relative to the body 
font size) influences the pagebreaks in relation to inserts (footnotes) 
in a more significant way than one would expect.


I also noticed that this stretch component is one of the reasons why 
sometimes a side float shape will carry over to a next page in spite of 
there being room. This relates to \brokenpenalty.


At the end of this mail are some tests that demonstrate this. As a 
consequence we now have a "ntop" parameter as well as a shaping related 
penalty primitives (parameters):


  \shapingpenaltiesmode"FF% set all (future) bits (currently 4)
  \shapingpenalty\plushundred % don't go too high

which is currently not enabled by default but might be in upcoming 
versions; this also depends on user feedback. It's a non intrusive 
extension the LuaMetaTeX engine. I have this setting in my local 
preferences file.


Hans


% test code (for Massimiliano and Hraban to play with)

\starttext

\showframe

% this is the current default behaviour; we have a topskip with
% quite some stretch and that stretch is taken into account
% when tex calculates the badness; watch the next page

\dorecurse{4}{
\bgroup
\shapingpenaltiesmode\zerocount
\showmakeup[penalty]
\placefigure[left]{}{}
\input tufte \par
\egroup
}

\page EMPTY \page

% the ntop is new and when >= 0 it is a multiplier for the number
% of lines stretch, here we have one line; watch the next page

\dorecurse{4}{
\bgroup
\shapingpenaltiesmode\zerocount
\setupinterlinespace[ntop=1]
\showmakeup[penalty]
\placefigure[left]{}{}
\input tufte \par
\egroup
}

\page EMPTY \page

% these shaping parameters will discourage a linebreak within a
% shape; the placement macro checked available space but that
% doesn't mean that there can be no linebreak

\dorecurse{4}{
\bgroup
\showmakeup[penalty]
\shapingpenaltiesmode"FF\relax
\shapingpenalty\plushundred
\placefigure[left]{}{}
\input tufte \par
\egroup
}

\page EMPTY \page

% the next pages show the effect of changed topskip on page breaks
% with footnotes

\dorecurse{10}{
[#1] \input tufte \footnote{\input{tufte}} \par
}

\page EMPTY \page

\setupinterlinespace[ntop=2]

\dorecurse{10}{
[#1] \input tufte \footnote{\input{tufte}} \par
}

\page EMPTY \page

\setupinterlinespace[ntop=0]

\dorecurse{10}{
[#1] \input tufte \footnote{\input{tufte}} \par
}

\stoptext


-
      Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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] hyphenation

2021-10-13 Thread Hans Hagen via ntg-context

Hi,

Here is a nice trick to show all possible (within the constraints of 
fonts and languages) hyphenations in a paragraoh:


\bgroup
\setupalign[flushright]
\hyphenpenalty-10
\input tufte
\par % force hyphenation
\egroup

This one does the same for last lines on a page with a hyphen:

\bgroup
  % \interlinepenalty1
\brokenpenalty-1
\input tufte
\egroup

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] Bloody PDF boxes and cr*p marks!

2021-10-12 Thread Hans Hagen via ntg-context

On 10/12/2021 6:18 PM, Henning Hraban Ramm via ntg-context wrote:



Am 12.10.2021 um 13:15 schrieb Hans Hagen :

On 10/12/2021 12:36 PM, Henning Hraban Ramm via ntg-context wrote:

Comrades!
There must have been a time when PDF boxes (i.e. CropBox, TrimBox, BleedBox) 
worked as they should, but it must have been a short time.


I long ago lost track of what all that means ... decades of pdf ... different 
viewers, different interpretations ... validators complaining about things 
missing ... i guess that bit (like annotations) will always be in flux (also 
because specs came before implementations i guess).


Hm, you implemented these boxes only in 2015, there was not much change in that 
regard since then.


Way earlier but it wasn't enabled ... (I'm not going to check ancient 
tex live dvd's).


addtopageattributes("CropBox",box) -- mandate for rendering
addtopageattributes("TrimBox",box) -- mandate for pdf/x
 -- addtopageattributes("BleedBox",box)
 -- addtopageattributes("ArtBox",box)

I remember discussing it with (I think) Pablo and it definityely came up 
when we were dealing with these 'standards'.



* BleedBox must be TrimBox plus bleed.


a relative new one, probably also sensitive for interpretation by renderer, imo 
worthless


Not worthless; workflow systems in printshops rely on BleedBox and TrimBox. 
It’s not about rendering, but imposition and even postprocessing (cutting etc.).


* ArtBox is neglectable for whole layouts (same as TrimBox might make sense), 
just interesting in \externalfigure.


also worthless


I agree.


With
\setuppaper[A4][A4,oversized]
I’d expect ConTeXt to set...
* MediaBox and CropBox to the bigger format
* TrimBox to the page format (A4)
* BleedBox also to the page format, while no bleed is defined


well, that's an assumption ... who knows what a printer (driver) does ...


Who sends PDF files directly to a printer (driver)? I know it only from 
automated, professional workflows.
Usually printer drivers gets fed by PDF viewers, and I know none that even 
*can* print something different than CropBox.


afaik some printers accept pdf (hard to check) but I the fact that a 
viewer does something doesn't mean it did years ago (just like at how 
crippled tounicode has been / is supported over time)



Beware, \setupbleeding refers only to stretching of images (\externalfigure)!


fwiw, that bleeding options is mostly there to communicate with mp


Good to know. I just browsed the Details manual, didn’t try it yet, since I 
scale and move my “bleeding” images differently.


i actually need to pick up that bit ... (some code in my local styles i 
need to check) because it can be handy for cover pages (but then i also 
need to check if i don't break something



* to define trimoffset, I must know the difference between paper size and sheet size 
("oversized" adds 15 mm).


oversized is a convenience feature, in prepress one would define a real, target 
size, not rely on a convenience value


But it’s convenient ;) I usually just need a format that is big enough for the 
crop marks, and “oversized” does that.


sure, i use it too


% ... and no dependency on interactionscreen!


that's a historic fact ... special pdf features triggered by that command .. 
basically tex only has a page size


Of course, but it doesn’t make sense any more, and defining the boxes wouldn’t 
hurt anyone. (I’m quite sure, but let them beat me ;))


maybe, but it's also a bit about otr/backend timing, so i need to sit 
down on it



Yes, that would mean a backward incompatible change. But how many of us rely on 
the strange current behavior?
Please let us fix this!


the problem is as usual documentation and indeed we can have some backward 
compatibility issue here ... i honestly have no clue how viewers and printers 
react (so if something would be added/changed it would be option driven)


I wouldn’t expect printers (office printing devices) to react at all; I hope 
that printers (printshop workers) will react positively to correct boxes in our 
PDFs ;)


oh, i'm often surprised about printing houses .. (the best were some 
comment on a file having rgb bitmaps while it actually had cmyk outlines 
and validators/fixers inlining xforms while setting lines to 0pt widths) 
.. and some still use acrobat 4 -)



In some cases it makes sense to have different values on e.g. inner and outer 
edges; I feat that would add a plethora of additional parameters 
(leftbleedoffset, innerbleedoffset...).
Maybe give a list like in CSS? bleedoffset={3mm,3mm,3mm,0mm} – top, right, 
bottom, left order implied; not very “ConTeXt style”.

probably spreads need some treatment (imposition)


Multiple pages on a sheet are not considered by the PDF specs.


yes but what of context imposes


(i'm pretty sure that changes will themselves introduce new issues)


Probable.


anyway, we can look at it once we're all on lmtx because i'm not going to 
change mkiv i

Re: [NTG-context] combination with lua

2021-10-12 Thread Hans Hagen via ntg-context

On 10/11/2021 1:38 PM, Adam Reviczky via ntg-context wrote:

Hi,

I am trying to use a combination figure with luacode (both with latest 
MKIV and LMTX).

However, the figures do not line up in the grid of the combination.

I get the correct result with examples 1 and 2 below, but example 3 
using lua functions for combination and externalfigure is what I wanted 
to use in the first place.


MWE:

\starttext

\startluacode

-- Combination 1
context.startplacefigure({title = "Figure"})
context.startcombination({nx = "2", ny = "2"},

"\\externalfigure[cow][width=50mm]","Caption 1",
"\\externalfigure[cow][width=50mm]","Caption 2",
"\\externalfigure[cow][width=50mm]","Caption 3",
"\\externalfigure[cow][width=50mm]","Caption 4"
)

context.stopcombination()
context.stopplacefigure()

-- Combination 2

context.startplacefigure({title = "Figure"})
context.startcombination({nx = "2", ny = "2"},

"Picture 1","Caption 1",
"Picture 2","Caption 2",
"Picture 3","Caption 3",
"Picture 4","Caption 4"
)

context.stopcombination()
context.stopplacefigure()

-- Combination 3

context.startplacefigure({title = "Figure"})
context.startcombination({nx = "2", ny = "2"},

context.externalfigure({"cow"},{width = "50mm"}),"Caption 1",
context.externalfigure({"cow"},{width = "50mm"}),"Caption 2",
context.externalfigure({"cow"},{width = "50mm"}),"Caption 3",
context.externalfigure({"cow"},{width = "50mm"}),"Caption 4"
)

context.stopcombination()
context.stopplacefigure()

\stopluacode
\stoptext

Any hints on what I am doing wrong in example 3?
as in any prodedural language a function as argument gets immediately 
executed so you need to delay:


context.startplacefigure({title = "Figure"})
context.startcombination({nx = "2", ny = "2"},
context.delayed.externalfigure({"cow"},{width = "50mm"}), 
"Caption 1",
context.delayed.externalfigure({"cow"},{width = "50mm"}), 
"Caption 2",
context.delayed.externalfigure({"cow"},{width = "50mm"}), 
"Caption 3",
context.delayed.externalfigure({"cow"},{width = "50mm"}), 
"Caption 4"

)
context.stopcombination()
context.stopplacefigure()

(this is why encoding complex documents completely in a scrtipt language 
is non trivial and why for instance these template systems are there 
because these accumulate)


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] body text and footnote space

2021-10-12 Thread Hans Hagen via ntg-context

On 10/12/2021 3:09 AM, jbf via ntg-context wrote:

Dear list,

I note previous discussions on the matter of body text invading footnote 
space (as late as last year). As I am currently typesetting a 400 plus 
page academic text with hundreds of footnotes, and do not have the 
option of making them endnotes, I am facing this issue page after page. 
The only solution I have for now is to make per page layout adjustments 
to reduce a line or two, so there is a way to handle it, but given 
ConTeXt's 'perfection' generally, I would be very interested to know if 
there is any other solution forthcoming. I've tried various options in 
\setupfootnotes and \setuptolerance', but to no avail.

Is this still the case in the latest version?

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] TeX's \downbracefill and \upbracefill

2021-10-12 Thread Hans Hagen via ntg-context

On 10/12/2021 7:47 AM, Rudolf Bahr via ntg-context wrote:



Hello to all,

in Knuth's "The TeXbook" page 225/226 (excerpt is appended here) braces
are to be seen which I'd need to typeset a genealogical table.

Now, the commands \downbracefill and \upbracefill are no context commands.
Please, are there correspondings to them?

 $\overbrace{\hbox{}}$

 \mathematics{\overbrace{\hbox{}}}


-
  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] Bloody PDF boxes and cr*p marks!

2021-10-12 Thread Hans Hagen via ntg-context
l on lmtx because i'm not going 
to change mkiv in that aspect


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] undefined command in current latest

2021-10-11 Thread Hans Hagen via ntg-context

On 10/11/2021 11:33 AM, mf via ntg-context wrote:
It looks like the argument of \getmarking is not expanded, since you get 
"\it knuth" instead of an italicized "knuth" in the headers of this MWE:


\definemarking[myheader]
\setupheadertexts[{\getmarking[myheader][last]}]
\starttext
   \dorecurse{10}{\samplefile{knuth}\marking[myheader]{\it knuth}\par}
\stoptext

we switched to the new marking code; i'll sent you a file to test

fyi: in mkii/mkiv we had to work around limitations of mark 
synchronization and in mkiv that went even further; in lmtx we can use 
some new engine features so the whole lot could be simplified, which 
should also perfoem a little better; it means that mark content follows 
a bit different route


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] Making metafun pictures fainter (shading, uncolored clash)

2021-10-11 Thread Hans Hagen via ntg-context

On 10/11/2021 6:30 AM, Gavin via ntg-context wrote:

Hi List,

I made good progress producing fainter pictures in metafun. Here is a uniformly 
accelerated cow in the style of my book.




I abandoned transparency, since I actually don’t want to see through anything. 
I am using uncolored to get the fade. It works great with a picture that is 
made with fill and draw, but it doesn’t work with shading. The example below 
has a flat disk and a round ball. The disk looks fine, but the shaded ball is 
not surviving the application of inverted / uncolored.


\startMPinclusions
   picture disk, ball;
   disk := image(
 fill fullcircle scaled 1cm withcolor .4white;
 draw fullcircle scaled 1cm withpen pencircle scaled 0.8pt ;);
   ball := image(
 fill fullcircle scaled 1cm
   withshademethod "circular"
   withshadecenter (.25,.25)
   withshadecolors (.8white, black);
 draw fullcircle scaled 1cm withpen pencircle scaled 0.8pt ;);
\stopMPinclusions

\startMPpage
draw inverted (disk uncolored .1white) ;
draw inverted (disk uncolored .2white) shifted (0.25cm,0) ;
draw inverted (disk uncolored .5white) shifted (1cm,0) ;
draw disk shifted (2.25cm,0) ;

draw inverted (ball uncolored .1white) shifted (0, -2cm) ;
draw inverted (ball uncolored .2white) shifted (0.25cm, -2cm) ;
draw inverted (ball uncolored .5white) shifted (1cm, -2cm) ;
draw ball shifted (2.25cm, -2cm) ;
\stopMPpage




Same result in LMTX and MkIV. (ConTeXt  ver: 2021.09.17 10:01 LMTX  fmt: 
2021.9.21  int: english/english)

I’m pretty happy with this uncolored trick, and will be even happier if I can 
get it to work with the shadings.

Any suggestions?

\startMPpage
fill fullcircle scaled 10cm
shifted (3cm,0)
withcolor white ;
fill fullcircle scaled 10cm
shifted (3cm,0)
withcolor black
withtransparency (1,.25) ;

fill fullcircle scaled 5cm
shifted (3cm,0)
withcolor .25[red,white] ;
\stopMPpage


-
  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] ConTeXt's equivalent of raisebox

2021-10-11 Thread Hans Hagen via ntg-context

On 10/11/2021 12:16 AM, noib3 via ntg-context wrote:
How can I make vertical microadjustments to individual characters in 
ConTeXt?


In LaTeX I would do it with

```
\documentclass{article}
\begin{document}
\raisebox{-1pt}{f}oo
\end{document}
```

however the following doesn't work

```
\starttext
\raisebox{-1pt}{f}oo
\stoptext

depends on if you want to keep kerning and ligature building etc

\starttext

xx\glyph yoffset 1pt `f\relax oo

xx\glyph yoffset 1pt `f\relax \glyph yoffset -1pt `o\relax \glyph 
yoffset 2pt `o\relax


xx\glyph yoffset 1pt `f\relax fi

\dontleavehmode\offset[y=-1pt]{f}oo

\stoptext


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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] SyncTeX does not work with Zathura

2021-10-10 Thread Hans Hagen via ntg-context

On 10/10/2021 7:20 PM, Cezary Drożak wrote:

 > you can play with
 >
 > mtxrun --script synctex
 >
 > and the synctex file to see if it makes sense
I wrote two almost identical files in plain tex and context. When I 
generated the synctex file and ran `mtxrun --script synctex --list 
x.synctex` I got this:


```
$ mtxrun --script synctex --list context.synctex
mtx-synctex | begin page: 1
mtx-synctex | end page: 1

$ mtxrun --script synctex --list tex.synctex
mtx-synctex | begin page: 1
mtx-synctex |   [  72   82   92   82] : 1 : 
/home/nawordar/tests/tex/hello/./tex.tex

mtx-synctex | end page: 1
```

It looks like context generates an incomplete synctext file.


I can't say ... what is missing? Can you figure out what makes Zathura 
unhappy?


The context synctex files are definitely less verbose because (1) we 
avoid clutter, (2) omit auto-generated content like pagenumbers and so, 
(3) collapse ranges (which we can do because we know what we're dealing 
with), (4) don't compress (because it makes no sense), (5) ignore 
styles, (6) also handle xml, etc. There have been some changes between 
synctex 1 and 2 but I don['t keep track of that. Actually, if a 'call 
some command' approach would have been chosen we could have better 
readable files (in our case lua or so).


 > one problem with synctex is that the editors depend on a library and 
there has been changes

 >
 > texshop now uses the more independent method for context i.e. just 
calling "mtxrun --script synctex ..." which not only removes the 
dependency of a library (the dependency on mtxrun is ok as one has 
context anyway) but also permits room for improvement (apart from not 
being tricked by latex specific heuristics in the library)


But that would need a change in Zathura wouldn't it?


sure, so unlikely to happen soon (i have no influence on that)

(but it would have been a better approach anyway, not being dependent on 
libraries that that depend on specific synctex versions in tex as well 
as heuristics; basically now one needs a version of the editor/viewer 
that matches a tex engine); one doesn't hard code a pdf viewer in an 
editor either (btw, the script approach permits two way sync, so in 
texshop one can go from pdf to source and source to pdf)


here with

\starttext
Hello, world!
\stoptext

i get

SyncTeX Version:1
Input:1:oeps.tex
Output:pdf
Magnification:1000
Unit:1
X Offset:0
Y Offset:0
Content:
!103
{1
[0,0:0,0:0,0,0
v0,0:0,55380990:39158276,55380990,0
h1,6:4661756,9176901:4275840,655360,327680
]
!104
}1
!8
Postamble:
Count:3
!22
Post scriptum:

(also with context --synctex oeps)

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] SyncTeX does not work with Zathura

2021-10-10 Thread Hans Hagen via ntg-context

On 10/10/2021 6:11 PM, Cezary Drożak via ntg-context wrote:

Hello,
I have been trying to get SyncTeX to work with ConTeXt and Zathura, but 
nothing

seems to work.

I created a simple `hello.mklx` file and ran `context --synctex=-1 
hello.mklx`.
Then I launched Zathura with `zathura -x "nvr -cc \"call 
vimtex#view#reverse_goto(%{line}, '%{input}')\" --nostart" hello.pdf`.

When I clicked "Hello, world!" while holding a control key it printed the
following error to console:

```
(org.pwmt.zathura:80241): GLib-CRITICAL **: 15:49:12.359: 
g_variant_new_string: assertion 'string != NULL' failed

warning: Failed to obtain data via SyncTeX or data is incomplete.
```

I am attaching the `hello.mklx`, `hello.pdf` files and the generated 
`hello.synctex` file. I am getting the same result with `--synctex=1`.

you can play with

mtxrun --script synctex

and the synctex file to see if it makes sense

one problem with synctex is that the editors depend on a library and 
there has been changes


texshop now uses the more independent method for context i.e. just 
calling "mtxrun --script synctex ..." which not only removes the 
dependency of a library (the dependency on mtxrun is ok as one has 
context anyway) but also permits room for improvement (apart from not 
being tricked by latex specific heuristics in the library)


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] Acrobat doesn’t read imported metadata

2021-10-10 Thread Hans Hagen via ntg-context

On 10/10/2021 5:46 PM, Pablo Rodriguez via ntg-context wrote:

Dear list,

I have the following sample:

   \starttext
   \startluacode
   function document.transfer_metadata(name)
 local main_doc = lpdf.epdf.load(name)
 lpdf.addtoinfo("Title", lpdf.unicode(main_doc.Info.Title),
   lpdf.string(main_doc.Info.Title))
 lpdf.addtoinfo("CreationDate",
   lpdf.string(main_doc.Info.CreationDate))
 lpdf.addtoinfo("ModDate", lpdf.string(main_doc.Info.ModDate),
   main_doc.Info.ModDate)
 lpdf.epdf.unload(name)
   end
   \stopluacode
   \unexpanded\def\TransferMetadata#1%
 {\ctxlua{document.transfer_metadata("#1")}}
   \startTEXpage[offset=1em, align=center]
   \ssbf metadatos\\importados
   \TransferMetadata{metadata.pdf}
   \stopTEXpage
   \stoptext

Being the sample file https://pdf.ousia.tk/metadata.pdf, Acrobat cannot
display the imported title or either the creation or modification dates.

What am I missing to make Acrobat display the imported metadata?

timing, so best use the official methods:

  function document.transfer_metadata(name)
local main_doc = lpdf.epdf.load(name)
context.setupinteraction { title = main_doc.Info.Title }
lpdf.epdf.unload(name)
  end

acrobat looks at the metadata blob

-
      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] Default values for key-value macros

2021-10-10 Thread Hans Hagen via ntg-context

On 10/10/2021 2:01 PM, noib3 via ntg-context wrote:
The way I've been defining key-value macros is to first pass them to 
Lua, handle the parsing there thanks to 
`utilities.parsers.settings_to_hash` and then assign the resulting Lua 
table to ConTeXt variables.


This worked fine up to now, but I'm having problems with the following MWE:

```
\def\style#1[#2] {
   \ctxlua{userdata.style([==[#2]==])}
   \placestyle
}


here you overload a core macro


\startluacode
   userdata = userdata or {}

   userdata.style = function(keyvals)
     local style = {
       color = nil,
       text = nil,
     }
     args = utilities.parsers.settings_to_hash(keyvals)


use "local args" here ^


     for k, v in pairs(args) do
       style[k] = v
     end
     context.setvariables({'style'}, style)
   end
\stopluacode

\define\placestyle{
   \doiftext
     {\getvariable{style}{text}}
     {\color[\getvariable{style}{color}]{\getvariable{style}{text}}}
}

\starttext

\style[
   text={Some red text},
   color=red,
]

\style[
   color=blue,
]

\stoptext
```

Here I assign a default value of `nil` to every key, and then check if 
the `text` variable is empty before printing it. I would expect the 
second macro not to print anything since its `text` should be nil, 
instead both macros print 'Some red text', the first one in red and the 
second one in blue.


context.setvariables

like any setting, it accumulates unless you group


I have attached a screenshot of the output.

What am I doing wrong?


local style = {
  color = "",
  text  = "",
}

or you can go fancy with:

\startluacode
interfaces.implement {
name  = "MyStyle",
public= true,
protected = true,
arguments = "hash",
actions   = function(a)
if a.text and a.text ~= ""  then
if a.color and a.color ~= "" then
context.color( { a.color }, a.text)
else
context(a.text)
end
end
end
}
\stopluacode

\MyStyle[
  text={Some blue text},
  color=blue,
]

\MyStyle[
  color=blue,
]

\MyStyle[
  text={test \em test},
]



-----
  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] SciTE configuration Mac

2021-10-10 Thread Hans Hagen via ntg-context

On 10/8/2021 6:39 PM, MANUEL GONZALEZ SUAREZ via ntg-context wrote:

Hi everyone:
Could someone send me a minimal configuration for the SciTE editor of 
the files needed to work with ConTeXt? I work with MaC OS Big Sur.
There are some scite related files in the distribution that you can look 
at (context/data/scite). In principle the built-in lexers (called 
internal there) should work with context (using the keyword lists). The 
external lexers depend on the scintillua dll/so and the latest updats 
drops that (for various reasons) and I now use the OnStyle lua feature 
of scite. However, it still do't work out of the box because they assume 
lpeg to be built in. On my machine I have a version with a few lines 
patch that does that and this is what I'm currently testing with (i can 
put a scite.zip somewhere if needed but that won't help you on osx; if 
lpeg ever makes it into stock scite it should work there too).


You can try to copy the files that ships with context in the scite home 
path and add


import context/scite-context-user

to the global properties files and see what happens

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] Unusual error with \doifinstring in \startbtxrenderingdefinitions ... \stopbtxrenderingdefinitions

2021-10-10 Thread Hans Hagen via ntg-context

On 10/10/2021 5:42 AM, Joey McCollum wrote:
The test using \removepunctuation that you provided does what it should 
be doing (it produces 6 instances of "test-test" with the intervening 
punctuation mark in each case removed), but it doesn't do what I'm 
trying to do in the MWE above. I'm trying to take certain punctuation 
marks that follow the \autopuncttest macro and place them before it 
instead. Looking at the typo-chr .lua and .mkiv files, I see that there 
are \pushpunctuation and \poppunctuationmethods in addition to the 
\removepunctuation method. These might be useful for this purpose, but 
in any case, I still have to check if the trailing character is one of 
the characters in a specified set/string, and this is where the error is 
arising.


maybe you're in protected mode

% assumes \protect earlier

\unprotect
\def\autopuncttest#1#2{%
  \removeunwantedspaces%
  \doifinstring{#2}{,.!?;:}{#2}%
  \footnote{#1}%
  \doifnotinstring{#2}{,.!?;:}{#2}%
}
\protect

% assumes \unprotect later

or something

\pushcatcodetable \setcatcodetable\ctxcatcodes

\def\autopuncttest#1#2{%
  \removeunwantedspaces%
  \doifinstring{#2}{,.!?;:}{#2}%
  \footnote{#1}%
  \doifnotinstring{#2}{,.!?;:}{#2}%
}

\popcatcodetable


Joey

On Sat, Oct 9, 2021 at 12:50 PM Hans Hagen <mailto:j.ha...@xs4all.nl>> wrote:


On 10/9/2021 5:40 PM, Joey McCollum via ntg-context wrote:
 > Hi,
 >
 > I'm trying to define concise biblatex-style citation macros for a
custom
 > bibliographic style specification with support for intelligent
placement
 > of trailing punctuation, and I've encountered an unusual error.
If I try
 > to define the macros within the btxrenderingdefinitions environment,
 > then the code for handling trailing punctuation with the
 > \doifinstring and \doifnotinstring macros fails in some cases.
 > Specifically, it correctly detects when the trailing punctuation
is a
 > period, comma, or semicolon, but not when it is a colon, exclamation
 > point, or question mark. The following MWE reproduces the error:
 >
 > ```
\starttext

test,\removepunctuation -test
test;\removepunctuation -test
test:\removepunctuation -test
test?\removepunctuation -test
test!\removepunctuation -test
test.\removepunctuation -test

\stoptext



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




--

-----
  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] Undefined control sequence \??markingfilter, with MWE to recreate

2021-10-10 Thread Hans Hagen via ntg-context

On 10/9/2021 9:53 PM, Rik Kabel via ntg-context wrote:

Error with 20211008 ConTeXt:
%\setupheadertexts [][][{\it\getmarking[chapter]}][]  % fails
\setupheadertexts [][][{\getmarking[chapter]}][] % fails
%\setupheadertexts [][][\getmarking[chapter]][]   % succeeds

\starttext

\chapter{abc}
abc
\chapter{def}
def
\stoptext
no failure here, but actually the last one should fail (dummy page) due 
to nested []


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] Converting LaTeX math to ConTeXt

2021-10-10 Thread Hans Hagen via ntg-context

On 10/10/2021 5:45 AM, Jason Ross via ntg-context wrote:

Hello,

I'm trying to provide more support for LaTeX math for an Org Mode
exporter for ConTeXt. LaTeX is the de facto standard for mathematics in
Org Mode. However, the syntax is quite different between LaTeX and
ConTeXt. I have a few ideas, but none that I'm happy about.

1. Export LaTeX to MathML then import that into ConTeXt. I don't know
    how to get this to work. latexmlmath only returns the first row of
    `align` environments (for me anyway). Also, this would require users
    to install another program.
2. Typeset equations with LaTeX as standalone pages and then include
    them as images. This will typeset everything with LaTeX defaults.
    Also, either equation alignment or equation numbering will break.
3. Hack every math environment I can think of to accept LaTeX syntax
    (see https://wiki.contextgarden.net/LaTeX_Math_in_ConTeXt). Lots
    of work, lots of problems as described in the article. End-users
    could add their own hacks to the template preamble for cases I
    don't get to.
4. Manually parse and convert every LaTeX math environment to ConTeXt
    before exporting. Basically a non-starter.

I'm wondering what's the best way to go about this. Surely others have
run into the same problem?

what do you mean with 'quite different'

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] Unusual error with \doifinstring in \startbtxrenderingdefinitions ... \stopbtxrenderingdefinitions

2021-10-09 Thread Hans Hagen via ntg-context

On 10/9/2021 5:40 PM, Joey McCollum via ntg-context wrote:

Hi,

I'm trying to define concise biblatex-style citation macros for a custom 
bibliographic style specification with support for intelligent placement 
of trailing punctuation, and I've encountered an unusual error. If I try 
to define the macros within the btxrenderingdefinitions environment, 
then the code for handling trailing punctuation with the 
\doifinstring and \doifnotinstring macros fails in some cases. 
Specifically, it correctly detects when the trailing punctuation is a 
period, comma, or semicolon, but not when it is a colon, exclamation 
point, or question mark. The following MWE reproduces the error:


```

\starttext

test,\removepunctuation -test
test;\removepunctuation -test
test:\removepunctuation -test
test?\removepunctuation -test
test!\removepunctuation -test
test.\removepunctuation -test

\stoptext



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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] Does the ConTeXt distro come with a PDFViewer?

2021-10-09 Thread Hans Hagen via ntg-context

On 10/9/2021 3:07 PM, Ramkumar KB via ntg-context wrote:

Hello Community,

If my memory serves me correctly, I might have noticed (in one of the 
presentations during the recent ConTeXt meeting) that the distro comes 
with a PDFViewer. Is that a correct assumption?


I am currently using a VSCode extension for PDFViewing but it does not 
work very reliably.
just use an external one, normally it will update automatically (on 
windows sumatrapdf is pretty ok, on linux i'd probably use okular 
because mupdf has no real gui)


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] Something smells rotten in the state of luametatex...

2021-10-08 Thread Hans Hagen via ntg-context

On 10/8/2021 6:09 PM, Thomas A. Schmitz via ntg-context wrote:


Hi all,

I have a document here for one of my classes: xml processed via context, 
some layers, some two column paragraphs, a bibliography, nothing out of 
the ordinary. With mkiv, it compiles cleanly:


mkiv lua stats  > used engine: luatex version: 1.13, functionality 
level: 7420, banner: this is luatex, version 1.13.0 (tex live 2021)

mkiv lua stats  > used hash slots: 48846 of 65536 + 25
mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 212 MB, 
ctx: 210 MB, max: unknown MB, hash chars: min(64,40), symbol mask: utf 
(τεχ)
mkiv lua stats  > runtime: 2.775 seconds, 119 processed pages, 119 
shipped pages, 42.883 pages/second

system  | total runtime: 5.996 seconds

When I compile the same document with luametatex, things slow down to a 
crawl:


mkiv lua stats  > used engine: luametatex version: 2.0921, functionality 
level: 20210903, format id: 594, compiler: gcc
mkiv lua stats  > tex properties: 740039 hash slots used of 2097152, 
48372 control sequences, approximate memory usage: 36 MB
mkiv lua stats  > lua properties: engine: lua 5.4, used memory: 100 MB, 
ctx: 93 MB, max: 138 MB, symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 27.509 seconds, 119 processed pages, 119 
shipped pages, 4.326 pages/second

system  | total runtime: 139.458 seconds of 139.493 seconds

So, it takes more than 20 times as long... The CPU of my computer goes 
up to 100 %, and the entire machine sometimes becomes unresponsive 
during the run. Obviously, I can't provide a MWE, but this seems 
bizarre. One thing I see on my terminal: there are hundreds of lines 
like this


Overfull \hbox (0.8pt too wide) in paragraph at lines 18--18
6:17:  [glue][glue][glue][boundary][hlist][penalty][glue][hlist][penalty] >[glue][glue]


It's almost like some debug setting has been triggered. But that may be 
a red herring. Anyway, I just wanted to report this; maybe some bigger 
problem (with the binary or the format?) is lurking somewhere.
no, that's just a more verbose 'overfull box' message ... does adding 
\dontcomplain help? (After all you can live with .8pt which smells like 
2 * .4pt which is the default rule width so maybe some frame stricks out)


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] Test suite fonts/features-005.tex failing for me

2021-10-08 Thread Hans Hagen via ntg-context

On 10/3/2021 1:41 AM, Bruce Horrocks via ntg-context wrote:

In the test suite, the file fonts/features-005.tex is failing for me on latest 
lmtx. All three items appear the same each time i.e. no small caps and no 
old-style digits on the second and third.

<http://www.pragma-ade.com/context/latest/cont-tst.zip>

Can anyone else reproduce this, please?

shoul dbe:

What \recursedepth\recurselevel\space
\feature[+]{smallcaps}
What \recursedepth\recurselevel\space
\feature[+]{oldstyle}
What \recursedepth\recurselevel\space



-
  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] Short forms and abbreviations in bibliography

2021-10-08 Thread Hans Hagen via ntg-context

On 10/7/2021 6:38 AM, Joey McCollum via ntg-context wrote:
A concise solution that I found would work was to define a "shorthand" 
citation alternative and just print the shorthand with that:


```
% Shorthand citation setup
\startsetups btx:sbl:cite:shorthand
   \begingroup
   \def\currentbtxcategory{\btxfield{category}}
   \texdefinition{btx:sbl:inline:shorthand}
   \endgroup
   \removeunwantedspaces
   \removepunctuation
\stopsetups

...

\expanded{\abbreviation[\currentbtxtag]{\textcite[alternative=shorthand,lefttext=,righttext=][\currentbtxtag]}{\textcite[alternative=listsubcite,lefttext=,righttext=][\currentbtxtag]}}
```

Again, this works, although I'm still not sure why 
invoking \texdefinition{btx:sbl:inline:shorthand} directly doesn't.

I leave it to Alan to comment on this as he's the bib guru

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] Outlined text (from MP) inline in ConText has incorrect baseline (i.e. no depth)

2021-10-08 Thread Hans Hagen via ntg-context

On 10/7/2021 4:14 PM, Rudd, Kevin via ntg-context wrote:

Hey---

I'm trying to insert outlined text (derived from MetaFun example code) 
into a document and it seems to work up to the point that the text has 
depth (descenders). There's a previous post that mentions using 
textcommand for titles to ensure that the appropriate baseline is used 
but I haven't figured out why that would work; for my purposes, I'm 
insert the text inline so that solution wouldn't work here. I have 
included a MWE that demonstrates the problem; I've tried putting both 
the text and the outlined text in a box, then adjusting the outlined 
text by the depth of the text itself but that doesn't seem to work. I 
expect that there's an easy way either in MP or ConTeXt, but I haven't 
found it yet.




% \OutlinedText[glyph][outline]{text}
\def\OutlinedText{\dodoubleempty\doOutlinedText}

\def\doOutlinedText[#1][#2]#3%
{%
     % \type{#1}::\type{#2}::\type{#3}
     \ifsecondargument
         \makeOutlinedText{#1}{#2}{#3}%
     \else\iffirstargument
         \makeOutlinedText{#1}{black}{#3}%
     \else
         \makeOutlinedText{white}{black}{#3}%
     \fi\fi
}

\def\makeOutlinedText#1#2#3%
{%
     \startMPcode
     draw outlinetext.b("#3")
          (withcolor "#1")
          (withcolor "#2" withpen pencircle scaled 1/16);
     \stopMPcode
     \autoinsertnextspace
}

\starttext
     start
          \OutlinedText{aaa}
     and  \OutlinedText{Bbb}
     and  \OutlinedText{ggg}
     and  \OutlinedText{Yyy}
     finish
\stoptext




(Here is the code with my attemps to shift the baseline; the \dp & \wd 
approach seems to do nothing, and the \lower doesn't compile and I 
haven't pursued why yet.)





% \def\makeOutlinedText#1#2#3%
% {%
%     \newbox\tBox
%     \newbox\uBox
%     \setbox\tBox\hbox{#3}
%     \setbox\uBox
%     \hbox{%
%         \startMPcode
%         draw outlinetext.b("#3")
%              (withcolor "#1")
%              (withcolor "#2" withpen pencircle scaled 1/16);
%         \stopMPcode
%     }%
%     % \lower\uBox\dp\tBox
%     \ht\uBox=\ht\tBox
%     \dp\uBox=\dp\tBox
%     \unbox\uBox
%     \autoinsertnextspace
}




Any feedback or suggestions would be appreciated.


\defineeffect[MyEffect][alternative=outer,rulethickness=.1pt]

\starttext
start
   {\effect[MyEffect]{aaa}} \OutlinedText{aaa}
and  {\red  \effect[MyEffect]{Bbb}} \OutlinedText{Bbb}
and  {\green\effect[MyEffect]{ggg}} \OutlinedText{ggg}
and  {\blue \effect[MyEffect]{Yyy}} \OutlinedText{Yyy}
finish
\stoptext




Kevin W. Rudd, Ph.D.
CAPT, USN (Ret)

Computer Architecture & Computer Engineering
Advanced Computing Systems (ACS) Research Program
Laboratory for Physical Sciences (LPS)

443-654-7878
ke...@lps.umd.edu <mailto:ke...@lps.umd.edu>

Visiting Research Professor
United States Naval Academy

r...@usna.edu <mailto:r...@usna.edu>


___
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] hatching an area without drawing its borders

2021-10-08 Thread Hans Hagen via ntg-context

On 10/7/2021 9:45 PM, Damien Thiriet via ntg-context wrote:

path p;
p := fullcircle scaled 50 randomized 5;
draw p anglestriped (1,60,4);


i'll add option 0 as in:

draw p anglestriped (0,60,4);



-
  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] Placing SVG icons and text side by side

2021-10-07 Thread Hans Hagen via ntg-context

On 10/7/2021 11:24 AM, noib3 via ntg-context wrote:
How can I place an SVG icon "inline", i.e. side by side to some text? 
Here's my MWE


```
\useURL
   [github]
   [https://github.com/test <https://github.com/test>]
   []
   [github.com/test <http://github.com/test>]

\starttext
   \placefigure[none]{}{\externalfigure[github.svg][width=17.5pt]}
   \from[github]
\stoptext

\figuresymbol[github.svg][conversion=mp,height=2ex]


-
  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] Addition of authortitle sorttype for bibliographies

2021-10-05 Thread Hans Hagen via ntg-context

On 10/5/2021 3:52 PM, mf via ntg-context wrote:

probably got lost when my mail address was in transition



I sent you some mails during that period that were not answered.
I thought it was a retaliation for not presenting anything at the 
meeting :)
Sounds like a good plan ... I can do that next time ... but being one of 
the extreme testers with good mwe's gives you too many credit points so 
...


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] metafun: circular arc

2021-10-05 Thread Hans Hagen via ntg-context
nta ;
q := p cutafter (point .3 along p) ;
q := q rotated 120 ;
drawarrow q  withpen pencircle scaled .5mm withcolor yellow ;
draw followtext(q, "\strut TEXT TWO") ;

% the real deal: best make a macro for this

p := fullcircle scaled 6cm ;
drawpoint 0 of p withpen pencircle scaled 5mm withcolor blue ;
drawarrow p  withpen pencircle scaled 1mm withcolor red ;
a := (point eps of p) rotated 45 ;
draw a withpen pencircle scaled 2mm;
q := p cutafter a ;
q := q rotated 20 ;
drawarrow q  withpen pencircle scaled .5mm withcolor green ;
draw followtext(q, "\strut TEXT TWO") ;

\stopuseMPgraphic

\useMPgraphic{empedocless}

So, just always start at point 0 and then just rotate the cutof piece 
over the angle that you want. The eps in the last case makes that we 
actually have a cut off piece (zero fails here).


So ... solution 4. best suits non math gurus (like you and me).

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] Addition of authortitle sorttype for bibliographies

2021-10-05 Thread Hans Hagen via ntg-context

On 10/5/2021 12:01 AM, Joey McCollum via ntg-context wrote:
I'm not sure if this thread got lost back when I sent it, but I just 
wanted to bump this thread again. The authortitle sort sequence detailed 
in the previous e-mail is working as expected, and it may be a helpful 
addition to the publ-aut.lua file for general use. In case the last 
e-mail was lost, I've repeated the code below:

probably got lost when my mail address was in transition


-
  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] Metafun's utflen not working in certain contexts

2021-10-04 Thread Hans Hagen via ntg-context

On 10/3/2021 9:28 PM, Jairo A. del Rio via ntg-context wrote:
Hi, list. The following works for MkIV, but not LMTX (adapted from here: 
https://tex.stackexchange.com/questions/617597/how-can-i-use-luas-string-len-inside-a-metapost-function 
<https://tex.stackexchange.com/questions/617597/how-can-i-use-luas-string-len-inside-a-metapost-function>):


\startMPinclusions

vardef MotMystere(expr taille, speciale, index) =

save avant,apres,case;

numeric avant,apres;

path case;

case := fullsquare scaled 13;

avant := speciale-1;

%For Unicode, use "utflen" instead

apres := utflen(taille) - speciale;

if avant >= 1:

for j=1 upto avant:

draw (case rotated 180

cutafter point 3 of case rotated 180)

shifted (-13j,-13*index);

endfor;

fi;

label.lft (index,point 3.5 of

case shifted (-13*avant,-13*index));

draw case yshifted (-13*index);

fill case yshifted (-13*index)

withcolor \MPcolor{gray-8};

if apres > 0:

for j=1 upto apres:

draw (case cutafter point 3 of case)

shifted (13j,-13*index);

endfor;

fi;

enddef;

\stopMPinclusions

\starttext

An example with "enigma"


\startMPcode

MotMystere("enigma",4,1)

\stopMPcode

\stoptext

for the moment use ()

apres := (utflen(taille)) - speciale;



-
  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] MkIV missing?

2021-10-04 Thread Hans Hagen via ntg-context

On 10/4/2021 12:39 PM, Henning Hraban Ramm via ntg-context wrote:

Hi,
since a while, I can’t run MkIV any more, even after several runs of install.sh 
(and mtxrun --generate, of course).
It’s the same on my Mac and my Linux laptop (of course the bin dir is different 
on the latter):

$ context --version
mtx-context | ConTeXt Process Management 1.04
mtx-context |
mtx-context | main context file: 
/Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2021.09.26 17:00
mtx-context | main context file: 
/Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkxl/context.mkxl
mtx-context | current version: 2021.09.26 17:00

$ context --version --luatex
mtx-context | redirect luametatex -> luatex: luatex --luaonly 
"/Users/hraban/lmtx/tex/texmf-osx-64/bin/mtxrun.lua" --script mtx-context 
--version --luatex --redirected
mtxrun  | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua'

$ which context
/Users/hraban/lmtx/tex/texmf-osx-64/bin/context

$ which luatex
/Users/hraban/lmtx/tex/texmf-osx-64/bin/luatex

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

$ mtxrun --version
mtxrun  | ConTeXt TDS Runner Tool 1.32
mtxrun  | source path



I thought that was related to the server/provider move, but I guess it isn’t.

It’s a bit annoying that install.sh leaves ~/lmtx/bin in the PATH, so that a 
call to mtxrun can’t find any configuration.

works here ... maybe a --generate issue?

-
      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] Dumb question about ligatures

2021-10-03 Thread Hans Hagen via ntg-context

On 10/3/2021 1:34 AM, Bruce Horrocks via ntg-context wrote:

On 2 Oct 2021, at 00:46, Hans Hagen  wrote:


On 10/2/2021 12:35 AM, Bruce Horrocks via ntg-context wrote:

On 21 Sep 2021, at 02:47, Bruce Horrocks via ntg-context  
wrote:


I'm using a TTF file that has no ligature capability as a built-in feature. It 
does however have glyphs for fi and fl but ConTeXt isn't substituting them.

So the question is: what do I need to do to persuade ConTeXt to do fi & fl 
ligature substitution?

Any suggestions please? Is a font features file the 'right' way? I would have 
thought that there was a more traditional solution

you can write your own feature (examplex in test suite and manuals) where you 
map f + f onto ff


Thanks Hans - I keep forgetting about the test suite.

For the benefit of those coming here via the mail archive, I found what I 
needed in the cont-tst.zip test suite in the file fonts/extensions-001.tex
<http://www.pragma-ade.com/context/latest/cont-tst.zip>

Now my problem is that the font only has ligatures for fi and fl which is making my 
life di-ffi-cult. 
Then forget abnout the ligatures ... these two were probably only added 
because of 'habbit'. Most people won't notice.


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

2021-10-01 Thread Hans Hagen via ntg-context

On 10/1/2021 11:43 PM, Henning Hraban Ramm via ntg-context wrote:

Sorry, Denis and I agreed to postpone it one week and meet on October _12th_, 
same time.
I’ll send a reminder.

so far that is ok (but i definitely ned to be reminded)

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] Dumb question about ligatures

2021-10-01 Thread Hans Hagen via ntg-context

On 10/2/2021 12:35 AM, Bruce Horrocks via ntg-context wrote:

On 21 Sep 2021, at 02:47, Bruce Horrocks via ntg-context  
wrote:


I'm using a TTF file that has no ligature capability as a built-in feature. It 
does however have glyphs for fi and fl but ConTeXt isn't substituting them.

So the question is: what do I need to do to persuade ConTeXt to do fi & fl 
ligature substitution?


Any suggestions please? Is a font features file the 'right' way? I would have 
thought that there was a more traditional solution
you can write your own feature (examplex in test suite and manuals) 
where you map f + f onto ff


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] running tikz

2021-10-01 Thread Hans Hagen via ntg-context

On 10/1/2021 11:36 AM, Henri Menke via ntg-context wrote:


When I last looked at it about a year ago it was completely unusable
with the LuaTeX driver because position tracking primitives were
removed (\pdflastxpos, \pdflastypos) and box keywords had changed
(\hbox dir TRT). Some catcode trickery in pgfplots also had stopped
working (https://github.com/pgf-tikz/pgfplots/pull/353).


keep in mind that luatex has no \pdf prefixes (i added these for usage 
like tikz but we have other ones in context)


in context we always used the 'direction' keyword because when we 
dropped many directions from luatex these weird three letter ones made 
no sense (basically they were sort of used as three constructor elements 
but that model was already dropped)


anyway, as i mentioned, somehow the intenet triggers exageration: 
'competely unueable' is also one of these 'move to bottom of todo list' 
things



As Hans mentioned in another message, the PDF resource management has
changed (if I understand it correctly), so things like shadings and
patterns would have to be adjusted.
nothing changed there (also because we never really used the engines 
stuff) ut any resource managament has to be intercaces to any macro package


that said: i have a few tikz test files and when they run ok it's fine 
for me ... if something fails users can ask on the list (with a mnew) 
and when they don't ... no reason to complain


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] running tikz

2021-10-01 Thread Hans Hagen via ntg-context

On 9/30/2021 8:52 PM, Aditya Mahajan via ntg-context wrote:

On Thu, 30 Sep 2021, Henri Menke via ntg-context wrote:


On Thu, 2021-09-30 at 11:57 +0200, Alain Delmotte via ntg-context
wrote:

Hi!

I would like to use tikz to benefit of the package "pgf-soroban" I
did write for LaTeX (after adapting it and before, later, to
translate it to metapost).

I did try the sample program from the tikz manual, but I get an error
saying that "t-pgf.tex" is not found; but it is in the tree of
ConTeXt-lmtx.

How to make all the files in the distribution known to the compiler?



Note that there is currently no proper support for LMTX in PGF/TikZ.

https://github.com/pgf-tikz/pgf/issues/990


Nowdays exagerating remarks like "lots of ..." just like "many buge ..." 
and "completely broken ..." and some more make me put something at the 
bottom of my list cq. dismiss.



Interesting... it seems that only a few features don't work. I regularly use 
pgfplots, and haven't noticed any compatibility issues in my examples.

What will be needed to add a LMTX "driver" for TikZ? Porting pgfsys-luatex.def 
to pgfsys-luametatex.def? Or is something else also needed?
I don't know. If you send me the examplex that don't work I can check 
it. I suppose that it there is a well defined interface layer we can 
provide the connection and maintain that in the context distribution. 
And we can also just decide that some features are not supported (for 
instance because they interfere with context resource management).


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] running tikz

2021-09-30 Thread Hans Hagen via ntg-context

On 9/30/2021 11:57 AM, Alain Delmotte via ntg-context wrote:

Hi!

I would like to use tikz to benefit of the package "pgf-soroban" I did 
write for LaTeX (after adapting it and before, later, to translate it to 
metapost).


I did try the sample program from the tikz manual, but I get an error 
saying that "t-pgf.tex" is not found; but it is in the tree of ConTeXt-lmtx.


How to make all the files in the distribution known to the compiler?


mtxrun --generate

and you ned to use use m-tikz.mk* from the distribution

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

2021-09-28 Thread Hans Hagen via ntg-context

Hi,

Due to domain transfer issues (provider quits services) there is the 
possibility that the coming days the pragma-ade.com address fails.
The pragma-ade.nl and other addresses are okay, If all works well the 
installer handles fallbacks. Eventually the context garden will also 
have the files.


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] manual hyphenation LMTX

2021-09-28 Thread Hans Hagen via ntg-context

On 9/28/2021 2:57 AM, jbf via ntg-context wrote:
I may have seen a response to this at some stage in the list, but I 
cannot find it.


\- works for manual hyphenation in Mkiv but not (for me at least) in LMTX.

My general setting  is \setupalign [hz, 
nothyphenated,stretched,verytolerant] because I am typesetting a book 
for visually-impaired readers using Atkinson Hyperlegible, especially 
developed by the Braille Foundation. In general, hyphenation is not 
recommended for the visually-impaired, but just occasionally it becomes 
necessary.


Is there a reason for LMTX is not accepting \- or is there another way 
to achieve it in LMTX?


just a side effect of more control (in the engine) and therefore also in 
lmtx


we can do something like this:

\unprotect

\def\v!explicit{explicit}

\permanent\protected\def\doexplicithyphens{\hyphenationmode\bitwiseflip\hyphenationmode 
\explicithyphenationcode}

\permanent\protected\def\noexplicithyphens{\hyphenationmode\bitwiseflip\hyphenationmode-\explicithyphenationcode}

\defcsname\??aligncommand\v!explicit\endcsname{\toksapp\t_spac_align_collected{\nohyphens\doexplicithyphens}}

\protect

\starttext

{ \setupalign [hz,nothyphenated,stretched,verytolerant] 
\dorecurse{100}{test\-}test \par }


{ \setupalign [hz,explicit,stretched,verytolerant] 
\dorecurse{100}{test\-}test \par }


\stoptext

if we can agree on the keyword ...

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] Invalid conversion specification

2021-09-28 Thread Hans Hagen via ntg-context

On 9/28/2021 2:42 AM, Marcus Vinicius Mesquita via ntg-context wrote:

Dear list,

The command in the last line of p. 66 of the fonts-mkiv.pdf file:
mtxrun --script font --list --info --pattern=pagella

throws a lua error: function call: invalid conversion specification: '% -8s'

I'm on a linux64 platform using:
current version: 2021.09.26 17:00

lua 5.4 format parsing became a bit more strick ... i'll fix it

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 Textadept to open pdf?

2021-09-27 Thread Hans Hagen via ntg-context

On 9/27/2021 3:53 AM, jbf via ntg-context wrote:
The occasional response to a similar question can be found, e.g. on 
stackexchange, but none of the responses work for me.


Textadept is very fast at compiling (and does compile correctly). I can 
certainly open the pdf independently in various pdf viewers, but I 
cannot get Textadept to automatically open, say, Okular (installed on 
Linux Mint), at the end of the process.


The last part of the log reads:

mkiv lua stats  > runtime: 0.640 seconds, 8 processed pages, 8 shipped 
pages, 12.492 pages/second
mtx-context | pdfview methods: auto default okular pdfxcview 
sumatra, current method: okular (directives_pdfview_method)
pdfview | command: okular --unique "test1.pdf" 1>/dev/null 
2>/dev/null &

mtx-context | pdfview overhead: 0.001 seconds
system  | total runtime: 0.649 seconds of 0.701 seconds

 > exit status: 0

Have tried setting up a custom text editor on okular with: 
/home/me/.textadept "%f" -e textadept.editing.goto_line(%l-1), as 
suggested by one response, but to no avail. Current version of ConTeXt 
is 2021.09.17 10:01


Anyone tried Textadept successfully and might have a suggestion?
I tried to launch textadept with the setup that is in the distribution 
and it worked ok with the textadept version on my machine. There is 
however a hickup in launching the pdf viewer and then after a while i 
have to hit escape (windows version of textadept). A second run doesn't 
work well. So, I guess there is somethign with subprocesses.


The output pane is, as with scite that also uses scintilla, quite fast 
indeed because it has large refresh delays. For those on windows: the 
last years the windows terminal (cmd etc run on top of that) is also 
quite ok. Older versions of cmd had a char-by-char refresh which is not 
something that goes well with tex logging. On unix one has larger delays 
so there it's better but tven then font rendering can slow things down.


Now to textadept: in order to check this 'launch viewer' delay I 
installed the latest version and the code that we ship with context no 
longer runs (quits on some path creation, then when commented on some 
color/style settings and finally loops in finding a lexer). I know (from 
scite) that there has been updates to the scintilla lexer interface 
(again) that I need to look into but in the meantime i wonder if I 
should do that (although ta is advertised as flexible and configureable 
it i guess it mostly applies to the code it comes with so maybe it's not 
meant not be used as i want to, as a framework; get me right: i don't 
complain about changes: that comes with open source and free and such, 
it's more about 'should i stick to it and spend time on it').


That said, I do use scite but run our own lexing on top of the derived 
ta lexing dll (among the reasons for having our own lexing code are 
'performance' (large files should load and lex fast), nested lexing, 
extra features, spell checking etc. Also, we already had lexers. I now 
wonder if I should not simply roll out my own plugin in scite (which 
also makes it possible to do some more) instead of relying on ever 
changing interfaces (changes are fine, but keeping some compatibility 
would be nice).


My backup plan (in case it all stops working) is VScode but even that 
one keeps changing (e.g. the way extensions are enabled on the command 
line) and it doesn't have the convenient 'run some program based on 
suffix' feature that other editors have.


So ... the question is: should I waste time on editor support at all, 
that is: wrt stuff added to the distribution. I'm okay with making 
things better and have no problem adepting, but we're not talking about 
it getting better here (e.g. ta already got pretty large wrt to binaries 
and libraries, so it lost a bit of its charm for me and it's a pitty 
that the scite lua interface doesn't have lpeg built in natively.)


(I might eventually end up running editors in an ancient virtual machine.)

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] \placeinitial to account for quotation mark

2021-09-26 Thread Hans Hagen via ntg-context

On 9/25/2021 10:45 PM, Thangalin via ntg-context wrote:

Henri Menke provided a partial solution:

\defineinitial[two][method={first,auto}]
\setuphead[chapter][
   after={\placeinitial[two]},
   page=no,
]

\starttext
\chapter{Harriet Tubman}
"Every great dream begins with a dreamer. Always remember, you have within
you the strength, the patience, and the passion to reach for the stars to
change the world.
\chapter{Eleanor Roosevelt}
Great minds discuss ideas; average minds discuss events; small minds
discuss people.
\stoptext

However, the leading quotation mark is gobbled. Is there any generic way 
of detecting a leading quotation mark while keeping initial caps on the 
first character?

i'll send you something off-list to test

-
  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] Framedtext : text out of frame

2021-09-26 Thread Hans Hagen via ntg-context

On 9/26/2021 5:07 PM, Fabrice Couvreur via ntg-context wrote:

Hi,
How to fix the small problem in the code below where the text goes out 
of the frame ?

Thanks
Fabrice

\usecolors[x11]

\starttext
   \startframedtext[frame=off,width=\textwidth, 
align={broad,right},indenting={yes},background=color,backgroundcolor=navajowhite1]

       \startitemize[columns,three,n]
         \startitem
          Une quantité constante est une quantité déterminée, qui 
conserve toujours la même valeur.

         \stopitem\par
         \startitem
           Une quantité variable est une quantité indéterminée, ou, si 
l'on veut, une quantité universelle, qui comprend toutes les valeurs 
déterminées.

         \stopitem\par
         \startitem
           Une quantité variable devient déterminée, lorsqu'on lui 
attribue une valeur déterminée quelconque.

         \stopitem\par
         \startitem
           Une fonction de quantité variable est une expression 
analytique composée, de quelque manière que ce soit, de cette même 
quantité & de nombres, ou de quantités constantes.


           Par exemple, \m{a+3z} ; \m{az-4zz} ;

           \m{az+b\sqrt{aa-zz}} , cz ; \m{etc}. sont des

           fonctions de \m{z}.
         \stopitem\par
         \startitem
           Une fonction de variable est

           donc aussi une quantité variable.
         \stopitem\par
       \stopitemize
     \stopframedtext
\stoptext1
columns and framedtext etc kind of interfere here so the solution space 
becomes small


the best i can come up with now is:

\setupmixedcolumns[itemgroupcolumns][method=box,maxwidth=\availablehsize]
\startitemize[columns,three,n]
\setupalign[flushleft,broad,verytolerant,extremestretch]

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] new upload: --secure and 'dk' unit

2021-09-26 Thread Hans Hagen via ntg-context

Hi,

I uploaded a new version. The lmtx installer should now accept --secure 
(but one has to update the installation script) in which case curl is 
used when available on the system.


There are no other chnages apart from the outrcome of an 'extension 
evening session' we had last week:


/*tex

We support the Knuthian Potrzebie cf.\ \url 
{https://en.wikipedia.org/wiki/Potrzebie} as |dk|
unit. It was added 2021-09-22 exactly when we crossed the season 
during a evening session at
the 15th \CONTEXT\ meeting in Bassenge (Boirs) Belgium. It took a 
few iterations to find the
best numerator and denominator, but Taco Hoekwater, Harald Koenig 
and Mikael Sundqvist figured
it out in this interactive session. The error messages have been 
adapted accordingly and the
scanner in the |tex| library also handle it. One |dk| is 6.43985pt. 
There is no need to make
\METAPOST\ aware of this unit because there it is just a numeric 
multiplier in a macro package.


From Wikipedia:

In issue 33, Mad published a partial table of the \quotation 
{Potrzebie System of Weights and
Measures}, developed by 19-year-old Donald E. Knuth, later a famed 
computer scientist. According
to Knuth, the basis of this new revolutionary system is the 
potrzebie, which equals the thickness

of Mad issue 26, or 2.2633484517438173216473 mm [...].

*/

This is a follow up of a suggestion by Hraban (on the meeting attendents 
list): a new unit. We have 'sp' for an unscaled unit (kind of the 
internal one, also used at the lua end), 'ex', 'em', 'px' as relative 
units (the handy ones), 'mu' for math (sort of relative and adaptive 
too), which leaves 'cm', 'mm' (popular and valid SI), 'pt' (natural to 
typesetting), 'bp' (related to postscript and pdf, the unit that 
competing-to-tex programs use), 'dd' and 'cc' (for Tomas Hala), 'in' 
(for stubborn non SI users) and now also 'dk' (for Don Knuth fans).


So, Hraban (who organizes next year meeting) can now do:

\setupbodyfont[dejavu,1dk]

\starttext

1dk = \the\dimexpr1dk = \the\dimexpr2.2633484mm

{\definedfont[Mono*none @ 6pt]test}
{\definedfont[Mono*none @ 1dk]test}

\stoptext

And in case one wonders: this few line addition doesn't harm performance.

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

2021-09-26 Thread Hans Hagen via ntg-context

On 9/26/2021 11:03 AM, Alain Delmotte via ntg-context wrote:

Hi,

Le 25/09/2021 à 20:02, Henning Hraban Ramm via ntg-context a écrit :

Hi all,

already for a while I wanted to suggest a regular online meet-up, just to chat 
or discuss ConTeXt and the world.

Participants of the just finished meeting already know the BigBlueButton 
“room”, and without the difficulty of a auditory in presence and a weak DHCP, 
we should have even less problems with it.

I’d offer this monthly, 2–3 hours, and let’s see if it stands the test.

Now, if you’d like to participate, which times would fit you (weekdays, 
daytime...)?

Warm regards,
Hraban


What is the BigBlueButton “room”?

I am interested.

I hope that the “just finished meeting” was enjoyable, calm, not 
necessarily reposing and of course fruitful.
For sure. As were the moments between meetings, the location, and 
cuisine. It is as much a 'meeting friends' event as a 'talking tex, mp 
and lua' opportunity. A lot packed in a week. And thanks to Jano (last 
year) and Taco (this year) covid could not prevent it happening, 
although of course for some it did (which is why we experimented again 
with limited online).


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

2021-09-26 Thread Hans Hagen via ntg-context

On 9/25/2021 8:02 PM, Henning Hraban Ramm via ntg-context wrote:

Hi all,

already for a while I wanted to suggest a regular online meet-up, just to chat 
or discuss ConTeXt and the world.

Participants of the just finished meeting already know the BigBlueButton 
“room”, and without the difficulty of a auditory in presence and a weak DHCP, 
we should have even less problems with it.

I’d offer this monthly, 2–3 hours, and let’s see if it stands the test.

Now, if you’d like to participate, which times would fit you (weekdays, 
daytime...)?
I suppose it has to be some best fit for all, so you can best check with 
those on line last week to get the best time.


Concerning 'topics' ... it if also involved discussing features, solving 
problems, demos than we need to mechanism to collect those so that they 
can be prepared.


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 offline?]

2021-09-20 Thread Hans Hagen via ntg-context

On 9/20/2021 12:34 PM, Floris van Manen via ntg-context wrote:
I try to update my lmtx installation, but it seems that there is no 
contact with the server somehow...

Any hints?
Because our provider stops with web stuff we are in transition. You can 
try again (there was a redirect to https that spoiled the installer).


(Because the provider also ditched all our email adresses and it took a 
while to fix that there can be lost mails.)


Hopefully things are stable after a while (the com address is still in 
transition so that can get temporarily off line but the nl fallbacks 
should work ok.)


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] improve bad habits deduplicate redundant defined values

2021-09-18 Thread Hans Hagen via ntg-context

On 9/18/2021 2:57 PM, Denis Maier via ntg-context wrote:


Ok. So in general you deal with diverging demands by creating new environments 
that you can load selectively?
I currently struggle with a similar question: In one project I typeset articles 
for a journal from XML sources with ConTeXt. Obviously, these articles should 
rely on the same environment files. But how would you deal with those cases 
where you'd need a slightly different table layout in one article?


one can always use 'modes' (andf run with --mode)

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] Unable to install lmtx

2021-09-17 Thread Hans Hagen via ntg-context

On 9/16/2021 11:45 PM, Henning Hraban Ramm via ntg-context wrote:



Am 16.09.2021 um 19:45 schrieb Alain Delmotte via ntg-context 
:

I changef my antivirus and now I could install lmtx.


Besides that, most antivirus solutions for Windows since 7 aren’t better than 
the builtins and often even open additional security holes.
which is true for any operating system (also phones etc) and popular 
ones get more attention of intruders


anyway, here i have never used anything else than the built in security 
essentials (that scan incoming stuff) and those don't complain about the 
binaries so i guess it was a false positive


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] Exclude bibliographic entries from list even when cited with \cite

2021-09-16 Thread Hans Hagen via ntg-context

On 9/16/2021 8:45 PM, Joey McCollum via ntg-context wrote:

Hi,

It's taken a couple weeks, but I nearly have a working bibliographic 
rendering for SBL style ready. I'm hosting the .lua and .mkvi files I 
have so far, as well as a test .bib and .tex file, on GitHub at 
https://github.com/jjmccollum/context-sbl 
<https://github.com/jjmccollum/context-sbl>. The look of the rendering 
seems to be correct for all of the examples, so the last remaining tasks 
mostly concern some lower-level technical issues.


Because of the way that SBL style renders entries that are contained in 
other works (e.g., a chapter in a book that is part of a multivolume 
collection), it seemed natural to accommodate this by allowing entries 
to have cross-references to other entries. The rendering process can 
then be handled through recursive subcitations with different 
alternatives. In general, I handle these subcitations with the \textcite 
command, so that "higher-level" entries are not added to the list when 
they are only subcited.


An important guideline that I still have to implement works in the 
opposite direction: it says that entries in certain categories should 
not be added to the list, but the books or collections containing them 
should be. I think I could make this work for the subcitation using the 
\listcite or \cite command recursively. But is there a way to 
conditionally handle whether or not to add the entry to the list after I 
invoke the \cite command, or is this built into the \cite command at a 
low level? If I had to, I could define an \autocite command that does 
all of these checks first, but if it's possible to keep the common \cite 
command instead of forcing users to use a different command, that would 
be preferable.

a few quick remarks (i'll look better into it later)

  % Various Lua macros for parsing and conversion
  \startluacode
sblhelpers = sblhelpers or {}

i think we should havea namespace for these kind of things in order not 
to polute the global namespace


something publications.btx and then publications.btx.slb = { }

this is tricky and will clash:

\def\ordinal#1{\ctxlua{sblhelpers.ordinal([==[#1]==])}}%
\def\convertdate#1{\ctxlua{sblhelpers.convertdate([==[#1]==])}}%
\def\serializelocationpublisher#1#2{\ctxlua{sblhelpers.serializelocationpublisher([==[#1]==],[==[#2]==])}}%
\def\serializevolumenumberdatepage#1#2#3#4{\ctxlua{sblhelpers.serializevolumenumberdatepage([==[#1]==],[==[#2]==],[==[#3]==],[==[#4]==])}}%

% Define some helper functions for subcitations
\let\btxparenttag\empty% the tag of the entry subciting the current one
\def\btxprintpubl{yes}% yes/no indicating whether publication 
information should be specified for the current citation or subcitation

\let\btxcurrentsubcitetype\empty% the type of subcitation we're invoking

here

   \def\btxsblordinal

is better, but as you're using protection, even better is

  \def\btx_sbl_ordinal

i also wonder about the

  \clf_btxdirect

we need a \btxdirect... (have to think about a name) because one never 
knows how a lowlevel command evolves (or at least i shoudl somehow make 
a not that it can't evolve (or make a keyword driven variant) ... idem 
for \clf_author (btw, no need for these end-of-line % in texdefinitions


I'll add string.wordsplitter so that

local andsplitter = string.wordsplitter("and")

local a = andsplitter("a and b and c")
local a = andsplitter("a and b  and c")
local a = andsplitter("aand band c")

all work as expected

i'll add an extended publ-imp-author.mkvi to the distribution, the other 
ones can come later (including the manual).


Hans


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

maillist : ntg-context@ntg.nl / 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] Unable to install lmtx

2021-09-16 Thread Hans Hagen via ntg-context

On 9/15/2021 10:04 PM, Alain Delmotte via ntg-context wrote:

Hi!

I can't anymore install ConTeXt lmtx and wanted to use PPCHTeX and I 
always got an error message.


So I wanted to run mtxrun --generate, but the access was denied.

I then wanted to run the last install.bat (I am on Windows 10) but I 
always get a message from my antivirus (Panda Dome) which says that 
context.exe and mtxrun.ex have  a virus and neutralise them (that means 
erase them from the bin folder). I get the same if I erase everything 
and install from fresh!


So when I run TeXworks for compiling I get a message saying that ConTeXt 
is not well installed.


I am stuck!

Should I use ConTeXt standalone in the mean time?
you could try standalone, then unzip the regular context archive over 
it, and put the bins from the installer in the bin path


or just disable the virus scanner when installing

(the bin is generated on windows so that implies that the mingw cross 
compiler on linux is adding a virus or that the native compiler does so)


(maybe we should also add a native variant as alternative)

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] Implementing a custom authorconversion for bibliographies

2021-09-15 Thread Hans Hagen via ntg-context

On 9/15/2021 7:01 PM, Joey McCollum wrote:
Looks like it was just a small oversight on my part; I had to make sure 
I added a corresponding \s!btx:\s!list:\s!author:invertedfirst setup for 
list entries. Here's what finally works:


```
\startsetups \s!btx:\s!cite:\s!author:invertedfirst
     \ifnum\currentbtxauthorindex>\plusone
         \fastsetup{\s!btx:\s!cite:\s!author:normal}
     \else
         \fastsetup{\s!btx:\s!cite:\s!author:inverted}
     \fi
\stopsetups

...

\startsetups \s!btx:\s!list:\s!author:invertedfirst
     \ifnum\currentbtxauthorindex>\plusone
         \fastsetup{\s!btx:\s!list:\s!author:normal}
     \else
         \fastsetup{\s!btx:\s!list:\s!author:inverted}
     \fi
\stopsetups
```

Thanks again, Hans!

ok, i'll add these

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] PDF metadata and pdfx keys

2021-09-15 Thread Hans Hagen via ntg-context

On 9/15/2021 1:27 PM, kauśika cittūr via ntg-context wrote:

On Wednesday, September 15, 2021 8:08:34 AM IST kauśika cittūr wrote:

Dear all,

In my documents I use
\setupinteraction
 [
 author={AuthorName},
 title={MyTitle},
 subtitle={MySubtitle},
 ]
to set the document metadata. I also use
\startluacode
 local metadata = lpdf.getmetadata();
 metadata['producer']='author';
 metadata['creator']='author';
\stopluacode
to set the creator and producer. However, the document produced by ConTeXt
still has the user defined keys (pdfx:) written in the metadata. I have gone
through lpdf-xmp.lua, lpdf-ini.lua and back-ini.lua. Yet, I am not able to
figure out how to prevent the pdfx: tags from being written.

Is it possible to prevent them from being written? I prefer not to tamper
with any of the ConTeXt distribution files. In this case, is there
something I can do per-document to prevent these tags from being written?

Please advise.

Thanks,
kauśika


Dear all,

I hope my query is clear. For example when I run the command
pdfinfo -meta
on the generated PDF output, there are several 'pdfx:' tags in the XML output.

I am grateful for any help in this regard.
these run specific entries are 'hard coded' (as are those in fonts 
metadata)


(you can of course run the file through a script that replaces what you 
don't want (for some reason) by spaces, as long as the bytes stay at the 
same place)


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] Implementing a custom authorconversion for bibliographies

2021-09-15 Thread Hans Hagen via ntg-context
d" authorconversion for the first author
and the "normal" authorconversion for the rest.

In the newer bibl-bib.lua file, I can see what I might have to
modify to accomplish this (I added the if combiner ==
"invertedfirst"  block):

```
function authors.concat(author,combiner,what,settings)
     if type(combiner) == "string" then
         combiner = authors[combiner or "normal"] or authors.normal
     end
     local split = splitauthors(author)
     local setting = settings[what]
     local etallimit, etaldisplay, etaltext = 1000, 1000, ""
     if setting then
         etallimit   = settings.etallimit   or 1000
         etaldisplay = settings.etaldisplay or etallimit
         etalltext   = settings.etaltext    or ""
     end
     local max = #split
     if max > etallimit and etaldisplay < max then
         max = etaldisplay
     end
     if combiner == "invertedfirst" then
         for i=1,max do
             if i == 1 then
                 split[i] = authors.inverted(split[i],settings)
             else
                 split[i] = authors.normal(split[i],settings)
             end

         end
     else
         for i=1,max do
             split[i] = combiner(split[i],settings)
         end
     end
     local result = bibtexconcat(split,settings)
     if max < #split then
         return result
     else
         return result .. etaltext
     end
end
```

Unfortunately, this doesn't seem to do anything. It's not clear to
me how bibl-bib.lua and bibl-bib.mkiv are being used by the other
publication support modules, if they're being used at all
(publ-ini.mkiv doesn't appear to register it, anyway). Is there
another file I'd have to change to make "invertedfirst" a working
authorconversion? Is there a similar block of code in publ-ini.lua
where I should be implementing this change instead?

Thanks!

Joey


___
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] improve bad habits deduplicate redundant defined values

2021-09-15 Thread Hans Hagen via ntg-context

On 9/15/2021 8:40 AM, juh via ntg-context wrote:

Dear all,

these are quite general questions but here they come.

I defined modular styles for an organisation so that we can use
different layouts with the same look and feel but still have many
options to change things in a special document. I have styles for
colors, fonts which are used everywhere but also styles for heads that
are only used in legal context and other heads-styles used in other
contexts.  This works brilliant. I can even overwrite styles for one
document only.  I'd like to name this a cascading approach.

While doing this I learned a lot and changed the way the style files are
organised from time to time.

Currently I start with colors and fonts. Then comes the page dimension
definitions, makeups, headers and footers, headlines, the toc styles,
lists and tables.


the order sounds ok to me


Does anyone has a similar approach with a strong opinion how to organise
the cascade?


if you use xml, that one comes last


While working on this I often found that I defined something twice,
because I forgot to delete a setup-command in a newly structured file.

Is there a way to test this? Can I grep for a warning in the log files
to find these duplicates?

You can try this at the top:

%enabledirectives[overloadmode=warning]
\enabledirectives[overloadmode=error]

it's still sort of 'work in progress' (esp instances), so

\defineitemgroup[xxx]
\definehead[xxx]

will trigger an error (more commands will get the option to control what 
gets defined automatically)


you can work around warnings/errors with

\pushoverloadmode
  new definition
\popoverloadmode

bt keep in mind that some older settings can be persistent

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

2021-09-13 Thread Hans Hagen via ntg-context

On 9/13/2021 10:14 PM, Henning Hraban Ramm wrote:



Am 13.09.2021 um 11:12 schrieb Hans Hagen :

On 9/13/2021 10:37 AM, Henning Hraban Ramm wrote:

Am 13.09.2021 um 10:07 schrieb Hans Hagen via ntg-context :

Hi,

I uploaded a new lmtx (had forgotten to to it friday) . There are not that many 
visible changes but on is that i'm playing with some 'improvements' to inserts. 
Hopefully there are no side effects but the idea is to have somewhat better 
(more robust and predictable) support for e.g. footnotes in situations that are 
not natural to tex (like columns). The first mechanism to benefit from that is 
page columns but all that is a stepwise process. I keep track of that in yet 
another lowlevel manual. These column things are on the agenda for next month 
and beyond.

(In a next upload the new marking and tabulate optimization might become 
default but for now i test that locally.)

Hi, thank you!
I’m looking forward to these improvements, even if they won’t be in effect for 
my talk in Bassenge.
Running a project with this version, I get tons of messages like:
4:10:  
\penalty[userpenalty][color=1,colormodel=4,marks=334,snapmethod=3,breakpoint=1] 
1
4:10:  
\glue[userskip][color=1,colormodel=4,marks=334,snapmethod=3,breakpoint=1] 0.0pt 
plus 0.83287pt minus 0.41644pt
4:10:  
\penalty[userpenalty][color=1,colormodel=4,marks=334,snapmethod=3,breakpoint=1] 
1
4:10:  \glyph[32768][color=1,colormodel=4,marks=334,snapmethod=3,breakpoint=1], hyphenationmode 
"79F3F, options "80, font <36: lmmono10-regular @ 10.0pt>, glyph U+70 p
4:10:  
\penalty[userpenalty][color=1,colormodel=4,marks=334,snapmethod=3,breakpoint=1] 
1
Is this some debugging leftover or am I supposed to understand what’s wrong? ;)

hm, what command triggers that?


I don’t know yet. It seems to start in the middle of a section title in the 
first chapter of my book.


Oveefull boxes?


The footnotes unfortunately became only worse so far – often they’re 
overprinted by the running text, even without columns or grid.

I’ll try to come up with good examples, but this week is quite stuffed.

Ok.

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

2021-09-13 Thread Hans Hagen via ntg-context

On 9/13/2021 10:37 AM, Henning Hraban Ramm wrote:



Am 13.09.2021 um 10:07 schrieb Hans Hagen via ntg-context :

Hi,

I uploaded a new lmtx (had forgotten to to it friday) . There are not that many 
visible changes but on is that i'm playing with some 'improvements' to inserts. 
Hopefully there are no side effects but the idea is to have somewhat better 
(more robust and predictable) support for e.g. footnotes in situations that are 
not natural to tex (like columns). The first mechanism to benefit from that is 
page columns but all that is a stepwise process. I keep track of that in yet 
another lowlevel manual. These column things are on the agenda for next month 
and beyond.

(In a next upload the new marking and tabulate optimization might become 
default but for now i test that locally.)


Hi, thank you!

I’m looking forward to these improvements, even if they won’t be in effect for 
my talk in Bassenge.


Running a project with this version, I get tons of messages like:

4:10:  
\penalty[userpenalty][color=1,colormodel=4,marks=334,snapmethod=3,breakpoint=1] 
1
4:10:  
\glue[userskip][color=1,colormodel=4,marks=334,snapmethod=3,breakpoint=1] 0.0pt 
plus 0.83287pt minus 0.41644pt
4:10:  
\penalty[userpenalty][color=1,colormodel=4,marks=334,snapmethod=3,breakpoint=1] 
1
4:10:  \glyph[32768][color=1,colormodel=4,marks=334,snapmethod=3,breakpoint=1], hyphenationmode 
"79F3F, options "80, font <36: lmmono10-regular @ 10.0pt>, glyph U+70 p
4:10:  
\penalty[userpenalty][color=1,colormodel=4,marks=334,snapmethod=3,breakpoint=1] 
1

Is this some debugging leftover or am I supposed to understand what’s wrong? ;)

hm, what command triggers that?


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

2021-09-13 Thread Hans Hagen via ntg-context

Hi,

I uploaded a new lmtx (had forgotten to to it friday) . There are not 
that many visible changes but on is that i'm playing with some 
'improvements' to inserts. Hopefully there are no side effects but the 
idea is to have somewhat better (more robust and predictable) support 
for e.g. footnotes in situations that are not natural to tex (like 
columns). The first mechanism to benefit from that is page columns but 
all that is a stepwise process. I keep track of that in yet another 
lowlevel manual. These column things are on the agenda for next month 
and beyond.


(In a next upload the new marking and tabulate optimization might become 
default but for now i test that locally.)


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] positioning of metapost figure

2021-09-12 Thread Hans Hagen via ntg-context

On 9/12/2021 6:54 PM, Sylvain Hubert via ntg-context wrote:

Dear List,

The following code draws a circle at the center of the page, ignoring 
the "shifted" part.


\startuniqueMPgraphic{concept}
draw fullcircle scaled 1cm shifted (10cm,10cm);
\stopuniqueMPgraphic
\defineoverlay[concept][\uniqueMPgraphic{concept}]
\setupbackgrounds[page][background=concept]
\starttext
.
\stoptext

How should the metapost background figure be positioned correctly?


\startuniqueMPgraphic{concept}
StartPage;
draw fullcircle scaled 1cm shifted (10cm,10cm);
draw Page withpen pencircle scaled 5mm;
StopPage;
\stopuniqueMPgraphic

-
  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] ConTeXt inserts additional dots for Iosevka font

2021-09-12 Thread Hans Hagen via ntg-context

On 9/12/2021 9:45 AM, Wolfgang Schuster via ntg-context wrote:

Marcel Fabian Krüger via ntg-context schrieb am 12.09.2021 um 01:12:

Hi,

On Sun, Sep 12, 2021 at 12:01:08AM +0200, Hans Hagen wrote:

  \definefontfeature
    [default:test]
    [default]
    [cv36=2,cv26=6]

What is the number supposed to indicate ? It is not an alternate, right?

Actually it is an alternate, but only partially.


There is a table on the github page with the results from all alternatives.

Look at section "Character Variats" on https://github.com/be5invis/Iosevka

With fonts like that we might end up in issues anyway:

\definefontfeature[default:test][default][mlxx=yes,wflm=yes]
\definedfont[file:iosevka.ttc(Iosevka)*default:test] :> <>

e.g.

WFLMWolfram Language (Mathematica)

so we get font specific 4 char feature names that themselves have script 
/ language specifications (like latin default and cyrillic serbian 
wolfram) ... these could have been ss* features (after all, cv and ss 
are wildcards and opentype has never been that consistent), not that it 
matters much because it gets processed anyway, but it's a clear signal 
that anyone can roll out adn use any feature name


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] ConTeXt inserts additional dots for Iosevka font

2021-09-12 Thread Hans Hagen via ntg-context

On 9/12/2021 9:45 AM, Wolfgang Schuster via ntg-context wrote:

Marcel Fabian Krüger via ntg-context schrieb am 12.09.2021 um 01:12:

Hi,

On Sun, Sep 12, 2021 at 12:01:08AM +0200, Hans Hagen wrote:

  \definefontfeature
    [default:test]
    [default]
    [cv36=2,cv26=6]

What is the number supposed to indicate ? It is not an alternate, right?

Actually it is an alternate, but only partially.


There is a table on the github page with the results from all alternatives.

Look at section "Character Variats" on https://github.com/be5invis/Iosevka


  \definefont
    [SomeFont]
    [name:iosevka*default:test]


@Marcel: I suggest to load ttc fonts with the file option.

\starttext
\definedfont[file:iosevka.ttc(Iosevka)*none]Iosevka
\stoptext

as it experimental anyway, i changed this trick to

\definefontfeature[default:test][default][cvxx={repeatlast:3}]

repeatmiddle and repeatfirst also supported (it also permits context 
users to play with runtime feature definitions using multiples that act 
as extensibles)


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] ConTeXt inserts additional dots for Iosevka font

2021-09-11 Thread Hans Hagen via ntg-context

On 9/11/2021 10:36 PM, Marcel Fabian Krüger via ntg-context wrote:

Hi,

ConTeXt has some issues with the character variant features of the
Iosevka font available at
https://github.com/be5invis/Iosevka/releases/download/v10.1.1/super-ttc-iosevka-10.1.1.zip

E.g. the following document

 \definefontfeature
   [default:test]
   [default]
   [cv36=2,cv26=6]


What is the number supposed to indicate ? It is not an alternate, right?


 \definefont
   [SomeFont]
   [name:iosevka*default:test]
 \starttext
 \SomeFont
 I live in a dot-heavy world.
 \stoptext

has six dots instead of one dot over each "i". Tests with multiple other
font shapers and inspection of the font file confirmed that this is not
intentional behavior.

Could you take a look at that?
(Based on a luotfload bug report at
https://github.com/latex3/luaotfload/issues/202)
when a number is specified for a multiple and the is > 1 we repeat the 
last glyph ... this is a 'secret' feature that (already a while ago) we 
added when discussing / testing a experimental arabic font in 
combination with a paragraph optimizer ... normally users will say 'yes' 
and not give a number


i can make that a 'context only' feature if needed

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] Axis macro in MetaFun

2021-09-11 Thread Hans Hagen via ntg-context

On 9/11/2021 4:27 PM, kauśika cittūr via ntg-context wrote:

Dear All,

I am truly grateful for the new additions to MetaFun. It has greatly helped me
in producing neat drawings for my academic work. In this connection, I have a
few queries.

Currently I am using PGFPlots (with ConTeXt) to draw simple plots from CSV
data. I was wondering if there is any way to do the same in MetaFuns. That is,
is it possible to do something like the following in order to obtain a line
plot of the values in the 'data.csv' file? Also is it possible to have the
'labels' be the identical for all points in a given list?

\startMPcode
   draw lmt_axis [
   sx = 2mm, sy = 2mm,
   nx = 80, ny = 40,
   tx = 15, ty = 15,
   
   list = {

 [
   connect = true,
   color = "darkblue",
   close = true,
   points = {data.csv},
   labels = {"•"},
 ]
   },
   ] withpen pencircle scaled 0.5mm;
\stopMPcode



It depends on how one has data in the csv, You can patch mlib-scn.lmt 
(line 659)


if type(v) == "table" then
return injectpath(v,connector,close)
elseif type(v) == "string" then
local code = load("return " .. v)
if code then
return code()
end
else
return injectpair(0,0)
end

then a string represents a function:

\starttext

\startluacode
io.savedata("temp.csv", "x,y\n10,10\n20,40\n30,30\n")

local mycsvsplitter = utilities.parsers.rfc4180splitter()

function MP.MyPoints(name)
local data = io.loaddata(name)
local list = mycsvsplitter(data)
table.remove(list,1)
for i=1,#list do
list[i][1] = tonumber(list[i][1])
list[i][2] = tonumber(list[i][2])
end
mp.inject.path(list)
end

\stopluacode

\startMPcode
  draw lmt_axis [
  sx = 2mm, sy = 2mm,
  nx = 80, ny = 40,
  tx = 15, ty = 15,

  list = {
[
  connect = true,
  color = "darkblue",
  close = true,
  points = "MP.MyPoints('temp.csv')",
  labels = {"•"},
]
  },
  ] withpen pencircle scaled 0.5mm;
\stopMPcode

\stoptext

we can of course have some predefined and when we can agree on how these 
files loo, adding a "csv" is no big deal ... it's all about consistent 
interfacing



-----
  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] Axis macro in MetaFun

2021-09-11 Thread Hans Hagen via ntg-context

On 9/11/2021 4:27 PM, kauśika cittūr via ntg-context wrote:


My final query: is it possible to specify a co-ordinate transform for any/all
of the axes? For instance in my work, I would like to plot the y-axis in the
log-scale.
Alan is working on that when he is in distraction mode ... we have done 
some preparations already.


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
___


<    7   8   9   10   11   12   13   14   15   16   >