Re: [NTG-context] Import a metapost extension

2020-09-01 Thread Hans Hagen
On 9/1/2020 3:04 PM, Fabrice Couvreur wrote: Hi Taco, Thank you for your help. I specify that this extension works perfectly by compiling the following file. input mp-scratch; Scratchversion:=3; beginfig(1);   draw Drapeau;   draw Repeter("4");   draw Avancer("100");   draw Tournerd("90"

Re: [NTG-context] Import a metapost extension

2020-09-01 Thread Fabrice Couvreur
tchversion:=3; > …. > > If that also doesn’t work, perhaps attach the log file / terminal output > to a new message. > > Best wishes, > Taco > > > On 1 Sep 2020, at 13:07, Fabrice Couvreur > wrote: > > > > Hello > > Is it possible to import

Re: [NTG-context] Import a metapost extension

2020-09-01 Thread Taco Hoekwater
ote: > > Hello > Is it possible to import a metapost extension into a file compiled with the > lmtx engine ? > I tried unsuccessfully with this example : > > begin test.tex > > \starttext > \startMPcode > input mp-scratch; > > Scratchversion:=3; >

[NTG-context] Import a metapost extension

2020-09-01 Thread Fabrice Couvreur
Hello Is it possible to import a metapost extension into a file compiled with the lmtx engine ? I tried unsuccessfully with this example : begin test.tex \starttext \startMPcode input mp-scratch; Scratchversion:=3; draw Drapeau; draw Repeter("4"); draw Avancer("50&q

Re: [NTG-context] Missing graphic in MPpage when viewing in Apple MAC Preview or GIMP 2.10 but not Adobe

2020-08-16 Thread Keith McKay
Thanks Taco! I have been playing about with an example from this site https://tex.loria.fr/prod-graph/zoonekynd/metapost/metapost.html which was originally for a square and I obviously didn't get my angles right. Thanks for spotting it. I'm beginning to appreciate where the Fun

Re: [NTG-context] How can I use ConTeXt from TeXLive2020 ?

2020-08-14 Thread Mojca Miklavec
;backend engine". What's missing is better integration though (to end up with almost as good integration as metapost/metafun offers), and 3D with javascript mousing support never worked either. Mojca __

Re: [NTG-context] How to properly pass TeX/Lua data to MetaPost/MetaFun?

2020-08-09 Thread Jairo A. del Rio
Nice, I'm reading results right now. Thank you a lot, Hans. Jairo :) El dom., 9 de ago. de 2020 a la(s) 13:05, Hans Hagen (j.ha...@xs4all.nl) escribió: > On 8/9/2020 8:03 PM, Jairo A. del Rio wrote: > > Oh, thank you a lot, Hans, that's a really cleaner way than mine. One > > more question, is t

Re: [NTG-context] How to properly pass TeX/Lua data to MetaPost/MetaFun?

2020-08-09 Thread Hans Hagen
On 8/9/2020 8:03 PM, Jairo A. del Rio wrote: Oh, thank you a lot, Hans, that's a really cleaner way than mine. One more question, is there something similar to EmWidth for \textwidth or \linewidth? Better, a better way to access TeX dimensions? Thank you again. When you grep for EmWidth ... Li

Re: [NTG-context] How to properly pass TeX/Lua data to MetaPost/MetaFun?

2020-08-09 Thread Jairo A. del Rio
(j.ha...@xs4all.nl) escribió: > On 8/9/2020 5:39 PM, Jairo A. del Rio wrote: > > Hi, list! I'm doing the following to scale squares and other stuff in > > MetaPost/MetaFun. Although the following kinda works (maybe I'm just > > lucky with this), I want to know how to do a bet

Re: [NTG-context] How to properly pass TeX/Lua data to MetaPost/MetaFun?

2020-08-09 Thread Hans Hagen
On 8/9/2020 5:39 PM, Jairo A. del Rio wrote: Hi, list! I'm doing the following to scale squares and other stuff in MetaPost/MetaFun. Although the following kinda works (maybe I'm just lucky with this), I want to know how to do a better piece from it. I'm concerned with passin

[NTG-context] How to properly pass TeX/Lua data to MetaPost/MetaFun?

2020-08-09 Thread Jairo A. del Rio
Hi, list! I'm doing the following to scale squares and other stuff in MetaPost/MetaFun. Although the following kinda works (maybe I'm just lucky with this), I want to know how to do a better piece from it. I'm concerned with passing data from Lua and TeX to Metapost and better w

[NTG-context] Is there a bug in lmt_shade[...=...,...=...]

2020-07-29 Thread Keith McKay
] ; StopPage; \stopMPpage \stoptext The console output gives this: system > system > ConTeXt ver: 2020.07.29 14:08 LMTX fmt: 2020.7.29 int: english/english system > metapost > log > metapost > log > loading metafun, including plain.mp version 1.004 for meta

Re: [NTG-context] upload

