[NTG-context] MetaFun path joiners && and &&&& do not like single point paths

2023-12-30 Thread Gavin via ntg-context
Hi MetaFun fans, Following a suggestion of Hans, I experimented with && and &&& and for joining paths in MetaFun. The joiner &&& produces one long path, but && and seem to produce a disconnected path which includes all the original paths. However, if one of the paths is a single

Re: [NTG-context] metafun paralleled does not give a parallel path

2022-08-25 Thread Hans Hagen via ntg-context
On 8/25/2022 6:05 PM, Bruce Horrocks via ntg-context wrote: I'm seeing the line + arcs behaviour here. fixed in upload (we had a bug in mplib .. direction is now a primitive so that one was wrong) Hans -

Re: [NTG-context] metafun paralleled does not give a parallel path

2022-08-25 Thread Bruce Horrocks via ntg-context
I'm seeing the line + arcs behaviour here. ConTeXt ver: 2022.08.05 11:44 LMTX fmt: 2022.8.5 int: english/english > On 25 Aug 2022, at 13:03, Fabrice L via ntg-context > wrote: > > Hi, > >> Le 24 août 2022 à 22:50, fv leung via ntg-context a >> écrit : >> >> The following used to

Re: [NTG-context] metafun paralleled does not give a parallel path

2022-08-25 Thread Fabrice L via ntg-context
Hi,Le 24 août 2022 à 22:50, fv leung via ntg-context a écrit :The following used to produce three parallel lines.Now it produces one straight line and two arcs.\starttext\startMPcode  z0 = origin;  z1 = 72dir(45);  dotlabel.bot("z0", z0);  draw z0--z1;  draw (z0--z1)

[NTG-context] metafun paralleled does not give a parallel path

2022-08-24 Thread fv leung via ntg-context
The following used to produce three parallel lines. Now it produces one straight line and two arcs. \starttext \startMPcode z0 = origin; z1 = 72dir(45); dotlabel.bot("z0", z0); draw z0--z1; draw (z0--z1) paralleled -15 withcolor red; draw (z0--z1) paralleled 15 withcolor blue;

[NTG-context] MetaFun keywords extracted by mtxrun --script interface

2022-08-10 Thread Nicola via ntg-context
I am updating Vim syntax coloring for Metapost/MetaFun, which is now based on the files that are automatically generated with mtxrun --script interface --vim To test the results, I am opening ConTeXt's own MetaPost files in the editor and check how they look. It seems that the output of the

Re: [NTG-context] Metafun hexagons aren't hexagons

2022-07-21 Thread Alan via ntg-context
On Thu, 21 Jul 2022 18:51:23 +0200 Hans Hagen via ntg-context wrote: > On 7/21/2022 5:56 AM, Alan via ntg-context wrote: > > On Wed, 20 Jul 2022 15:26:53 -0600 > > Max Chernoff via ntg-context wrote: > > > >> The recently added Metafun hexagons seem to be producing octagons > >> instead: > >>

Re: [NTG-context] Metafun hexagons aren't hexagons

2022-07-21 Thread Hans Hagen via ntg-context
On 7/21/2022 5:56 AM, Alan via ntg-context wrote: On Wed, 20 Jul 2022 15:26:53 -0600 Max Chernoff via ntg-context wrote: The recently added Metafun hexagons seem to be producing octagons instead: \startMPpage fill fullhexagon scaled 100; draw unithexagon scaled 50

Re: [NTG-context] Metafun hexagons aren't hexagons

2022-07-20 Thread Alan via ntg-context
On Wed, 20 Jul 2022 15:26:53 -0600 Max Chernoff via ntg-context wrote: > The recently added Metafun hexagons seem to be producing octagons > instead: > >\startMPpage >fill fullhexagon scaled 100; >draw unithexagon scaled 50 withcolor white; >\stopMPpage Of course, for

[NTG-context] Metafun hexagons aren't hexagons

2022-07-20 Thread Max Chernoff via ntg-context
Hi, The recently added Metafun hexagons seem to be producing octagons instead: \startMPpage fill fullhexagon scaled 100; draw unithexagon scaled 50 withcolor white; \stopMPpage -- Max ___ If

Re: [NTG-context] Metafun : save memory content ?

2022-07-19 Thread Fabrice L via ntg-context
Dear Bruce, dear list, > Le 19 juill. 2022 à 07:42, Bruce Horrocks a écrit : > >> On 19 Jul 2022, at 04:28, Fabrice L via ntg-context >> wrote: >> >> Complementary question : I saw that the « pos_a » « pos_b » of the example >> could not take numerical value, for example pos_1, pos_2.. How

Re: [NTG-context] Metafun : save memory content ?

