Re: [NTG-context] metafun 2

2019-08-15 Thread Arthur Reutenauer
On Wed, Aug 14, 2019 at 10:18:19PM +1200, Henri Menke wrote: > I just wanted to ask, will LMTX and MetaFun remain valid implementations > of TeX and MetaPost or do we have to expect incompatibilities? If you mean “will luametatex pass the trip test”, the answer is probably no: LuaTeX a

Re: [NTG-context] metafun 2

2019-08-14 Thread Hans Hagen
er trivial to add Again, it is very nice that you work on extending MetaPost/MetaFun further!! wel, mp is ... fun (and these extension are somewhat challenging) Hans - Hans Hagen |

Re: [NTG-context] metafun 2

2019-08-14 Thread Hans Hagen
On 8/14/2019 4:58 PM, Otared Kavian wrote: On 14 Aug 2019, at 16:53, Aditya Mahajan wrote: […] This looks like a typical .. vs -- issue. I think there is a way to change how the points are connected, but I'll have to look at the code again. Aditya Indeed, this seems the right

Re: [NTG-context] metafun 2

2019-08-14 Thread Wolfgang Schuster
Otared Kavian schrieb am 14.08.2019 um 16:58: On 14 Aug 2019, at 16:53, Aditya Mahajan wrote: […] This looks like a typical .. vs -- issue. I think there is a way to change how the points are connected, but I'll have to look at the code again. Aditya Indeed, this seems the right

Re: [NTG-context] metafun 2

2019-08-14 Thread Mikael P. Sundqvist
On Wed, Aug 14, 2019 at 11:55 AM 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/gener

Re: [NTG-context] metafun 2

2019-08-14 Thread Otared Kavian
> On 14 Aug 2019, at 16:53, Aditya Mahajan wrote: > > […] > This looks like a typical .. vs -- issue. I think there is a way to change > how the points are connected, but I'll have to look at the code again. > > Aditya Indeed, this seems the right explanation. @ Hans: would it be possible

Re: [NTG-context] metafun 2

2019-08-14 Thread Aditya Mahajan
to the fact that metafun2 is interpolating between points in a way which is not correct. For instance, in the following example (which is a slight modification of yours), the curve drawn is not a graph, in the sense that for some values of x it seems to be two or more values of y. How does metafun 2

Re: [NTG-context] metafun 2

2019-08-14 Thread Hans Hagen
to the fact that metafun2 is interpolating between points in a way which is not correct. For instance, in the following example (which is a slight modification of yours), the curve drawn is not a graph, in the sense that for some values of x it seems to be two or more values of y. How does metafun 2

Re: [NTG-context] metafun 2

2019-08-14 Thread Otared Kavian
points in a way which is not correct. For instance, in the following example (which is a slight modification of yours), the curve drawn is not a graph, in the sense that for some values of x it seems to be two or more values of y. How does metafun 2 traces the curve between two discretization

Re: [NTG-context] metafun 2

2019-08-14 Thread Hans Hagen
On 8/14/2019 1:31 PM, Floris van Manen wrote: where can i find the steps to install lmtx next to my current context luatex ? http://pragma-ade.nl/install.htm - Hans Hagen | PRAGMA ADE

Re: [NTG-context] metafun 2

2019-08-14 Thread Floris van Manen
where can i find the steps to install lmtx next to my current context luatex ? .F pEpkey.asc Description: application/pgp-keys ___ If your question is of interest to others as well, please add an entry to the Wiki!

Re: [NTG-context] metafun 2

2019-08-14 Thread Hans Hagen
On 8/14/2019 12:18 PM, Henri Menke wrote: Dear Hans, I just wanted to ask, will LMTX and MetaFun remain valid implementations of TeX and MetaPost or do we have to expect incompatibilities? It depends on how you define 'valid' ... we're downward compatible ... but LMTX will use features

Re: [NTG-context] metafun 2

2019-08-14 Thread Henri Menke
Dear Hans, I just wanted to ask, will LMTX and MetaFun remain valid implementations of TeX and MetaPost or do we have to expect incompatibilities? Cheers, Henri On 14/08/19 9:54 PM, Hans Hagen wrote: > Hi, > > In the process of providing an additional (more abstract) interface t

[NTG-context] metafun 2

2019-08-14 Thread Hans Hagen
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 As a teaser I uploaded a MyWay document that shows some

Re: [NTG-context] Some macros (Metafun)