2020-07-28 Thread Fabrice Couvreur
w level code has now made it in core. > Normally users will not notice this but who knows. > > There are already features in lmtx that are not (and are unlikely to be) > in mkiv (most significant in the metapost related part). When possible > new macros and additions to mechanism will

[NTG-context] upload

2020-07-27 Thread Hans Hagen
me of the experimental low level code has now made it in core. Normally users will not notice this but who knows. There are already features in lmtx that are not (and are unlikely to be) in mkiv (most significant in the metapost related part). When possible new macros and additions to mechanism

Re: [NTG-context] Pre-registration for 14th ConTeXt Meeting, September 6–12, 2020

2020-07-20 Thread Jano Kula
> everything related. Each meeting is source of inspiration for everybody, > from beginner to expert. Friendly company is always looking for meeting new > participants, users of LuaTeX, LuaMetaTeX, ConTeXt, Metapost, etc. > > There is a special discount for those, who attend the mee

Re: [NTG-context] french translation of ConTeXt interface - progress (v3)

2020-07-20 Thread Hans Hagen
table but best play clean. Special cases are for instance metapost things, so we don't translate an instance name 'lessfun'. Again, it does no harm to have the entries but there is no such 'moinsfun' defined because this is a system key. A general rule can be: - things we

Re: [NTG-context] Broken PDF with latest MkIV

2020-07-12 Thread Alan Braslau
ll in Preview.app and PDF Studio 2019, but Adobe (Reader DC and Acrobat Pro 9) can’t open the new PDF. I’ll try to cook up a MWE. Does anyone else experience problems with Adobe apps? Hraban Is this perhaps related to the thread: [NTG-context] Minimum METAPOST code produces problematic PDF

Re: [NTG-context] Minimum METAPOST code produces problematic PDF

2020-07-11 Thread Gerben Wierda
> On 9 Jul 2020, at 08:37, Aditya Mahajan wrote: > > On Wed, 8 Jul 2020, Gerben Wierda wrote: > >> I found out this in the PDF spec: >> >> The minimum page size should be 3 by 3 units in default user space; the >> maximum should be 14,400 by 14,400 units. > > So, does the following work: >

Re: [NTG-context] Minimum METAPOST code produces problematic PDF

2020-07-09 Thread Gerben Wierda
The minimum is a relative one: It is page 650 in the (normative) Annex C Implementation Limits for PDF readers and writers: Additionally, conforming writers should adhere to the following constraints, and conforming readers should accommodate PDF files that obey the constraints. The minimum pa

Re: [NTG-context] Minimum METAPOST code produces problematic PDF

2020-07-09 Thread Hans Hagen
On 7/9/2020 9:08 AM, Taco Hoekwater wrote: On 9 Jul 2020, at 08:32, Hans Hagen wrote: On 7/8/2020 8:14 PM, Gerben Wierda wrote: I found out this in the PDF spec: The minimum page size should be 3 by 3 units in default user space; the I never noticed that ... what section/paragraph in the

Re: [NTG-context] Minimum METAPOST code produces problematic PDF

2020-07-08 Thread Aditya Mahajan
On Wed, 8 Jul 2020, Gerben Wierda wrote: I found out this in the PDF spec: The minimum page size should be 3 by 3 units in default user space; the maximum should be 14,400 by 14,400 units. So, does the following work: \startMPpage[instance=doublefun, offset=2pt] draw (0,0)--(100,0) dashed

Re: [NTG-context] Minimum METAPOST code produces problematic PDF

2020-07-08 Thread Hans Hagen
On 7/8/2020 8:14 PM, Gerben Wierda wrote: I found out this in the PDF spec: The minimum page size should be 3 by 3 units in default user space; the I never noticed that ... what section/paragraph in the spec? maximum should be 14,400 by 14,400 units. So we should bump tex's maxima ... A

Re: [NTG-context] Minimum METAPOST code produces problematic PDF

2020-07-08 Thread Gerben Wierda
I found out this in the PDF spec: The minimum page size should be 3 by 3 units in default user space; the maximum should be 14,400 by 14,400 units. Apparently, Adobe InDesign demands that in a hard way. G > On 8 Jul 2020, at 01:08, Jairo A. del Rio wrote: > > Evince and Okular (Linux) open t

Re: [NTG-context] Minimum METAPOST code produces problematic PDF

2020-07-07 Thread Jairo A. del Rio
Evince and Okular (Linux) open the PDF output without warnings nor issues. Jairo :) El mar., 7 de jul. de 2020 a la(s) 17:50, Gerben Wierda ( gerben.wie...@rna.nl) escribió: > The following code: > > \startMPpage[instance=doublefun] > draw (0,0)--(100,0) dashed withdots; > \stopMPpage > > When

[NTG-context] Minimum METAPOST code produces problematic PDF