2022-07-19 Thread Bruce Horrocks via ntg-context
> On 19 Jul 2022, at 04:28, Fabrice L via ntg-context > wrote: > > Complementary question : I saw that the « pos_a » « pos_b » of the example > could not take numerical value, for example pos_1, pos_2.. How can I use > metafun to write a macro to save the contents of hundreds of variable in

Re: [NTG-context] Metafun : save memory content ?

2022-07-18 Thread Fabrice L via ntg-context
> Le 18 juill. 2022 à 12:31, Hans Hagen via ntg-context a > écrit : > > On 7/18/2022 3:20 PM, Fabrice L via ntg-context wrote: >> Dear list, >> I’m doing animations in MetaFun, by simply using \startMPpage (…) >> \stopMPpage for each frame of the animation. Here is an example: >>

Re: [NTG-context] Metafun : save memory content ?

2022-07-18 Thread Hans van der Meer via ntg-context
Storing in a memory block in the computers' internal memory would be super, of course. But I am afraid that is asking a bit too much;-) dr. Hans van der Meer > On 18 Jul 2022, at 18:31, Hans Hagen via ntg-context > wrote: > > On 7/18/2022 3:20 PM, Fabrice L via ntg-context wrote: >> Dear

Re: [NTG-context] Metafun : save memory content ?

2022-07-18 Thread Hans Hagen via ntg-context
On 7/18/2022 3:20 PM, Fabrice L via ntg-context wrote: Dear list, I’m doing animations in MetaFun, by simply using \startMPpage (…) \stopMPpage for each frame of the animation. Here is an example: https://youtu.be/yhxUbVQx9Uo (please note you can watch it in HD by adjusting the setting in

Re: [NTG-context] Metafun : save memory content ?

2022-07-18 Thread Hans Hagen via ntg-context
On 7/18/2022 4:39 PM, Henning Hraban Ramm via ntg-context wrote: Am 18.07.22 um 15:20 schrieb Fabrice L via ntg-context: Dear list, I’m doing animations in MetaFun, by simply using \startMPpage (…) \stopMPpage for each frame of the animation. Here is an example: https://youtu.be/yhxUbVQx9Uo

Re: [NTG-context] Metafun : save memory content ?

2022-07-18 Thread Henning Hraban Ramm via ntg-context
Am 18.07.22 um 15:20 schrieb Fabrice L via ntg-context: Dear list, I’m doing animations in MetaFun, by simply using \startMPpage (…) \stopMPpage for each frame of the animation. Here is an example: https://youtu.be/yhxUbVQx9Uo (please note you can watch it in HD by adjusting the setting in

[NTG-context] Metafun : save memory content ?

2022-07-18 Thread Fabrice L via ntg-context
Dear list, I’m doing animations in MetaFun, by simply using \startMPpage (…) \stopMPpage for each frame of the animation. Here is an example: https://youtu.be/yhxUbVQx9Uo (please note you can watch it in HD by adjusting the setting in YouTube). This works usually great, but when the number of

[NTG-context] MetaFun manual's "texvar" is not working for me