2019-08-11 Thread Hans Hagen
On 8/12/2019 12:40 AM, Fabrice Couvreur wrote: Hi Hans, Sorry but I did not see your email. What is the default color used to draw the path p ? drawlineoptions (withpen pencircle scaled 1.0 drawoptionsfactor withcolor .5white) ; drawpointoptions (withpen pencircle scaled 4.0

Re: [NTG-context] Some macros (Metafun)

2019-08-11 Thread Fabrice Couvreur
Hi Hans, Sorry but I did not see your email. What is the default color used to draw the path p ? Thank you. Le ven. 9 août 2019 à 13:12, Hans Hagen a écrit : > On 8/9/2019 10:57 AM, Fabrice Couvreur wrote: > > Hello, > > In the Metafun manual, Hans uses macros

Re: [NTG-context] Some macros (Metafun)

2019-08-09 Thread Hans Hagen
On 8/9/2019 10:57 AM, Fabrice Couvreur wrote: Hello, In the Metafun manual, Hans uses macros like drawpath p ; drawcontrollines p ; drawpoints p ; drawcontrolpoints p ... How to use them in a document ? Where to find source codes ? For example, the following code does not work : \starttext

[NTG-context] Some macros (Metafun)

2019-08-09 Thread Fabrice Couvreur
Hello, In the Metafun manual, Hans uses macros like drawpath p ; drawcontrollines p ; drawpoints p ; drawcontrolpoints p ... How to use them in a document ? Where to find source codes ? For example, the following code does not work : \starttext \startuseMPgraphic{path} path p ; p := (1cm,1cm

Re: [NTG-context] Can't use MetaFun with mplib anymore

2019-03-14 Thread luigi scarso
On Thu, Mar 14, 2019 at 10:52 AM Hans Hagen wrote: > as currently the variable is isn't used we can also comment it > > > seems so I have commented the line, and all formats and the plain test run. -- luigi ___ If

Re: [NTG-context] Can't use MetaFun with mplib anymore

2019-03-14 Thread Hans Hagen
On 3/14/2019 10:00 AM, Henri Menke wrote: On 3/14/19 8:49 PM, Hans Hagen wrote: On 3/14/2019 5:56 AM, Henri Menke wrote: Dear list, Something has changed in MetaFun and it can no longer be used in plain LuaTeX, with neither of luatex test.tex mtxrun --script plain test.tex

Re: [NTG-context] Can't use MetaFun with mplib anymore

2019-03-14 Thread Hans Hagen
On 3/14/2019 8:51 AM, luigi scarso wrote: On Thu, Mar 14, 2019 at 5:56 AM Henri Menke <mailto:henrime...@gmail.com>> wrote: Dear list, Something has changed in MetaFun and it can no longer be used in plain LuaTeX, with neither of     luatex test.tex  

Re: [NTG-context] Can't use MetaFun with mplib anymore

2019-03-14 Thread Henri Menke
On 3/14/19 8:49 PM, Hans Hagen wrote: > On 3/14/2019 5:56 AM, Henri Menke wrote: >> >> Dear list, >> >> Something has changed in MetaFun and it can no longer be used in plain >> LuaTeX, >> with neither of >> >> luatex test.tex >>   

Re: [NTG-context] Can't use MetaFun with mplib anymore

2019-03-14 Thread luigi scarso
On Thu, Mar 14, 2019 at 5:56 AM Henri Menke wrote: > > Dear list, > > Something has changed in MetaFun and it can no longer be used in plain > LuaTeX, > with neither of > > luatex test.tex > mtxrun --script plain test.tex > > This is the erro

Re: [NTG-context] Can't use MetaFun with mplib anymore

2019-03-14 Thread Hans Hagen
On 3/14/2019 5:56 AM, Henri Menke wrote: Dear list, Something has changed in MetaFun and it can no longer be used in plain LuaTeX, with neither of luatex test.tex mtxrun --script plain test.tex This is the error: >> LUATEXFUNCTIONALITY >> "mp.print(LU

[NTG-context] Can't use MetaFun with mplib anymore

2019-03-13 Thread Henri Menke
Dear list, Something has changed in MetaFun and it can no longer be used in plain LuaTeX, with neither of luatex test.tex mtxrun --script plain test.tex This is the error: >> LUATEXFUNCTIONALITY >> "mp.print(LUATEXFUNCTIONALITY)" ! Equation cannot

Re: [NTG-context] getdocumentargument in Metafun

2019-02-22 Thread Fabrice L
Le 22 février 2019 à 11:08:51, Aditya Mahajan (adit...@umich.edu) a écrit: Untested. Add quotes around FileName: > string FileName ; > FileName := "\getdocumentargument{File}" ; And not tested successfully ! Thanks a lot Aditya ! Fabrice.

Re: [NTG-context] getdocumentargument in Metafun

2019-02-22 Thread Aditya Mahajan
On Fri, 22 Feb 2019, Fabrice L wrote: Dear list, I wish to do several zoom from a picture made in MetaFun, from a pdf file which name is given on the commande line, like: context zoom.tex —File=EntryFile —Page=9 —result=OutFile.pdf Untested. Add quotes around FileName: string FileName

[NTG-context] getdocumentargument in Metafun

2019-02-22 Thread Fabrice L
Dear list, I wish to do several zoom from a picture made in MetaFun, from a pdf file which name is given on the commande line, like: context zoom.tex —File=EntryFile —Page=9 —result=OutFile.pdf Minimal example: \starttext \startMPpage numeric ThePage ; string FileName ; FileName

Re: [NTG-context] outlined font using MetaFun

2019-02-08 Thread Wolfgang Schuster
Jeong Dal schrieb am 08.02.19 um 17:18: Dear all, The following code which is borrowed from MetaFun manual is working nicely. %% \setupMPvariables[outlineT][tt="Hello"] \startuseMPgraphic{outlineT} draw outlinetext.b (\MPvar{tt}) (withcolor .5white) (withcolor .625bl

[NTG-context] outlined font using MetaFun

2019-02-08 Thread Jeong Dal
Dear all, The following code which is borrowed from MetaFun manual is working nicely. %% \setupMPvariables[outlineT][tt="Hello"] \startuseMPgraphic{outlineT} draw outlinetext.b (\MPvar{tt}) (withcolor .5white) (withcolor .625blue withpen pencircle scaled .2pt)

[NTG-context] textext with plain MetaFun

2019-01-21 Thread Akira Kakuto
> You should see the text at the bottom left. > It seems that there is a string _s_ not initialized. If I remove all _s_ in mp-text.mpii, metafun test.mp worked for hobbiestextext := true; beginfig(1) draw textext("MetaFun") ; endfig; e

Re: [NTG-context] textext with plain MetaFun

2019-01-21 Thread luigi scarso
On Mon, Jan 21, 2019 at 10:47 AM Henri Menke wrote: > On 1/21/19 10:40 PM, luigi scarso wrote: > > On Mon, Jan 21, 2019 at 8:57 AM Henri Menke > wrote: > > > >> Dear list, > >> > >> When I process the short MetaFun example > >&g

Re: [NTG-context] textext with plain MetaFun

2019-01-21 Thread Henri Menke
On 1/21/19 10:40 PM, luigi scarso wrote: > On Mon, Jan 21, 2019 at 8:57 AM Henri Menke wrote: > >> Dear list, >> >> When I process the short MetaFun example >> >> beginfig(1) >> draw textext("MetaFun") ; >> endfig; >>

Re: [NTG-context] textext with plain MetaFun

2019-01-21 Thread luigi scarso
On Mon, Jan 21, 2019 at 8:57 AM Henri Menke wrote: > Dear list, > > When I process the short MetaFun example > > beginfig(1) > draw textext("MetaFun") ; > endfig; > end > > with plain MetaFun, i.e. > > mpost '' test.mp > >

Re: [NTG-context] textext with plain MetaFun

2019-01-21 Thread Hans van der Meer
21/2019 8:57 AM, Henri Menke wrote: >>> Dear list, >>> >>> When I process the short MetaFun example >>> >>> beginfig(1) >>> draw textext("MetaFun") ; >>> endfig; >>> end >>> >>> with

Re: [NTG-context] textext with plain MetaFun

2019-01-21 Thread Henri Menke
On 1/21/19 9:29 PM, Hans Hagen wrote: > On 1/21/2019 8:57 AM, Henri Menke wrote: >> Dear list, >> >> When I process the short MetaFun example >> >> beginfig(1) >> draw textext("MetaFun") ; >> endfig; >> e

Re: [NTG-context] textext with plain MetaFun

2019-01-21 Thread Hans Hagen
On 1/21/2019 8:57 AM, Henri Menke wrote: Dear list, When I process the short MetaFun example beginfig(1) draw textext("MetaFun") ; endfig; end with plain MetaFun, i.e. mpost '' test.mp the resulting file only contains “unknown”. How can I get the expec

[NTG-context] textext with plain MetaFun

2019-01-20 Thread Henri Menke
Dear list, When I process the short MetaFun example beginfig(1) draw textext("MetaFun") ; endfig; end with plain MetaFun, i.e. mpost '' test.mp the resulting file only contains “unknown”. How can I get the expected output? Che

Re: [NTG-context] MetaFun: how to check the number of arguments

2019-01-16 Thread Jeong Dal
Dear Hans, > vardef textlength(text t) = >save n ; n := 0 ; >for i = t : > n := n + 1 ; >endfor; >n > enddef; > Thank you for a good method! It can be used in another program. Best regards, Dalyoung

Re: [NTG-context] MetaFun: how to check the number of arguments

2019-01-16 Thread Hans Hagen
On 1/16/2019 12:53 AM, Jeong Dal wrote: Dear Hans, Thank you for a solution. In my memory, it is possible to check the argument in Lua, so I hope that there is a similar method in MetaFun. It may be easier to draw grid using lines instead of squares. vardef textlength(text t) = save n

Re: [NTG-context] MetaFun: how to check the number of arguments

2019-01-15 Thread Jeong Dal
Dear Hans, Thank you for a solution. In my memory, it is possible to check the argument in Lua, so I hope that there is a similar method in MetaFun. It may be easier to draw grid using lines instead of squares. Thank you again. Best regards, Dalyoung > 2019. 1. 16. 오전 2:04, Hans Hagen

Re: [NTG-context] MetaFun: how to check the number of arguments

2019-01-15 Thread Hans Hagen
On 1/14/2019 10:44 PM, Jeong Dal wrote: Dear all, In the following sample, it draws squares with label which is given. I’d like to know how to check the number of elements in the second argument? If it is 0, then I just draw grids only. Thank you for reading. Best regards, Dalyoung

[NTG-context] MetaFun: how to check the number of arguments

2019-01-14 Thread Jeong Dal
Dear all, In the following sample, it draws squares with label which is given. I’d like to know how to check the number of elements in the second argument? If it is 0, then I just draw grids only. Thank you for reading. Best regards, Dalyoung \startbuffer[defs] def drawGridF (expr

Re: [NTG-context] Macro to write a vector with Metafun (again)

2018-12-04 Thread Hans Hagen
On 12/4/2018 4:38 PM, Fabrice Couvreur wrote: Hello Hans, The macro to draw a vector does not work even with the latest version of context standalone. Thank you Fabrice \useMPlibrary[mat] % will be in meta-imp-mat.mkiv just watch in there .. we redid these stackers with more control (and

[NTG-context] Macro to write a vector with Metafun (again)

2018-12-04 Thread Fabrice Couvreur
Hello Hans,The macro to draw a vector does not work even with the latest version of context standalone. Thank you Fabrice \useMPlibrary[mat] % will be in meta-imp-mat.mkiv \startMPextensions vardef math_stacker_arrow_shape = image ( drawarrow

Re: [NTG-context] Construct a matrix with Metafun

2018-10-14 Thread Wolfgang Schuster
Fabrice Couvreur schrieb am 14.10.18 um 10:46: Hi, I tried to use Metafun and \definemathmatrix [pmatrix] [matrix: parentheses] [simplecommand = MATRIX] to create two matrices, but that does not work. 1. You have a space in [matrix: parentheses] 2. When you have only simple

Re: [NTG-context] Construct a matrix with Metafun

2018-10-14 Thread Wolfgang Schuster
Fabrice Couvreur schrieb am 14.10.18 um 10:46: Hi, I tried to use Metafun and \definemathmatrix [pmatrix] [matrix: parentheses] [simplecommand = MATRIX] to create two matrices, but that does not work. 1. You have a space in [matrix: parentheses] 2. When you have only simple graphics like

[NTG-context] Construct a matrice with Metafun and \MATRIX{}

2018-10-14 Thread Fabrice Couvreur
Hi, I tried to use Metafun and \definemathmatrix [pmatrix] [matrix: parentheses] [simplecommand = MATRIX] to create two matrices, but that does not work. Thank you. http://image.noelshack.com/fichiers/2018/41/7/1539507927-matrice.jpg

[NTG-context] Construct a matrix with Metafun

2018-10-14 Thread Fabrice Couvreur
Hi, I tried to use Metafun and \definemathmatrix [pmatrix] [matrix: parentheses] [simplecommand = MATRIX] to create two matrices, but that does not work. Thank you. Fabrice [image: matrice.jpg] ___ If your question

Re: [NTG-context] Metafun scaling problem

2018-10-02 Thread Hans Hagen
On 10/2/2018 1:05 PM, Lutz Haseloff wrote: xsized was the solution. I wonder why xscaled worked for me for years. because we used a 1bp image at that time (was needed in two-pass approach) ... we don't have that limitation now (and 1bp is pretty inaccurate anyway) Hans

Re: [NTG-context] Metafun scaling problem

2018-10-02 Thread Lutz Haseloff
xsized was the solution. I wonder why xscaled worked for me for years. Thanks for the fast help. Lutz Am 2. Oktober 2018 11:10:04 MESZ schrieb Hans Hagen : >On 10/2/2018 7:03 AM, Lutz Haseloff wrote: >> Hi Hans, hi all, >> >> I think, that recent context has a problem with scaling included pdf

Re: [NTG-context] Metafun scaling problem

2018-10-02 Thread luigi scarso
On Tue, Oct 2, 2018 at 7:03 AM Lutz Haseloff wrote: > Hi Hans, hi all, > > I think, that recent context has a problem with scaling included pdf files. > > > Metapost traditional scaled math has a limited range, you can use doublefun or decimalfun (not more binaryfun) \starttext \startTEXpage

Re: [NTG-context] Metafun scaling problem

2018-10-02 Thread Hans Hagen
On 10/2/2018 7:03 AM, Lutz Haseloff wrote: Hi Hans, hi all, I think, that recent context has a problem with scaling included pdf files. My minimal file: \startMPpage draw externalfigure "cow.pdf" ; \stopMPpage The resulting pdf is, as the original, 97x70.6 mm, all ok. If I try to scale to

Re: [NTG-context] Metafun scaling problem

2018-10-02 Thread luigi scarso
On Tue, Oct 2, 2018 at 8:19 AM Lutz Haseloff wrote: > On Windows, I got it working again with current Context (20180404) and > current luatex from win32tex > (1.07 development ID 6686) > > On linux-armhf I did a fresh "./first-setup.sh --engine=luatex" and got: > > mtx-context | ConTeXt Process

Re: [NTG-context] Metafun scaling problem

2018-10-02 Thread Lutz Haseloff
On Windows, I got it working again with current Context (20180404) and current luatex from win32tex (1.07 development ID 6686) On linux-armhf I did a fresh "./first-setup.sh --engine=luatex" and got: mtx-context | ConTeXt Process Management 1.02 mtx-context | mtx-context | main

Re: [NTG-context] Metafun scaling problem

2018-10-01 Thread luigi scarso
On Tue, Oct 2, 2018 at 7:03 AM Lutz Haseloff wrote: > Hi Hans, hi all, > > I think, that recent context has a problem with scaling included pdf files. > My minimal file: > > \startMPpage > draw externalfigure "cow.pdf" ; > \stopMPpage > > The resulting pdf is, as the original, 97x70.6 mm, all

[NTG-context] Metafun scaling problem

2018-10-01 Thread Lutz Haseloff
Hi Hans, hi all, I think, that recent context has a problem with scaling included pdf files. My minimal file: \startMPpage draw externalfigure "cow.pdf" ; \stopMPpage The resulting pdf is, as the original, 97x70.6 mm, all ok. If I try to scale to the original size, i get arithmetic overflow

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-28 Thread Jeong Dal
Dear Hans, Thank you so much for a new code which works fine. It can be used for the title of chapters. I will play with this to make a nice title. Thank you again. Best regards, Dalyoung > 2018. 9. 28. 오전 12:43, Hans Hagen 작성: > > On 9/27/2018 5:06 PM, Jeong Dal wrote: >> Dear Hans, >>

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-27 Thread Hans Hagen
On 9/27/2018 5:06 PM, Jeong Dal wrote: Dear Hans, First, I appreciate for your concerning and sharing your valuable time on this matter. I think that there is no one who has an interest in outlining Korean letters. It is my self-interest to use outlined text for titles of chapters. As we

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-27 Thread Jeong Dal
Dear Hans, First, I appreciate for your concerning and sharing your valuable time on this matter. I think that there is no one who has an interest in outlining Korean letters. It is my self-interest to use outlined text for titles of chapters. As we know, Korean letters are different from

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-27 Thread Hans Hagen
On 9/26/2018 11:38 PM, Jeong Dal wrote: Dear Hans, 2018. 9. 26. 오후 9:24, Hans Hagen > 작성: On 9/26/2018 2:14 PM, Jeong Dal wrote: Dear Hans, I tested for more characters and found an interesting fact. If the first consonant and the vowels are connected in a glyph,

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-26 Thread Jeong Dal
Dear Hans,2018. 9. 26. 오후 9:24, Hans Hagen 작성:On 9/26/2018 2:14 PM, Jeong Dal wrote:Dear Hans,I tested for more characters and found an interesting fact.If the first consonant and the vowels are connected in a glyph, then the outlining works OK, otherwise, it makes outline of

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-26 Thread Hans Hagen
On 9/26/2018 2:14 PM, Jeong Dal wrote: Dear Hans, I tested for more characters and found an interesting fact. If the first consonant and the vowels are connected in a glyph, then the outlining works OK, otherwise, it makes outline of the first consonant only. you need to send a file not

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-26 Thread Jeong Dal
Dear Hans, I tested for more characters and found an interesting fact. If the first consonant and the vowels are connected in a glyph, then the outlining works OK, otherwise, it makes outline of the first consonant only. Here is a MWE. Thank you. Best regards, Dalyoung %

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-26 Thread Jeong Dal
Dear Hans, I have tested using your code. I just replace “N”, “T” with Korean letters. Here is an MWE which is a simplified version of your code. I tested using two fonts, and the outputs are different. Thank you for your concern. Best regards, Dalyoung %%%

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-26 Thread Hans Hagen
On 9/26/2018 1:48 AM, Jeong Dal wrote: Dear Hans, First, it is great to know a new method of drawing an outlined font! I have applied it to Korean fonts. As you know, every Korean character is composed with “consonant+vowel(+consonant)” type. If consonant and vowel are connected (for

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-26 Thread Hans Hagen
On 9/26/2018 1:48 AM, Jeong Dal wrote: Dear Hans, First, it is great to know a new method of drawing an outlined font! I have applied it to Korean fonts. As you know, every Korean character is composed with “consonant+vowel(+consonant)” type. If consonant and vowel are connected (for

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-25 Thread Jeong Dal
, otherwise (for example, “하”) it draws only consonant. Is there a way to count all the paths in a character(even if it is not connected)? Thank you. Best regards, Dalyoung > > \starttext > > \startMPdefinitions > > % will be added to metafun: > > de

Re: [NTG-context] MetaFun: nofmultipars wrong?

2018-09-25 Thread Hans Hagen
On 9/25/2018 3:24 AM, Henri Menke wrote: Dear list, I used to be under the impression that when you wanted a background frame around a piece of text, you'd use a loop over nofmultipars. However, I realized that even when the contained material breaks across pages, the counter remains 1 on the

[NTG-context] MetaFun: nofmultipars wrong?

2018-09-24 Thread Henri Menke
Dear list, I used to be under the impression that when you wanted a background frame around a piece of text, you'd use a loop over nofmultipars. However, I realized that even when the contained material breaks across pages, the counter remains 1 on the second page. Another issue is that the

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-22 Thread Hans Hagen
opMPpage \stoptext You migh find more when you go top double mode .. anyway, these intersection calculations are not that accurate so you normally need to apply some overkill. - a bit cleaned up outlinepath function - use document namespace - add helper for defineoutline - do 4 runs over the shape

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-22 Thread Alan Braslau
(angle) withcolor .5[red,white]; > >>> path r; > >>> numeric n; n := 0; > >>> for i = 1 upto Bn: > >>>     for j = 1 upto Tn: > >>>         r := B[i]; > >>>         forever: > >>>             pair q; > >&g

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-22 Thread Hans Hagen
so you normally need to apply some overkill. - a bit cleaned up outlinepath function - use document namespace - add helper for defineoutline - do 4 runs over the shapes (probably too many now) - more neutral fill code It makes a nice example for the metafun (although then I'd do it slightl

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-22 Thread Floris van Manen
;> dotlabel.urt(textext("\tfx" & decimal n), q); >> endfor; >> endfor ; >> endfor ; >> \stopMPpage >> \stoptext > > You migh find more when you go top double mode .. anyway, these intersection > calculations are n

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-22 Thread Hans Hagen
de .. anyway, these intersection calculations are not that accurate so you normally need to apply some overkill. - a bit cleaned up outlinepath function - use document namespace - add helper for defineoutline - do 4 runs over the shapes (probably too many now) - more neutral fill code It makes a

[NTG-context] Metafun: Finding intersection between characters

2018-09-22 Thread Henri Menke
Dear list, Challanged by a very old TeX.SX question https://tex.stackexchange.com/questions/180510 I wanted to calculate all the intersection points between two characters. Therefore I ripped off the \showshape macro to load the outlines from the font and convert them to MetaPost paths. Then I

Re: [NTG-context] MetaFun: How to draw bent paths?

2018-09-19 Thread Alan Braslau
On Wed, 19 Sep 2018 11:18:30 +1200 Henri Menke wrote: > On 18/09/18 21:23, Henri Menke wrote: > > On 9/18/18 7:57 PM, Hans Hagen wrote: > >> On 9/16/2018 10:28 AM, Henri Menke wrote: > >>> Dear list, > >>> > >>> I want to draw paths between points which are bent by a certain angle. > >>> The

Re: [NTG-context] MetaFun: How to draw bent paths?

2018-09-18 Thread Henri Menke
On 18/09/18 21:23, Henri Menke wrote: > On 9/18/18 7:57 PM, Hans Hagen wrote: >> On 9/16/2018 10:28 AM, Henri Menke wrote: >>> Dear list, >>> >>> I want to draw paths between points which are bent by a certain angle. >>> The code in the MWE below works well but I was thinking that the expert >>>

Re: [NTG-context] MetaFun: How to draw bent paths?

2018-09-18 Thread Henri Menke
On 9/18/18 7:57 PM, Hans Hagen wrote: > On 9/16/2018 10:28 AM, Henri Menke wrote: >> Dear list, >> >> I want to draw paths between points which are bent by a certain angle. >> The code in the MWE below works well but I was thinking that the expert >> here can surely improve it and suggest a nicer

Re: [NTG-context] MetaFun: How to draw bent paths?

2018-09-18 Thread Hans Hagen
On 9/16/2018 10:28 AM, Henri Menke wrote: Dear list, I want to draw paths between points which are bent by a certain angle. The code in the MWE below works well but I was thinking that the expert here can surely improve it and suggest a nicer syntax. looks like a challenge for Alan ... isn't

[NTG-context] MetaFun: How to draw bent paths?

2018-09-16 Thread Henri Menke
Dear list, I want to draw paths between points which are bent by a certain angle. The code in the MWE below works well but I was thinking that the expert here can surely improve it and suggest a nicer syntax. Cheers, Henri --- \startMPpage vardef bend(expr a,b,phi) =

[NTG-context] Draw an ink imprint with Metafun

2018-08-30 Thread Fabrice Couvreur
Hello, The idea is to reproduce the ink mark of the figure below with Metafun [image: IMG_0691.jpg] Thank you Fabrice ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist

Re: [NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-18 Thread Fabrice Couvreur
Hello, I just compiled the file with gvim and the expected result is the right one ; the problem is Emacs or my ~/.emacs file. Fabrice 2018-07-17 23:00 GMT+02:00 Alan Braslau : > \startusableMPgraphic ? > > > On 17 Jul 2018, at 14:46, Rik Kabel wrote: > > > > On 7/17/2018 16:40, Hans Hagen

Re: [NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-17 Thread Hans Hagen
On 7/17/2018 11:00 PM, Alan Braslau wrote: \setuppagenumbering[location=footer] \startusableMPgraphic{NumberHead} draw outlinetext.f ("\bf\namedheadnumber{chapter}") (withcolor "lightgray") ysized 50pt ; \stopusableMPgraphic

Re: [NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-17 Thread Alan Braslau
\startusableMPgraphic ? > On 17 Jul 2018, at 14:46, Rik Kabel wrote: > > On 7/17/2018 16:40, Hans Hagen wrote: >> On 7/17/2018 10:30 PM, Rik wrote: >>> On 7/16/2018 10:24, Fabrice Couvreur wrote: % macros=mkvi \setuppagenumbering[location=footer]

Re: [NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-17 Thread Rik Kabel
On 7/17/2018 16:40, Hans Hagen wrote: On 7/17/2018 10:30 PM, Rik wrote: On 7/16/2018 10:24, Fabrice Couvreur wrote: % macros=mkvi \setuppagenumbering[location=footer] \startusableMPgraphic{NumberHead} draw outlinetext.f ("\bf\namedheadnumber{chapter}") (withcolor

Re: [NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-17 Thread Hans Hagen
On 7/17/2018 10:30 PM, Rik wrote: On 7/16/2018 10:24, Fabrice Couvreur wrote: % macros=mkvi \setuppagenumbering[location=footer] \startusableMPgraphic{NumberHead} draw outlinetext.f ("\bf\namedheadnumber{chapter}") (withcolor "lightgray") ysized 50pt ;

Re: [NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-17 Thread Fabrice Couvreur
Hi Pablo, I do not have win64, sorry ! I installed texlive 2018 and the file compiles without problem but in a console other than that of Emacs. I also get the expected result with the latest version of context standalone but still in a console other than that of Emacs. Should we conclude that the

Re: [NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-17 Thread Rik
On 7/16/2018 10:24, Fabrice Couvreur wrote: % macros=mkvi \setuppagenumbering[location=footer] \startusableMPgraphic{NumberHead} draw outlinetext.f ("\bf\namedheadnumber{chapter}") (withcolor "lightgray") ysized 50pt ; \stopusableMPgraphic

Re: [NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-17 Thread Pablo Rodriguez
On 07/17/2018 12:36 PM, Fabrice Couvreur wrote: > Hi Hans, > In fact, the file compiles well with the beta version but only from a > terminal by running the > /home/aragorn/context/tex/texmf-linux-64/bin/context Test.tex && evince > Test.pdf command. > On the other hand, if I compile with Emacs,

Re: [NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-17 Thread Hans Hagen
On 7/17/2018 12:36 PM, Fabrice Couvreur wrote: Hi Hans, In fact, the file compiles well with the beta version but only from a terminal by running the /home/aragorn/context/tex/texmf-linux-64/bin/context Test.tex && evince Test.pdf command. On the other hand, if I compile with Emacs, the

Re: [NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-17 Thread Fabrice Couvreur
Hi Hans, In fact, the file compiles well with the beta version but only from a terminal by running the /home/aragorn/context/tex/texmf-linux-64/bin/context Test.tex && evince Test.pdf command. On the other hand, if I compile with Emacs, the chapter number does not appear. I configured Emacs so

Re: [NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-16 Thread Fabrice Couvreur
The chapter number does not appear. My editor is emacs and I compile with Context Full. 2018-07-16 19:27 GMT+02:00 Hans Hagen : > On 7/16/2018 4:24 PM, Fabrice Couvreur wrote: > >> Hello, >> The idea is to make a chapter header as with the "titlesec" package. My >> code compiles under texlive

Re: [NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-16 Thread Hans Hagen
On 7/16/2018 4:24 PM, Fabrice Couvreur wrote: Hello, The idea is to make a chapter header as with the "titlesec" package. My code compiles under texlive context 2018 but does not compile with last beta contest standalone. it processes on my machine so what fails? Thank you Fabrice

[NTG-context] Compilation problem with the latest version of standalone context(Metafun)

2018-07-16 Thread Fabrice Couvreur
Hello, The idea is to make a chapter header as with the "titlesec" package. My code compiles under texlive context 2018 but does not compile with last beta contest standalone. Thank you Fabrice % macros=mkvi \setuppagenumbering[location=footer]

Re: [NTG-context] metafun: error when I call the same function twice consecutively.

2018-06-01 Thread Jeong Dal
Dear Alan, Thank you for the clear explanation about z. I tought that z is a special variable different from other pairs. Now, I know that it is an equation. Thank you again. Best regards, Dalyoung > 2018. 6. 1. 오후 11:24, Alan Braslau 작성: > > On Fri, 01 Jun 2018 20:29:41 +0900 > Jeong Dal

Re: [NTG-context] metafun: error when I call the same function twice consecutively.

2018-06-01 Thread Alan Braslau
On Fri, 01 Jun 2018 20:29:41 +0900 Jeong Dal wrote: > After inserting a line “save x, y;”, it works. This is also defined as "clearxy ;" For those learning MetaPost, simplifying, z is defined as "(x,y)" so one can write z = (a,b) ; This is an EQUATION in MetaPost (x,y) = (a,b)

Re: [NTG-context] metafun: error when I call the same function twice consecutively.

2018-06-01 Thread Jeong Dal
Dear Henri Menke, Thank you for the solution. After inserting a line “save x, y;”, it works. Thank you so much. Best regards, Dalyoung ___ If your question is of interest to others as well, please add an entry to

Re: [NTG-context] metafun: error when I call the same function twice consecutively.

2018-05-31 Thread Henri Menke
On 01/06/18 14:22, Jeong Dal wrote: Hi, I defined a function using MetaFun, and call it to draw a figure. It is OK when I call it once. But there is an error when it runs the same function second time. (it stops when it call fap(3,2) after fap(2,2)) I have no idea what is wrong and how

[NTG-context] metafun: error when I call the same function twice consecutively.

2018-05-31 Thread Jeong Dal
Hi, I defined a function using MetaFun, and call it to draw a figure. It is OK when I call it once. But there is an error when it runs the same function second time. (it stops when it call fap(3,2) after fap(2,2)) I have no idea what is wrong and how to fix it. Would you please tell me what I

<    1   2   3   4   5   6   7   8   9   10   >