2020-07-07 Thread Gerben Wierda
The following code: \startMPpage[instance=doublefun] draw (0,0)--(100,0) dashed withdots; \stopMPpage When run through LuaMetaTeX produces a PDF about which Acrobat complains: The dimensions of this page are out-of-range. Page content might be truncated. and Adobe InDesign cannot han

Re: [NTG-context] error running wiki example with labels

2020-06-26 Thread Jan-Erik Hägglöf
/context-osx-64/tex/texmf-context/tex/context/base/mkiv/meta-imp-dum.mkiv' close source> level 3, order 5, name '/Users/janneman/context-osx-64/tex/texmf-context/tex/context/base/mkiv/meta-imp-dum.mkiv' metapost> library 'dum' is loaded metapost

[NTG-context] error running wiki example with labels

2020-06-24 Thread Jan-Erik Hägglöf
unknown font 'IBMPlexSans-regular', loading aborted fonts > defining > unable to define 'IBMPlexSans-regular' as 'ibmplex-11pt-ss-tf-0--0' open source > level 3, order 6, name '/Users/janneman/context-osx-64/tex/texmf-context/tex/context/

Re: [NTG-context] spacing before items

2020-06-23 Thread Hans Hagen
e if your whole live (which is posisble because it stays around) - if one is happy with word and it does what it does better and faster .. don't use tex; i admit that i never used word but then, i never had to make documents of that kind (just like i alway suse metapost and never used

[NTG-context] METAPOST's uniformdeviate is not truly random (seed)

2020-06-23 Thread Gerben Wierda
I’m trying to get a real random number in METAPOST MWE: \startMPpage[instance=doublefun] show uniformdeviate 60; \stopMPpage Every time I run this, it shows the same result. I tried playing around with the randomseed, but for instance when I do two runs shortly after each other they still are

Re: [NTG-context] METAPOST's uniformdeviate is not truly random (seed)

2020-06-23 Thread Wolfgang Schuster
    Gerben Wierda schrieb am 23.06.2020 um 17:57: I’m trying to get a real random number in METAPOST MWE: \startMPpage[instance=doublefun] show uniformdeviate 60; \stopMPpage Every time I run this, it shows the same result. I tried playing around with the randomseed, but for instance when I

Re: [NTG-context] How to define an array of pens

2020-06-22 Thread Otared Kavian
he following working example below, I would like to replace >> >> MyPens[j] := pencircle scaled 2pt ; >> >> by something like >> >> MyPens[j] := pencircle scaled (2+j) pt ; > > MyPens[j] := pencircle scaled ((2+j)*pt); > > “pt” is just a multiplier

Re: [NTG-context] How to define an array of pens

2020-06-22 Thread Taco Hoekwater
ce > > MyPens[j] := pencircle scaled 2pt ; > > by something like > > MyPens[j] := pencircle scaled (2+j) pt ; MyPens[j] := pencircle scaled ((2+j)*pt); “pt” is just a multiplier variable in MetaPost. there is an implied multiplication operation, but that only work

Re: [NTG-context] How to define an array of colors in Metafun

2020-06-20 Thread Hans Hagen
On 6/20/2020 4:48 PM, Otared Kavian wrote: Hi all, I have a family of graphs to draw in Metapost and I would like to attribute a different color to each of them according to the value of a certain variable. Assuming that the path mygraph(j) depends on the variable j, which is computed within

[NTG-context] How to define an array of colors in Metafun

2020-06-20 Thread Otared Kavian
Hi all, I have a family of graphs to draw in Metapost and I would like to attribute a different color to each of them according to the value of a certain variable. Assuming that the path mygraph(j) depends on the variable j, which is computed within a lua code and passed to Metapost, I wonder

Re: [NTG-context] Using \defineoverlay for a framed text

2020-06-16 Thread Willi Egger
Hi Marco, thank you! :-) Willi > On 16 Jun 2020, at 14:44, Marco Patzer wrote: > > On Tue, 16 Jun 2020 14:37:17 +0200 > Marco Patzer wrote: > >> On Tue, 16 Jun 2020 14:17:09 +0200 >> Willi Egger wrote: >> >>> I try to use a Metapost drawing as

Re: [NTG-context] Using \defineoverlay for a framed text