2022-05-21 Thread Gavin via ntg-context
Hello list, I’m trying to reproduce the positional graphics examples in the MetaFun manual on pp. 151-153. There are two examples of code for the mpos:box. The first example uses \MPvar to retrieve variables set using \setupMPvariables. This works fine. The second example uses texvar to

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-21 Thread Willi Egger via ntg-context
Hello Wolfgang, thank you so much for your time and investigation. — Indeed your solution works fine! I use the latest version from March 2022. I use \startbodymatter cum suis. Lieber Gruß Willi > On 20 Mar 2022, at 17:21, Wolfgang Schuster via ntg-context > wrote: > > Willi Egger via

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Wolfgang Schuster via ntg-context
Willi Egger via ntg-context schrieb am 20.03.2022 um 17:05: Hoi Wolfgang, I tested both variants (bodymatter and bodypart. The compilation runs through, however without the thumb-picture in the margin and the metafun error is in the log. 1. Do you use \startfrontmatter and \startbodymatter

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Willi Egger via ntg-context
Hoi Wolfgang, I tested both variants (bodymatter and bodypart. The compilation runs through, however without the thumb-picture in the margin and the metafun error is in the log. Gruß! Willi > On 20 Mar 2022, at 17:00, Wolfgang Schuster via ntg-context > wrote: > > Willi Egger via

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Wolfgang Schuster via ntg-context
Willi Egger via ntg-context schrieb am 20.03.2022 um 16:53: Hoi Wolfgang! thank you for your suggestion. Your example indeed works. However if I apply this to my situation, which is \startsectionblockenvironment[bodymatter] You use the wrong name for the argument:

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Willi Egger via ntg-context
Hoi Wolfgang! thank you for your suggestion. Your example indeed works. However if I apply this to my situation, which is \startsectionblockenvironment[bodymatter] \setups{Thumb-pictures} \stopsectionblockenvironment nothing happens. I.e. I get no error, but also no picture,

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Willi Egger via ntg-context
Hi Otared, thank you for your help. — I tried your approach aswel on my Mac as also on Linux. Unfortunately neither installation did give me a positive result. The error remains. Kind regards Willi > On 19 Mar 2022, at 23:39, Otared Kavian via ntg-context > wrote: > > Hi Willi, > > How

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Wolfgang Schuster via ntg-context
Willi Egger via ntg-context schrieb am 19.03.2022 um 21:42: Hello Otared, thanks so much for your testing and comments. — Tthe problem is, that this thumb-picture should only be placed in the \startboydmatter..\stopbodymatter sections. In the case of this book however there are the title

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-19 Thread Otared Kavian via ntg-context
Hi Willi, How about invoking the command \setups{Thumb-pictures} between a \start \stop pair as in the following: \showframe \starttext \startfrontmatter \startchapter[title=Test A] \samplefile{knuth} \stopchapter \stopfrontmatter %\page[yes] \start \setups{Thumb-pictures}

[NTG-context] Metafun, difficulty with graphical element in the margin, again.

2022-03-19 Thread Willi Egger via ntg-context
Hello, I am a little desperate… I have installed in a new directory the latest version of ConTeXt. I run the sample file I provided before. After enabling a second chapter-section before the \setups{Thumb-picture} the metafun error reoccurs. — Looking at the log I do net get really wiser,

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-19 Thread Willi Egger via ntg-context
Hello Otared, thanks so much for your testing and comments. — Tthe problem is, that this thumb-picture should only be placed in the \startboydmatter..\stopbodymatter sections. In the case of this book however there are the title pages and quite some text including the TOC in the

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-19 Thread Otared Kavian via ntg-context
Hi Willi, Your test file works fine if I place \setups{Thumb-pictures} before \starttext (using version 2022.03.12 17:56 LMTX). However in the file you sent the choice of the command \setups{Thumb-pictures} is between chapter A and B, which seems starnge to me... Best regards:

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-19 Thread Hans Hagen via ntg-context
On 3/18/2022 8:29 PM, Willi Egger via ntg-context wrote: Good evening! I have a dictionary where I would like to include thumb-pictures in the margin. — When I use the attached code with a single \startchapter...\stopchapter, it works. However if I add another \startchapter…\stopchapter

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-18 Thread śrīrāma via ntg-context
On Saturday, March 19, 2022 12:59 AM Willi Egger via ntg-context wrote: > Could someone try to compile? I have compiled your test file with both the below versions : • mtx-context | current version: 2022.01.21 20:13 • mtx-context | current version: 2022.03.12 17:56 In both cases, no

[NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-18 Thread Willi Egger via ntg-context
Good evening! I have a dictionary where I would like to include thumb-pictures in the margin. — When I use the attached code with a single \startchapter...\stopchapter, it works. However if I add another \startchapter…\stopchapter before loading the setups for the thumb-picture metafun throws

[NTG-context] MetaFun: textext.origin, thelabel.origin not positioned on baseline

2022-01-13 Thread Gavin via ntg-context
Hello again List, Now I’m making diagrams using MetaFun. The MetaFun manual describes an “origin” option for positioning textext’s and label’s on the baseline. However, this dose not appear to be happening with the code in the manual (below). In fact, the diagram in the manual dose not show

Re: [NTG-context] [MetaFun] Trying to understand outlinetext, 'stretch' effect and \kerncharacters

2022-01-01 Thread kauśika via ntg-context
On Saturday, January 1, 2022 3:45:36 PM IST Hans Hagen wrote: > \starteffect is kind of old (comes from mkii), but you could use the > pseudo font feature effect in mkiv / lmtx which then makes a real font > instance instead of mixing in some pdf magic Thanks for the explanations Hans! Happy new

Re: [NTG-context] [MetaFun] Trying to understand outlinetext, 'stretch' effect and \kerncharacters

2022-01-01 Thread Hans Hagen via ntg-context
On 12/31/2021 3:13 AM, kauśika via ntg-context wrote: Dear list, I have the following graphic \startuseMPgraphic{TitleGraphic} draw outlinetext.b (\MPstring{TitleText}) (withcolor "titlefg") (withcolor "titleoutline"); \stopuseMPgraphic which I tried to use as follows to produce a

Re: [NTG-context] [MetaFun] Trying to understand outlinetext, 'stretch' effect and \kerncharacters

2021-12-30 Thread kauśika via ntg-context
On Friday, December 31, 2021 7:43:21 AM IST kauśika wrote: > Dear list, > > I have the following graphic > > \startuseMPgraphic{TitleGraphic} > draw outlinetext.b (\MPstring{TitleText}) > (withcolor "titlefg") > (withcolor "titleoutline"); > \stopuseMPgraphic > > which I tried to use as

[NTG-context] [MetaFun] Trying to understand outlinetext, 'stretch' effect and \kerncharacters

2021-12-30 Thread kauśika via ntg-context
Dear list, I have the following graphic \startuseMPgraphic{TitleGraphic} draw outlinetext.b (\MPstring{TitleText}) (withcolor "titlefg") (withcolor "titleoutline"); \stopuseMPgraphic which I tried to use as follows to produce a stylized 'title' head: \setupMPtext{TitleText}{%

Re: [NTG-context] metafun: circular arc

2021-10-05 Thread Floris van Manen via ntg-context
In the example the text is drawn as: draw followtext(q, "\strut TEXT ONE") it looks as if the \strut generates a space before the text. e.g. if you omit the \strut, the text will align at the start point. In my perception, the \strut is a zero width box, so it should not generate the space

Re: [NTG-context] metafun: circular arc

2021-10-05 Thread Thomas A. Schmitz via ntg-context
Thank you so much, Hans, that's a neat solution! I was banging my head against the wall, but this makes sense. On 10/5/21 6:38 PM, Hans Hagen wrote: Because you know how to rotate and scale: \startuseMPgraphic{empedocless} path p, q, r ; pair a ; p := fullcircle scaled 10cm ; drawarrow p   

Re: [NTG-context] metafun: circular arc

2021-10-05 Thread Hans Hagen via ntg-context
On 10/5/2021 4:58 PM, Thomas A. Schmitz via ntg-context wrote: Hi all, I hope the following example is not too convoluted: \useMPlibrary [txt] \define\EmpArrow{\getscaledglyph{1.6}{name:dejavumath}{\char"2B05}} \setupbodyfont [ss,9pt] \starttext \startuseMPgraphic{empedocles} %numeric a ;

[NTG-context] metafun: circular arc

2021-10-05 Thread Thomas A. Schmitz via ntg-context
Hi all, I hope the following example is not too convoluted: \useMPlibrary [txt] \define\EmpArrow{\getscaledglyph{1.6}{name:dejavumath}{\char"2B05}} \setupbodyfont [ss,9pt] \starttext \startuseMPgraphic{empedocles} %numeric a ; a = 6.56cm ; %numeric b ; b = 1.1 ; save S; path S[] ; S[1] =

[NTG-context] MetaFun : textext.dflt / textext.dlft and MkIV / LMTX

2021-09-05 Thread Garulfo via ntg-context
Hi, After https://mailman.ntg.nl/pipermail/ntg-context/2021/102052.html It seems that there is no backward compatibility between MkIV and LMTX for textext.dflt (MVE below) | MkIV | LMTX | -|---|--| textext.dflt | OK | KO | as DefauLT (unlike ulft

Re: [NTG-context] metafun doesn't compile \root 3 \of 2

2021-09-03 Thread Hans Hagen via ntg-context
On 9/3/2021 11:48 AM, fv leung via ntg-context wrote: \starttext \m{\root3\of2} \stoptext works. But \starttext \startMPcode   label("\m{\root3\of2}", origin); \stopMPcode \stoptext doesn't. draw thetextext("\m{\root3\of2}",origin); labels are done in the default (normally monospace)

[NTG-context] metafun doesn't compile \root 3 \of 2

2021-09-03 Thread fv leung via ntg-context
\starttext \m{\root3\of2} \stoptext works. But \starttext \startMPcode label("\m{\root3\of2}", origin); \stopMPcode \stoptext doesn't. Running `LuaMetaTeX' on `trial' with ``/home/fvleung/ConTeXt/tex/texmf-linux-64/bin/mtxrun --autogenerate --script context trial.tex'' resolvers

Re: [NTG-context] metafun transformation error

2021-06-04 Thread Ajith R
Hi, > here a ; is missing after the q That was a silly mistake while making the MWE.  When I corrected it, the MWE compiled correctly. However, the original code didn't have that error and wouldn't compile. So, I tried another MWE and found out what was causing the error. In the array I

Re: [NTG-context] metafun transformation error

2021-06-04 Thread Hans Hagen
On 6/4/2021 5:08 PM, Ajith R wrote: Hi, here a ; is missing after the q That was a silly mistake while making the MWE. When I corrected it, the MWE compiled correctly. However, the original code didn't have that error and wouldn't compile. So, I tried another MWE and found out what was

Re: [NTG-context] metafun transformation error

2021-06-04 Thread Ajith R
Hi, > In order answer that you have to make a MWE that we can run without the > need to edit a file. > Hans Sorry for having assumed that sharing the code was sufficient as MWE. Here is the trimmed version that still throws the error  \startMPpage StartPage ; numeric row, col, unit; 

Re: [NTG-context] metafun transformation error

2021-06-04 Thread Hans Hagen
On 6/4/2021 1:25 PM, Ajith R wrote: Hi, In order answer that you have to make a MWE that we can run without the need to edit a file. Hans Sorry for having assumed that sharing the code was sufficient as MWE. Here is the trimmed version that still throws the error \startMPpage

[NTG-context] metafun transformation error

2021-06-04 Thread Ajith R
Hi all, I am new to context and need help in solving an error. I am trying to print some numbers in a grid onto a transparent sheet as mirror images so that the numbers are correctly displayed when I view it from the non printed side. The numbers have a particular sequence which cannot be

Re: [NTG-context] metafun transformation error

2021-06-04 Thread Hans Hagen
On 6/4/2021 10:15 AM, Ajith R wrote: Hi all, I am new to context and need help in solving an error. I am trying to print some numbers in a grid onto a transparent sheet as mirror images so that the numbers are correctly displayed when I view it from the non printed side. The numbers have a

Re: [NTG-context] [metafun example does not compile]

2021-05-21 Thread Floris van Manen
On 21/05/2021 14:14, Taco Hoekwater wrote: It looks like textext.dflt is undefined in the latest lmtx because it is now renamed to textext.dlft :) As we say in dutch: een kniesoor die daar op let ;-) ___ If your

Re: [NTG-context] [metafun example does not compile]

2021-05-21 Thread Floris van Manen
the line preventing the output from showing uo seems to be be: draw textext.dflt("DFLT-" & MonTexte) shifted PB; If I remove that, I'll get output. ___ If your question is of interest to others as well, please add

Re: [NTG-context] [metafun example does not compile]

2021-05-21 Thread Taco Hoekwater
Hi, It looks like textext.dflt is undefined in the latest lmtx because it is now renamed to textext.dlft :) > On 21 May 2021, at 14:03, Floris van Manen wrote: > > Using the example from the wiki > https://wiki.contextgarden.net/textext_positioning > > then using the latest version of lmtx >

[NTG-context] [metafun example does not compile]

2021-05-21 Thread Floris van Manen
Using the example from the wiki https://wiki.contextgarden.net/textext_positioning then using the latest version of lmtx $ context --version mtx-context | ConTeXt Process Management 1.04 mtx-context | mtx-context | main context file:

Re: [NTG-context] metafun / patterns

2021-03-25 Thread Aditya Mahajan
On Thu, 25 Mar 2021, Hans Hagen wrote: > Hi, > > As I'm still in metafun (and svg) mode I decided to support patterns > (that are already supported at the tex end) also in metafun. As there > has never been demands I suppose it's not that interesting but it sort > of fits in. > > There are

Re: [NTG-context] metafun / patterns

2021-03-25 Thread mf
Sorry for the noise, my fault: Thunderbird replaced some semicolon combinations with emojis, so they were missing when I copied and pasted them in a source file. Massi Il 25/03/21 15:14, mf ha scritto: Il 25/03/21 14:11, Hans Hagen ha scritto: \startMPpage[offset=1cm] draw (fullcircle

Re: [NTG-context] metafun / patterns

2021-03-25 Thread mf
Il 25/03/21 14:11, Hans Hagen ha scritto: \startMPpage[offset=1cm]     draw (fullcircle scaled 5cm shifted (0cm,0cm))     withpattern image (fill fullcircle scaled 1cm withcolor "darkblue" ;)     withpatternscale (1/10,1/10)     ;     draw (fullcircle scaled 5cm shifted

[NTG-context] metafun / patterns

2021-03-25 Thread Hans Hagen
Hi, As I'm still in metafun (and svg) mode I decided to support patterns (that are already supported at the tex end) also in metafun. As there has never been demands I suppose it's not that interesting but it sort of fits in. There are some tricky aspectx involved so the interface might

Re: [NTG-context] metafun

2021-02-20 Thread Hans Hagen
On 2/20/2021 6:43 PM, Otared Kavian wrote: Thanks for the new upload. For your information, I would like to report that the metafun.tex file typesets almost corretly (actually I often typeset it for testing a new upload…) but I get a PDF with 400 pages instead the 448 you are mentionning…

Re: [NTG-context] metafun

2021-02-20 Thread Otared Kavian
Hi Hans, Thanks for the new upload. For your information, I would like to report that the metafun.tex file typesets almost corretly (actually I often typeset it for testing a new upload…) but I get a PDF with 400 pages instead the 448 you are mentionning… The issues are typically some figures

[NTG-context] metafun

2021-02-20 Thread Hans Hagen
Hi, When making sure that the metafun manual processes with lmtx (where we have sometimes different implementations of macros) I also checked performance. When we started with this manual, it was still MKII time so we either had direct calls or inbetween calls. Especially multiple runs

[NTG-context] Metafun: dotlabel issue in latest LMTX

2020-12-27 Thread Otared Kavian
Hi Hans, The following (due to you and Aditya, discussed a few days ago) used to work with LMTX until version 2020-12-10, but it does not work anymore with LMTX version 2020-12-24 17:30. I wonder whether this is due to some changes you have made recently. %% begin squaredot-test.tex

Re: [NTG-context] MetaFun labels and xsized

2020-12-25 Thread Pablo Rodriguez
On 12/25/20 10:09 PM, Hans Hagen wrote: >> [...] > \startMPcode > path p ; p := ( > ( 1, 1) -- > ( 1, 5) -- > (10, 10) -- > (14, 4) -- > cycle) xsized .75TextWidth; > > draw p ; > > freelabel("\strut α",point 0 of p,center p) ; >

Re: [NTG-context] MetaFun labels and xsized

2020-12-25 Thread Hans Hagen
On 12/25/2020 6:36 PM, Fabrice L wrote: Hi, Le 25 déc. 2020 à 12:30, Pablo Rodriguez a écrit : Dear list, I have this minimal MetaFun sample (the only one in my real document): \setupbodyfont[pagella] \starttext \startMPcode pair a ; a := (1, 1) ; pair b ; b := (1, 10) ; pair c

Re: [NTG-context] MetaFun labels and xsized

2020-12-25 Thread Pablo Rodriguez
On 12/25/20 6:36 PM, Fabrice L wrote: >> I have this minimal MetaFun sample (the only one in my real document): >> [...] >> Is there a way to relate adapt the labels to the xsized positions used? > > I’m sure somebody could find a more elegant solution, but here is a simple > one: > >

Re: [NTG-context] MetaFun labels and xsized

2020-12-25 Thread Fabrice L
Hi, > Le 25 déc. 2020 à 12:30, Pablo Rodriguez a écrit : > > Dear list, > > I have this minimal MetaFun sample (the only one in my real document): > > \setupbodyfont[pagella] > \starttext > \startMPcode > pair a ; a := (1, 1) ; > pair b ; b := (1, 10) ; > pair c ; c := (10, 10) ; >

[NTG-context] MetaFun labels and xsized

2020-12-25 Thread Pablo Rodriguez
Dear list, I have this minimal MetaFun sample (the only one in my real document): \setupbodyfont[pagella] \starttext \startMPcode pair a ; a := (1, 1) ; pair b ; b := (1, 10) ; pair c ; c := (10, 10) ; pair d ; d := (10, 1) ; draw (a--b--c--d--a) xsized .75TextWidth; draw

Re: [NTG-context] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-24 Thread Garulfo
Much more lean now thanks to your feedbacks. I prefered to "remove the shapes of the letter" rather than doubling the shading. Wikified https://wiki.contextgarden.net/Cover_Pages#.22Empty.22_letters \definecolor [ColorHighA] [h=c4a000] \definecolor [ColorHighB] [h=602217] \definecolor

Re: [NTG-context] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-24 Thread Taco Hoekwater
> On 24 Dec 2020, at 00:14, Garulfo wrote: > > Thanks Taco, > > I made some progress : > https://wiki.contextgarden.net/Talk:Cover_Pages > > I now have two additional questions ... ;-) > > - How can I deal with "space" characters (because current solution > requires to explicitly add the ~

Re: [NTG-context] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-23 Thread Hans Hagen
On 12/24/2020 12:46 AM, Otared Kavian wrote: Hi Garulfo, Thank you for sharing your nice example: it typesets correctly with mkiv, but it seems to me that with LMTX the text does not appear (at least on my installation of the latest LMTX). I admit that I had to trial and error this:

Re: [NTG-context] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-23 Thread Hans Hagen
On 12/24/2020 12:14 AM, Garulfo wrote: Thanks Taco, I made some progress : https://wiki.contextgarden.net/Talk:Cover_Pages I now have two additional questions ... ;-) - How can I deal with "space" characters (because current solution   requires to explicitly add the ~ character) - What

Re: [NTG-context] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-23 Thread Otared Kavian
Hi Garulfo, Thank you for sharing your nice example: it typesets correctly with mkiv, but it seems to me that with LMTX the text does not appear (at least on my installation of the latest LMTX). Best regards: Otared > On 24 Dec 2020, at 00:14, Garulfo wrote: > > Thanks Taco, > > I made

Re: [NTG-context] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-23 Thread Garulfo
Thanks Taco, I made some progress : https://wiki.contextgarden.net/Talk:Cover_Pages I now have two additional questions ... ;-) - How can I deal with "space" characters (because current solution requires to explicitly add the ~ character) - What would be the work to do in order to make this

Re: [NTG-context] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-21 Thread Taco Hoekwater
> On 21 Dec 2020, at 16:09, Garulfo wrote: > > Hi, > > > * I try to "remove the paths of text" from a metapost pictures to let > the background visible. > > * Using > https://mailman.ntg.nl/pipermail/ntg-context/2018/thread.html#92725 > > * I was able to get the following with one glyph

[NTG-context] MetaFun - "remove the paths of text" from a rectangle to let the background visible

2020-12-21 Thread Garulfo
Hi, * I try to "remove the paths of text" from a metapost pictures to let the background visible. * Using https://mailman.ntg.nl/pipermail/ntg-context/2018/thread.html#92725 * I was able to get the following with one glyph (MVE code below)

Re: [NTG-context] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Hans Hagen
On 12/10/2020 8:37 PM, Aditya Mahajan wrote: On Thu, 10 Dec 2020, Hans Hagen wrote: dotlabel uses a pen to draw the dot, and I am not sure why it uses that rather than a path. Here is a (to me) simpler definition, where you can change the shape: just look in the pdf ... in your case the dot

Re: [NTG-context] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Aditya Mahajan
On Thu, 10 Dec 2020, Hans Hagen wrote: > > dotlabel uses a pen to draw the dot, and I am not sure why it uses that > > rather > > than a path. Here is a (to me) simpler definition, where you can change the > > shape: > > just look in the pdf ... in your case the dot is a n point path while >

Re: [NTG-context] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Hans Hagen
On 12/10/2020 7:04 PM, Aditya Mahajan wrote: On Thu, 10 Dec 2020, Otared Kavian wrote: Hi Aditya, Thank you very much ! That's great indeed, you gave me an elegant solution. One more question, in order for me to understand a little more: when defining a new dotlabel as you do, might it not

Re: [NTG-context] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Hans Hagen
On 12/10/2020 6:44 PM, Aditya Mahajan wrote: On Thu, 10 Dec 2020, Otared Kavian wrote: Hi all, In Metafun when representing a point I woul dlike to have some dots represented by a square (or even by another scalable symbol): for instance in the following I would like the dot at the point B

Re: [NTG-context] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Aditya Mahajan
On Thu, 10 Dec 2020, Otared Kavian wrote: > Hi Aditya, > Thank you very much ! > That's great indeed, you gave me an elegant solution. > > One more question, in order for me to understand a little more: when defining > a new dotlabel as you do, might it not conflict with the internal

Re: [NTG-context] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Otared Kavian
Hi Aditya, Thank you very much ! That's great indeed, you gave me an elegant solution. One more question, in order for me to understand a little more: when defining a new dotlabel as you do, might it not conflict with the internal definitions of dotlabel in Metafun in some other place? Maybe

Re: [NTG-context] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Aditya Mahajan
On Thu, 10 Dec 2020, Otared Kavian wrote: > Hi all, > > In Metafun when representing a point I woul dlike to have some dots > represented by a square (or even by another scalable symbol): for instance in > the following I would like the dot at the point B to be a square: > > \starttext >

[NTG-context] Metafun: is it possible to redefine dotlabel to draw a square ?

2020-12-10 Thread Otared Kavian
Hi all, In Metafun when representing a point I woul dlike to have some dots represented by a square (or even by another scalable symbol): for instance in the following I would like the dot at the point B to be a square: \starttext \startMPcode draw (2cm,3cm) -- (3cm,5cm) ;

Re: [NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Hans Hagen
On 12/9/2020 9:38 PM, Aditya Mahajan wrote: Or just redefine shortened to accept a pair! \startMPdefinitions primarydef p shortened d = reverse ( ( reverse (p enlonged -xpart paired(d)) ) enlonged -ypart paired(d) ) enddef ; \stopMPdefinitions patched but then also: primarydef p

Re: [NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Otared Kavian
Thanks Aditya! One can learn a lot with your answers ! In the Metafun manual I see enlonged but I did not know to use it. Best regards: Otared > On 9 Dec 2020, at 21:38, Aditya Mahajan wrote: > > On Wed, 9 Dec 2020, Otared Kavian wrote: > >> Hi Aditya, >> >> Thanks for the alternative

Re: [NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Aditya Mahajan
On Wed, 9 Dec 2020, Otared Kavian wrote: > Hi Aditya, > > Thanks for the alternative method, which comes handy if one wishes to extend > the straight line by a different amount at either end: > > \starttext > \startMPcode >z1 = (1cm,3cm) ; >z2 = (5cm, 9cm) ; >z3 = 1cm * dir(angle

Re: [NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Otared Kavian
Hi Aditya, Thanks for the alternative method, which comes handy if one wishes to extend the straight line by a different amount at either end: \starttext \startMPcode z1 = (1cm,3cm) ; z2 = (5cm, 9cm) ; z3 = 1cm * dir(angle (z2 - z1)) shifted z2 ; z4 = -.5cm*dir(angle(z2 - z1))

Re: [NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Aditya Mahajan
On Wed, 9 Dec 2020, Otared Kavian wrote: > Thanks a lot ! Indeed that does the job, which shows how wonderful Metafun is > ! Or, if you want to use high school algebra: \starttext \startMPcode z1 = (1cm,3cm) ; z2 = (5cm, 9cm) ; z3 = 1cm * dir(angle (z2 - z1)) shifted z2; draw

Re: [NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Otared Kavian
Hi Fabrice, Thanks a lot ! Indeed that does the job, which shows how wonderful Metafun is ! Best regards: Otared > On 9 Dec 2020, at 17:19, Fabrice L wrote: > > Hi, > >> Le 9 déc. 2020 à 10:57, Otared Kavian a écrit : >> >> Hi, >> >> I have a silly question: given two points in the plane

Re: [NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Fabrice L
Hi, > Le 9 déc. 2020 à 10:57, Otared Kavian a écrit : > > Hi, > > I have a silly question: given two points in the plane > z1 = (1cm,3cm) ; > z2 = (5cm, 9cm) ; > the command > draw z1 -- z2 withpen pencircle scaled .5pt ; > draws the line segment joining z1 and z2. How could

[NTG-context] Metafun: how to draw a straight line past the end points

2020-12-09 Thread Otared Kavian
Hi, I have a silly question: given two points in the plane z1 = (1cm,3cm) ; z2 = (5cm, 9cm) ; the command draw z1 -- z2 withpen pencircle scaled .5pt ; draws the line segment joining z1 and z2. How could I draw the line segment which goes a little further (say 1cm) than

Re: [NTG-context] metafun 2

2019-09-08 Thread Aditya Mahajan
On Sun, 8 Sep 2019, Otared Kavian wrote: Hi Aditya, I wanted also to point out a typo on that page (two occurrences), namely "ploles" instead of "poles", in the explanations before the actual code. Thanks. Fixed. Aditya

Re: [NTG-context] metafun 2

2019-09-08 Thread Otared Kavian
Hi Aditya, As usual you show us a very nice and very clear example to taech nice features of ConTeXt: thank you so much! I wanted also to point out a typo on that page (two occurrences), namely "ploles" instead of "poles", in the explanations before the actual code. Best regard: > On 8 Sep

Re: [NTG-context] metafun 2

2019-09-08 Thread Aditya Mahajan
On Wed, 14 Aug 2019, Hans Hagen wrote: Hi, In the process of providing an additional (more abstract) interface to some of the old and also new MetaFun code we wonder what kind of features users would like to see. http://www.pragma-ade.com/general/magazines/mag-1104-mkiv.pdf Finally got

Re: [NTG-context] metafun 2

2019-08-19 Thread Jorge Manuel
Thanks a lot for the new features. In my system this code don’t work. macOS Mojave This is LuaMetaTeX, Version 2.00.0 open source > level 1, order 1, name 'cont-yes.mkiv' system > system > ConTeXt ver: 2019.08.17 12:16 MKIV beta fmt: 2019.8.19 int: English/English

Re: [NTG-context] metafun 2

2019-08-17 Thread Adam Reviczky
Hi Hans, Alan, This is really cool! Not sure how I missed this feature, works exactly for my use-case. Thanks a lot for pointing this out, I was able to find it in the MAPS as well. Cheers, Adam On Sat, Aug 17, 2019 at 9:52 AM Hans Hagen wrote: > On 8/17/2019 3:27 AM, Alan Braslau wrote: > >

Re: [NTG-context] metafun 2

2019-08-17 Thread Hans Hagen
On 8/17/2019 3:27 AM, Alan Braslau wrote: We have eofill in MP (in pdf/ps in fact) and that likely will do what you need. You forgot the MWD (Minimal Working Demo): \starttext \startMPpage path p ; p := fullcircle scaled 1cm ; path q ; q := fullcircle scaled .5cm ; nofill p ; eofill q ;

Re: [NTG-context] metafun 2

2019-08-16 Thread Alan Braslau
We have eofill in MP (in pdf/ps in fact) and that likely will do what you need. Alan On Sat, 17 Aug 2019 00:31:38 +0100 Adam Reviczky wrote: > Hi Hans, > > One MetaPost feature that I was looking forward to is the ability to create > a fill between two shapes. > Something like a difference

Re: [NTG-context] metafun 2

2019-08-16 Thread Adam Reviczky
Hi Hans, One MetaPost feature that I was looking forward to is the ability to create a fill between two shapes. Something like a difference function of two path's. For logos I use the workaround with creating a path alongside the excluded areas but it is always cumbersome. I have briefly

  1   2   3   4   >