2020-06-16 Thread Marco Patzer
On Tue, 16 Jun 2020 14:37:17 +0200 Marco Patzer wrote: > On Tue, 16 Jun 2020 14:17:09 +0200 > Willi Egger wrote: > > > I try to use a Metapost drawing as a background to a framed text. — > > I can not make it working though… > > > > \startuniqueMPgraphic{Marki

Re: [NTG-context] Using \defineoverlay for a framed text

2020-06-16 Thread Marco Patzer
On Tue, 16 Jun 2020 14:17:09 +0200 Willi Egger wrote: > I try to use a Metapost drawing as a background to a framed text. — I > can not make it working though… > > \startuniqueMPgraphic{Markings} > %{Markings:\overlaywidth:\overlayheight} fill OverlayBox enlarged 5mm &

[NTG-context] Using \defineoverlay for a framed text

2020-06-16 Thread Willi Egger
Hello listmembers, I try to use a Metapost drawing as a background to a framed text. — I can not make it working though… \startuniqueMPgraphic{Markings} %{Markings:\overlaywidth:\overlayheight} fill OverlayBox enlarged 5mm withcolor blue; \stopuniqueMPgraphic \defineoverlay[Marks

[NTG-context] Pre-registration for 14th ConTeXt Meeting, September 6–12, 2020

2020-06-02 Thread Jano Kula
nd development of LuaMetaTeX, ConTeXt, and everything related. Each meeting is source of inspiration for everybody, from beginner to expert. Friendly company is always looking for meeting new participants, users of LuaTeX, LuaMetaTeX, ConTeXt, Metapost, etc. There is a special discount for those, who a

Re: [NTG-context] LMTX: different output if dots are used in the file name

2020-05-29 Thread Hans Hagen
hurry. The production projects run on some oldish 2019 MkIVs anyway. I'm trying to get my feet wet with lmtx and run it on some projects to check how usable and compatible it is. It should be compatible, although at some point there will be functionality that is only in lmtx. Okay, metapost is an exce

Re: [NTG-context] 'debug' version of METAPOST draw?

2020-05-28 Thread Keith McKay
Would Chapter 11, section 11.1 Showing Paths of the MetaPost manual, be any help here? Below is a MWE of a random path of curves and straight lines. The points are shown using drawpoints. The arrow path and control lines are also shown and are better described in the Metapost manual

[NTG-context] 'debug' version of METAPOST draw?

2020-05-28 Thread Gerben Wierda
I would like to be able (during development) to draw paths where the points of the path (and maybe thing slike directions) are visualised. E.g. a path where each pair in teh path is also drawn as a dot and maybe teh directions drawn as small arrows. Does someone have such a beast lying around?

Re: [NTG-context] [pretty printing python]

2020-05-24 Thread Henning Hraban Ramm
> Am 24.05.2020 um 14:04 schrieb Floris van Manen : > > Does anyone know how to activate/use the pretty printing of python code? > > \starttyping[option=python] > > does not work. No, ConTeXt supports only TeX, XML, MetaPost and Lua. Try Aditya’s vim module: https

Re: [NTG-context] ntg-context Digest, Vol 191, Issue 66

2020-05-20 Thread jk...@inradius.net
> Message: 5 > Date: Wed, 20 May 2020 15:38:23 -0400 (EDT) > From: Aditya Mahajan mailto:adit...@umich.edu>> > Subject: Re: [NTG-context] metapost boxes error > > On Wed, 20 May 2020, jk...@inradius.net <mailto:jk...@inradius.net> wrote: > >> Is the

Re: [NTG-context] metapost boxes error

2020-05-20 Thread Aditya Mahajan
On Wed, 20 May 2020, jk...@inradius.net wrote: Is there a different approach to use boxes.mp? MNWE: \startMPpage input boxes.mp; boxit.bl("left"); boxit.br("right"); br.sw - bl.ne = (20,0); drawboxed(bl,br); \stopMPpage Move `input boxes` outside the `\startMPpage`. \startMPdefinitions

[NTG-context] metapost boxes error

2020-05-20 Thread jk...@inradius.net
int: english/english metapost log> loading metafun, including plain.mp version 1.004 for metafun iv and xl metapost log> metapost log> >> _dojoin metapost log> ! Isolated expression. __

[NTG-context] Looking for a way to use lua to output console/debug messages from MetaPost instead of 'show'

2020-05-18 Thread Gerben Wierda
I often need some debugging info to find out what is going on in my METAPOST code (as I often do not have exact knowledge of what some things do). MetaPost’s ‘show’ command has limited formatting functionality (e.g. I would like to add a number as a string to a show message instead of putting

Re: [NTG-context] Arithmetic Overflow error in MetaFun

2020-05-17 Thread Keith McKay
d through the mailing list archives and it seems that > > if I add [instance=doublefun] I do not get the Arithmetic Overflow > > error. Joy! > fwiw, we have also instance=decimalfun > > concerning arithmic: > > in metapost we have > > scaled : upto 4K bp > doubl

Re: [NTG-context] Arithmetic Overflow error in MetaFun

2020-05-16 Thread Hans Hagen
: in metapost we have scaled : upto 4K bp double : 64 bit floats decimal : configurable accuracy complex : dual doubles (only in luametafun) in lmtx lua we have: integer : lua tries to be clever but mixing leads to double float: lua tries to be clever decimal : userdata arbitrary precision (on

Re: [NTG-context] Using transparency in METAPOST within textext()

2020-05-14 Thread Gerben Wierda
Thank you. That works. > On 14 May 2020, at 17:13, Wolfgang Schuster > wrote: > > Gerben Wierda schrieb am 14.05.2020 um 11:47: >> Is it possible to get a transparent background in a textext()? The following >> minimal example doesn’t work. >> \starttext >> \setupMPpage >> [background=color,

Re: [NTG-context] Using transparency in METAPOST within textext()

2020-05-14 Thread Wolfgang Schuster
Gerben Wierda schrieb am 14.05.2020 um 11:47: Is it possible to get a transparent background in a textext()? The following minimal example doesn’t work. \starttext \setupMPpage   [background=color,    backgroundcolor=gray] \startMPpage draw textext("\definecolor[labelbackground][a=0.2,r=1,g=

[NTG-context] Using transparency in METAPOST within textext()

2020-05-14 Thread Gerben Wierda
Is it possible to get a transparent background in a textext()? The following minimal example doesn’t work. \starttext \setupMPpage [background=color, backgroundcolor=gray] \startMPpage draw textext("\definecolor[labelbackground][a=0.2,r=1,g=1,b=1]\framed[height=1.2em,background=color,backgr

[NTG-context] \goto works but links don't when passed via textext() in METAPOST

2020-05-10 Thread Gerben Wierda
I am trying to get an URL link in a textext() via METAPOST. I’ve got this before \starttext (or after, tried both): \setupinteraction [state=start, color=blue, style=bold] The intended link shows up in blue and bold, but it is not clickable. I’ve turned ConTeXt tracing on and see

[NTG-context] Would it be possible in LMTX to do something like variable font/lineheight to fit a fixed frame?

2020-05-10 Thread Gerben Wierda
Suppose I have a fixed sized frame, say 3 y 4 cm. And I have a variable-length text. Would it be possible to write a macro that scaled the font and line height such that the text will fit in the frame? What I have now is very basic: Fixed width Typeset (METAPOST textext

Re: [NTG-context] METAPOST subpath rounding issue

2020-05-10 Thread Gerben Wierda
> On 10 May 2020, at 00:01, Bruce Horrocks wrote: > >> You can save extracting the xparts and yparts by using direct subtraction of >> pairs and comparing with (0,0) like this: > > Aaaargh, no, ignore that, it's nonsense. It's amazing how you can stare at > something for minutes but only see

Re: [NTG-context] METAPOST subpath rounding issue

2020-05-09 Thread Bruce Horrocks
> You can save extracting the xparts and yparts by using direct subtraction of > pairs and comparing with (0,0) like this: Aaaargh, no, ignore that, it's nonsense. It's amazing how you can stare at something for minutes but only see the flaw the moment you press send. Sorry for the noise. -- B

Re: [NTG-context] METAPOST subpath rounding issue

2020-05-09 Thread Bruce Horrocks
> On 8 May 2020, at 13:58, Gerben Wierda wrote: > >> On 8 May 2020, at 00:46, n...@scorecrow.com wrote: >> >>> On 7 May 2020, at 20:28, Gerben Wierda wrote: >>> >>> I have a METAPOST algorithm that splits a path at a certain time in two, &g

Re: [NTG-context] error during the installation of luametatex

2020-05-09 Thread Rik Kabel
d the LuaTeX source. Functionality : level 20200402 Support   : cont...@ntg.nl <mailto:cont...@ntg.nl> Copyright : The Lua(Meta)TeX Team(s) (2005-2020+) The LuaMetaTeX project is related to ConTeXt development. This macro package

Re: [NTG-context] error during the installation of luametatex

2020-05-09 Thread Giulio Bertellini
'luametatex --credits' for credits and version details. > > There is NO warranty. Redistribution of this software is covered by the > terms > of the GNU General Public License, version 2 or (at your option) any later > version. For more information about these matters, s

Re: [NTG-context] error during the installation of luametatex

2020-05-09 Thread Rik Kabel
t : The Lua(Meta)TeX Team(s) (2005-2020+) The LuaMetaTeX project is related to ConTeXt development. This macro package tightly integrates TeX and MetaPost in close cooperation with Lua. And the context version report is: mtx-context | ConTeXt Process Management 1.03 mtx-conte

Re: [NTG-context] METAPOST subpath rounding issue

2020-05-08 Thread Gerben Wierda
> On 8 May 2020, at 00:46, n...@scorecrow.com wrote: > > > >> On 7 May 2020, at 20:28, Gerben Wierda wrote: >> >> I have a METAPOST algorithm that splits a path at a certain time in two, >> does something with both ends (not the ends where they w

[NTG-context] METAPOST subpath rounding issue

2020-05-07 Thread Gerben Wierda
I have a METAPOST algorithm that splits a path at a certain time in two, does something with both ends (not the ends where they were split) and then rejoins them. In very rare cases this crashes, because the subpath doesn’t work as expected. firstPart := subpath (0,halfWayTime) of

Re: [NTG-context] METAPOST subpath rounding issue

2020-05-07 Thread ntg
> On 7 May 2020, at 20:28, Gerben Wierda wrote: > > I have a METAPOST algorithm that splits a path at a certain time in two, does > something with both ends (not the ends where they were split) and then > rejoins them. > > In very rare cases this crashes, because the su

Re: [NTG-context] lmt_followtext crashes while standard followtext itself works

2020-05-04 Thread Hans Hagen
this code with: metapost log    > ! angle(0,0) is taken as zero. metapost log    > ...0)]shifted(-wid/2,0)rotated(angle(ad)) metapost log    > shifted.ap;draw.pic[(EXPR0... metapost log    > ...caled0.5pt.withcolor.green;

[NTG-context] lmt_followtext crashes while standard followtext itself works

2020-05-03 Thread Gerben Wierda
trols (195,-166.25981210471718) and (195,-166.62995945812031) ..(195,-167.00010681152344); picture pic; pic := lmt_followtext [ text = texstring, path = parpath, spread = false, ]; \stopMPpage \stoptext lmt_followtext crashes on this code with: metapost log> ! angle(0,0) is taken as zero.

Re: [NTG-context] followtext, lmt_followtext and an offset of the glyphs typeset along the path (suggestion works)

2020-05-03 Thread Gerben Wierda
only going up (though the distance to >>> the path would vary, on the sides the text would be very close or on the >>> top it would be too far.) >>> >> >> There is an example, at the link below, of creating a parallel path that >> claims to cope wi

Re: [NTG-context] followtext, lmt_followtext and an offset of the glyphs typeset along the path

2020-05-03 Thread Gerben Wierda
o single shift that helps me. Nor a scale rotation or shift >> combination. That could be managed by only going up (though the distance to >> the path would vary, on the sides the text would be very close or on the top >> it would be too far.) >> > > There

Re: [NTG-context] followtext, lmt_followtext and an offset of the glyphs typeset along the path

2020-05-02 Thread ntg
ose or on the top > it would be too far.) > There is an example, at the link below, of creating a parallel path that claims to cope with sharp bends in the original path. You might be able to adapt it? <https://therion.speleo.sk/wiki/metapost#shuttering_two_parallel_lines> -- Bruce H

Re: [NTG-context] How do I get an empty line in a \framed[align=flushleft]{} item?

2020-05-01 Thread Gerben Wierda
> On 1 May 2020, at 13:28, Hans Hagen wrote: > > On 5/1/2020 10:21 AM, Gerben Wierda wrote: >> code it back to a \ ? E.g. something like >>{ ‘\U{XXX}', '\' }, > \utfchar{100} > \Uchar 100 Yes, but the question was: how do I code this in the X

Re: [NTG-context] How do I get an empty line in a \framed[align=flushleft]{} item?

2020-05-01 Thread Hans Hagen
XML and get it through my XML-lua-METAPOST-textext() path so that e.g. or in the XML end up as \ in my textext() string? E.g. a in XML becomes a \n when lmtx XML handling has read the XML (so gets transformed on read). I’ve been thinking about the route -> \r -> \ (so, misusing \r t

Re: [NTG-context] How do I get an empty line in a \framed[align=flushleft]{} item?

2020-05-01 Thread Hans Hagen
XML and get it through my XML-lua-METAPOST-textext() path so that e.g. or in the XML end up as \ in my textext() string? E.g. a in XML becomes a \n when lmtx XML handling has read the XML (so gets transformed on read). I’ve been thinking about the route -> \r -> \ (so, misusing \r t

Re: [NTG-context] How do I get an empty line in a \framed[align=flushleft]{} item?

2020-04-30 Thread Gerben Wierda
setting ago. But I thought of a solution. Background: I am automatically converting input from an XML file to METAPOST/ConTeXt. The input may contain one or more newlines.The text must end up in \framed[align=??, width=??] to be typeset. I use lua to convert and make it safe to pass to MET

[NTG-context] Is this a MetaFun bug or intended behaviour?

2020-04-30 Thread Gerben Wierda
I wanted to use the macro simplified to remove duplicate points from a path, but it removes more than that: metapost log> (127,-107)..controls (117,-107) and (107,-107) metapost log> ..(97,-107)..controls (97,-130.34) and (97,-153.66) metapost log&g

Re: [NTG-context] Using \startuseMPgraphic inside a textext() in METAPOST?

2020-04-27 Thread Hans Hagen
On 4/27/2020 10:47 AM, Gerben Wierda wrote: I am in METAPOST which is inside TeX and I’d like (in METAPOST, not in TeX) to let a string follow a path. Adapting from the MetaFun manual around page 250, I tried this: \starttext \startMPpage[instance=doublefun] pic p; p := textext

[NTG-context] Using \startuseMPgraphic inside a textext() in METAPOST?

2020-04-27 Thread Gerben Wierda
I am in METAPOST which is inside TeX and I’d like (in METAPOST, not in TeX) to let a string follow a path. Adapting from the MetaFun manual around page 250, I tried this: \starttext \startMPpage[instance=doublefun] pic p; p := textext("\startuseMPgraphic[instance=doublefun]{followtokens

[NTG-context] \framed[align=] with a 'maxwidth' instead of a width? Or get the size of a \frame returned to lua without typesetting it in a document?

2020-04-26 Thread Gerben Wierda
Setup: TeX file Contains ctxlua{} call lua function reads XML file and calls context() statements, it puts out a \startMPpage METAPOST statements Of which some are textext(\framed[align, so

Re: [NTG-context] Solution: METAPOST textext() eats my \pars. Was: Setting vertical spacing of lines inside a \framed[align=]

2020-04-25 Thread Gerben Wierda
0, >> b=0.000]{\switchtobodyfont[11.0pt] \setupinterlinespace[14pt] \rm >> [My]\\Application\\(Component)\par }} > > Thank you, that works. (Can’t put in the images to show, as this gets my > message over 100k) > > But it turns out, I have an additional problem because I

[NTG-context] METAPOST textext() eats my \pars. Was: Setting vertical spacing of lines inside a \framed[align=]

2020-04-24 Thread Gerben Wierda
put in the images to show, as this gets my message over 100k) But it turns out, I have an additional problem because I am doing this inside a textext() from METAPOST and that seems to strip the \pars again. Tracking ConTeXt: cld > tex > f : 8 : picture pic; x:=33.000; y:=

[NTG-context] METAPOST textext() eats my \pars. Was: Setting vertical spacing of lines inside a \framed[align=]

2020-04-24 Thread Gerben Wierda
r to make the change of > linespacing work: > > \framed[align=flushright,frame=on,offset=none,width=106.400bp]{\colored[r=0.000, > g=0.000, > b=0.000]{\switchtobodyfont[11.0pt] \setupinterlinespace[14pt] \rm > [My]\\Application\\(Component)\par }} Thank you, that works: B

Re: [NTG-context] Basic font question (Optima, but no bold, no italics)

2020-04-23 Thread kaddour kardio
te: > >> > >>> > >>> Am 23.04.2020 um 16:42 schrieb Gerben Wierda : > >>> > >>>> > >>>> On 23 Apr 2020, at 16:34, Henning Hraban Ramm wrote: > >>>> > > [...] > > >>>> What do you get from

Re: [NTG-context] Basic font question (Optima, but no bold, no italics)

2020-04-23 Thread Vladimir Lomov
amm wrote: >>>> [...] >>>> What do you get from >>>> mtxrun --script=fonts --list --all --pattern=Optima >>> >>> hermione:Export and Metapost gerben$ mtxrun --script fonts --list --all >>> --pattern=optima >>> identifier

Re: [NTG-context] Basic font question (Optima, but no bold, no italics)

2020-04-23 Thread Gerben Wierda
;>>>> https://wiki.contextgarden.net/Font_Switching >>>>> >>>>>> What do I need to do to get actual bold and italics in my output? >>>>> >>>>> \bi == \bf\it >>>>> >>>>> Or by

Re: [NTG-context] Basic font question

2020-04-23 Thread Henning Hraban Ramm
t? >>>> >>>> \bi == \bf\it >>>> >>>> Or by "actual bold" you mean something different? >>> >>> Yes, in my output everything is regular, there is no bold or italics text, >>> even when I use \bf or \it >>

Re: [NTG-context] Basic font question

2020-04-23 Thread Gerben Wierda
;> https://wiki.contextgarden.net/Font_Switching >>> >>>> What do I need to do to get actual bold and italics in my output? >>> >>> \bi == \bf\it >>> >>> Or by "actual bold" you mean something different? >> >> Y

Re: [NTG-context] METAPOST: How do I get this 'max' cutafter to work?

2020-04-22 Thread Gerben Wierda
> On 22 Apr 2020, at 09:30, Taco Hoekwater wrote: > > Hi, > >> On 21 Apr 2020, at 17:52, Gerben Wierda wrote: >> >>> pair a ; a := arrowHead intersection_point connection ; > > Hans’ example also works with “intersectionpoint”: the differences between > intersectionpoint > and intersection_p

Re: [NTG-context] METAPOST: How do I get this 'max' cutafter to work?

2020-04-22 Thread luigi scarso
On Wed, Apr 22, 2020 at 9:30 AM Taco Hoekwater wrote: > > In contrast, intersectionpoint finds the first intersection on the > non-reversed paths, which > is the base of the arrowhead. > > IIrc , it's the first in shuffle order @ Incidentally, if the given cubics intersect more than once, the p

Re: [NTG-context] METAPOST: How do I get this 'max' cutafter to work?

2020-04-22 Thread Taco Hoekwater
Hi, > On 21 Apr 2020, at 17:52, Gerben Wierda wrote: > >> pair a ; a := arrowHead intersection_point connection ; Hans’ example also works with “intersectionpoint”: the differences between intersectionpoint and intersection_point are minimal except if there is no intersection at all. The tric

Re: [NTG-context] METAPOST: How do I get this 'max' cutafter to work?

2020-04-21 Thread Hans Hagen
On 4/21/2020 5:52 PM, Gerben Wierda wrote: Pretty deep into MP now. Even looked up the reference in John Hobby’s manual to the METAFONT book, but that reference did not help. in the end it all has to do with accuracy and rounding ... the intersection_point trickery is probably less sensitive fo

Re: [NTG-context] METAPOST: How do I get this 'max' cutafter to work?

2020-04-21 Thread Gerben Wierda
d. The first algo that I was using worked fine in most cases, as well, then I created one that worked with paths with ‘internal spikes’ and now I run into this where two comparable situations behaved differently and my question copied the one that didn’t work. And while this example from yo

Re: [NTG-context] METAPOST: How do I get this 'max' cutafter to work?

2020-04-21 Thread Hans Hagen
On 4/21/2020 1:29 PM, Gerben Wierda wrote: I have these two paths, but cutting doesn’t work because the path to be cut takes the wrong intersection regardless of how I direct the path to be cut after (reverse or not). The path to cut after is a triangle with the base horizontal and the path t

[NTG-context] METAPOST: How do I get this 'max' cutafter to work?

2020-04-21 Thread Gerben Wierda
I have these two paths, but cutting doesn’t work because the path to be cut takes the wrong intersection regardless of how I direct the path to be cut after (reverse or not). The path to cut after is a triangle with the base horizontal and the path to cut is a vertical line. The top of the tria

Re: [NTG-context] Passing the parameters of a frame in an environment \startMPcode ... \stopMPcode

2020-04-20 Thread Fabrice Couvreur
> compatibility, performance ...), this is only possible with > \startframed. > >> > >> 3. ConTeXt uses different mechanism to draw rectangular (unless you > draw a > >> closed frame) and rounded frame and the mechanism for rounded frames > doesn't >

Re: [NTG-context] Passing the parameters of a frame in an environment \startMPcode ... \stopMPcode

2020-04-20 Thread Wolfgang Schuster
t you can now a) use MetaPost to draw the complete card (letter plus frame) or b) use only TeX to put the letter in a frame and rotate it. begin tex example \usecolors[svg] \defineframed [frameletter] [width=1.25em, height=1.75em, foregroundstyle=\ssbfc, corner=round,

Re: [NTG-context] Passing the parameters of a frame in an environment \startMPcode ... \stopMPcode

2020-04-20 Thread Rudolf Bahr
esn't > work with outlinetext. > > 4. To achieve the desired result you can now a) use MetaPost to draw the > complete card (letter plus frame) or b) use only TeX to put the letter in a > frame and rotate it. > > begin tex example > \usecolors[svg] > >

Re: [NTG-context] Passing the parameters of a frame in an environment \startMPcode ... \stopMPcode

2020-04-20 Thread Wolfgang Schuster
different mechanism to draw rectangular (unless you draw a closed frame) and rounded frame and the mechanism for rounded frames doesn't work with outlinetext. 4. To achieve the desired result you can now a) use MetaPost to draw the complete card (letter plus frame) or b) use only TeX to put t

Re: [NTG-context] animation using \startuseMPgraphic

2020-04-19 Thread Aditya Mahajan
t %\startplacefigure[] \startanimation[menu=yes] \dorecurse{10}{ \useMPgraphic{inversionPoint}{n=\recurselevel} } \stopanimation %\stopplacefigure \stoptext Also see my simple wrapper around this: https://adityam.github.io/context-blog/post/metapos

Re: [NTG-context] "Remember picture" does not work (again)

2020-04-17 Thread Jairo A. del Rio
> \lastxpos ->\clf_lastxpos >> > >> > \noexpand \pgfsyspdfmark {pgfid1}{\the \lastxpos >> > >> > }{\the \lastypos } >> > >> > >> > >> > }\endwrite >> > >> > \shipoutscratchbox >> > >> > \

Re: [NTG-context] Best way to create a large number of documents from database

2020-04-17 Thread Mojca Miklavec
st adds up when talking about thousands of pages. This greatly reminds me on the awesome speedup that Hans achieved when rewriting the mplib code & the initial \sometxt changes inside metapost which also lead to 100-fold speedups as one no longer needed to start TeX a zillion times.) While wai

Re: [NTG-context] Best way to create a large number of documents from database

2020-04-16 Thread Mojca Miklavec
ommand line values in a TeX document; writing a script?" Thanks a lot for the pointer. I didn't have that much time to read through all the emails recently, I only noticed that he was super actively working on some metapost stuff, I wasn't paying attention to this. > The replie

Re: [NTG-context] running lua in metafun and in ConTeXt

2020-04-11 Thread Otared Kavian
s code to a ConTeXt file composed product > and components, > and using the second method, i.e. combi(n,r). The first method is still > working well. > The error message is as following: > > metapost log> loading metafun, including plain.mp version 1.004 for > metafun iv a

<    3   4   5   6   7   8   9   10   11   12   >