[NTG-context] Re: Metapost logo typesetting

2024-08-03 Thread Shiv Shankar Dayal
Many thanks. It worked like a charm. On Sun, Aug 4, 2024 at 11:44 AM Pablo Rodriguez via ntg-context < ntg-context@ntg.nl> wrote: > On 8/4/24 06:45, Shiv Shankar Dayal wrote: > > Hi, > > > > I believe that there is a LaTeX package which typesets the METAPOST text >

Re: [NTG-context] [metapost] Stroke Font

2015-05-17 Thread Wolfgang Schuster
> Am 17.05.2015 um 22:54 schrieb Troy Henderson : > > I updated pstoedit, and it functions as expected. > > This is not a MetaPost question but rather a ConTeXt question: How do I use > Arev Bold (Sans) in ConTeXt? Use the DejaVu fonts which are like Arev Sans a extended v

Re: [NTG-context] Info about MetaPost

2016-09-09 Thread luigi scarso
On Fri, Sep 9, 2016 at 12:47 PM, Nicola wrote: > Hi, > I write to this mailing list because the MetaPost mailing list has been > silent for a while. I hope it is ok. > > I am getting to grips with MetaPost after a long hiatus, so I have not > followed recent developments. I se

Re: [NTG-context] Info about MetaPost

2016-09-09 Thread Nicola
On 2016-09-09 13:21:21 +, luigi scarso said: On Fri, Sep 9, 2016 at 12:47 PM, Nicola wrote: Hi, I write to this mailing list because the MetaPost mailing list has been silent for a while. I hope it is ok. I am getting to grips with MetaPost after a long hiatus, so I have not followed

[NTG-context] question for metapost experts

2017-08-10 Thread Schmitz Thomas A.
Hi all, this one is for all the metapos/metafun experts out there (Alan, are you there?). For a counter in one of my slide backgrounds, I have to calculate an intersectionpoint, given in percentage of the difference between current page and last page. I have always had some difficulties on the

[NTG-context] about makempy (metapost outlines)

2018-02-18 Thread Jeong Dal
Hi, During the search Euler font, I found a manual “creating metapost outlines”. It is what I looking for at the last year. I tried an example for section head, but it issued an undefined control sequence message. Please tell me what is wrong and how to change. I copied the sample code and

[NTG-context] Circled text in metapost

2018-03-29 Thread Gerhard Kugler
Hi, in documentations I can find various examples of circled text. But copying them I had no success till now. I want to place text in half circles of various radiuses. Is there anywhere a simple example? My greatest problems seem to be in the embedding code. Gerhard -- Gerhard Kugler Benshe

[NTG-context] Metapost graphic in setupbackground

2019-02-08 Thread Jan U. Hasecke
Hi all, I make my first steps with Metapost. I would like to set the background of all pages to a Metapost graphic. But only the first page has the defined background. I also tried with \startuseMPgraphic with no success --- mwe --- \startreusableMPgraphic{kreis} draw fullcircle scaled

[NTG-context] fontsize drawing in metapost

2013-05-06 Thread Meer, H. van der
What is the simplest way to change the size of fonts in labels drawn in MetaPost? \switchtobodyfont[size] can be done in \startMPenvironment and inside each label. But is it possible to have: set-font-to-size1 draw labels set-font-to-size2 draw more labels Hans van der Meer

[NTG-context] MetaPost label direction prefix

2013-08-23 Thread Marco Patzer
traditional MetaPost. Is this prefix required? It breaks old code and required a branch in every new project. And I don't really see a reason for this incompatibility. Here is an example defining a new direction “foo”: \starttext \startMPcode label("first", origin); %% M

Re: [NTG-context] Request for metapost

2013-12-22 Thread Hans Hagen
On 12/21/2013 12:50 PM, DesdeChaves wrote: I know that metapost can send the variables "version", "number", "string", "point", "quad", "boolean" and "path" to Context. "triplet" variable can't pass. It will be

Re: [NTG-context] Request for metapost

2013-12-22 Thread Hans Hagen
On 12/22/2013 3:57 PM, Hans Hagen wrote: On 12/21/2013 12:50 PM, DesdeChaves wrote: I know that metapost can send the variables "version", "number", "string", "point", "quad", "boolean" and "path" to Context. "triplet

Re: [NTG-context] Request for metapost

2013-12-23 Thread DesdeChaves
Thanks very much for your support. Jorge 2013/12/22 Hans Hagen > On 12/22/2013 3:57 PM, Hans Hagen wrote: > >> On 12/21/2013 12:50 PM, DesdeChaves wrote: >> >>> >>> I know that metapost can send the variables "version", "number", >&g

Re: [NTG-context] Request for metapost

2013-12-23 Thread Hans Hagen
On 12/23/2013 4:52 PM, DesdeChaves wrote: Three ways to generate poisson data. Thanks for Hans Hagen, Alan Braslou and Anthony Phan. as you use swig you can also put your library in /tex/texmf-linux-64/bin/lib/luatex/lua/swiglib/randist/core.so and then (given that you've run mtxrun --generat

[NTG-context] Statistical module for Metapost

2013-12-23 Thread DesdeChaves
I'm trying play with the statistical package** for metapost from Anthony Phan. I found this strange problem: This code runs fine: \startMPcode label.bot(btex Metapost and Statistics etex,(5mm,0)) ; \stopMPcode Also, this code run fine: \startMPcode input mps-core.mp; draw fullcircle s

Re: [NTG-context] Request for metapost

2013-12-25 Thread Peter Rolf
Also thanks from my side. Just what I needed for further tests (graphics with multiple paths). Peter Am 22.12.2013 19:10, schrieb Hans Hagen: > \starttext > > % \enabletrackers[metapost.variables] > > \startMPcode > numeric n[] ; for i=1 upto 10: n[i] := 1/i ; endfor ; > pathp[]

[NTG-context] [metapost] troubles with labels

2013-12-29 Thread Pol Stra
Dear all, with this minimalist content of metapost file: ``` beginfig(1); dotlabel.ulft("A", origin); endfig; end. ``` And this conteXt file: ``` \starttext \startMPrun input mymp.mp; \stopMPrun \externalfigure[mprun.21][width=5cm] \stoptext ``` The resulting pdf file c

Re: [NTG-context] Metapost and Metafun

2014-05-21 Thread Hans Hagen
On 5/21/2014 7:55 PM, Fabrice Couvreur wrote: Hi, As PSTricks (which I prefer) is not yet well integrated, I decided to learn Metapost starting with a simple code. \starttext \startMPcode numeric xmin, xmax, ymin, ymax; xmin := -2.5; xmax := 2.5; ymax :=2.5 ;ymin:=-2.5; u := 2cm; vardef f(expr

Re: [NTG-context] Metapost and Metafun

2014-05-21 Thread Fabrice
Hi Hans, Thank you for the code that is cleaner and certainly less long! Fabrice PS : What do you mean by: define 'improve' .. anyway: A step of 0.001 is not needed here and gives a*pretty large path*. ___ If yo

[NTG-context] Strange behavior with Metapost

2014-05-27 Thread Fabrice Couvreur
Hello, Why curve drawn is not that expected ? Fabrice \starttext \startMPcode input hvdm; l:=2.8mm; r:=0.6; alfa:=45; beta:=0; gamma:=0; defineDefaultArrow (l, r, alfa, beta, gamma); numeric xmin, xmax, ymin, ymax; xmin :=-2; xmax := 4; ymax :=5 ;ymin:=-1; u := 1cm; p

Re: [NTG-context] shading in metapost

2008-01-23 Thread Mojca Miklavec
On Jan 16, 2008 8:07 PM, Thomas A. Schmitz wrote: > Hi all, > > I have a somewhat silly question about metapost/metafun. To emphasize > parts of a picture, I place a bright red arrow or circle/ellipse on > top of the picture. I would like to make this arrow more visible by &g

Re: [NTG-context] shading in metapost

2008-01-24 Thread Thomas A. Schmitz
On Jan 16, 2008, at 11:22 PM, John Luciani wrote: > There is some information on doing transparencies in > METAPOST at http://www-math.univ-poitiers.fr/~phan/metalpha.html > > Using the code at the above link you should be able to produce > the effect in your jpeg. > > (* j

Re: [NTG-context] shading in metapost

2008-01-24 Thread Aditya Mahajan
k) ; > endfor ; > > Is this because the expression "pencircle scaled" expects a "numeric > primary" as argument? And is there any way around this? scaled expects a dimension. (i*0.5)pt is not a dimension. You need

Re: [NTG-context] shading in metapost

2008-01-24 Thread Thomas A. Schmitz
nsion. (i*0.5)pt is not a dimension. You need to > either write (i*0.5pt) or ((i*0.5)*1pt). The extra parenthesis are > needed > to keep the metapost parser happy. > > Aditya > Hi Aditya, agh. So easy - and I had no idea how to do it. Works perfectly! I'm glad I&

Re: [NTG-context] shading in metapost

2008-01-24 Thread Hans Hagen
Thomas A. Schmitz wrote: > I never thanked you for your message; sorry about that! Unless I'm > missing something, this page is just about transparency, but that > works quite well in metafun; it was the combination of transparency > and shading which I couldn't get right. in mkiv at some p

Re: [NTG-context] MetaPost 1.004 announcement

2008-05-03 Thread Thomas A. Schmitz
On May 1, 2008, at 11:24 AM, Taco Hoekwater wrote: > The MetaPost team is happy to announce a new release of MetaPost: > > -- > MetaPost 1.004 > ---

Re: [NTG-context] MetaPost 1.004 announcement

2008-05-03 Thread luigi scarso
On Sat, May 3, 2008 at 8:56 PM, Thomas A. Schmitz <[EMAIL PROTECTED]> wrote: > > On May 1, 2008, at 11:24 AM, Taco Hoekwater wrote: > >> The MetaPost team is happy to announce a new release of MetaPost: >> >> ---

Re: [NTG-context] MetaPost 1.004 announcement

2008-05-03 Thread Peter Münster
s? :-) > > # mpost > This is MetaPost, Version 1.004 (Web2C 7.5.5) That means some redundancy in the code: the version number is maintained at two places ("mpost" and "mpost --version"). Cheers, Peter -- http://pmrb.free.fr/contact/ _

Re: [NTG-context] MetaPost 1.004 announcement

2008-05-04 Thread luigi scarso
> > oversight, or are those indeed old binaries (and you forgot to pack >> > the new ones? :-) >> >> # mpost >> This is MetaPost, Version 1.004 (Web2C 7.5.5) > > That means some redundancy in the code: the version number is maintained at > two places ("

Re: [NTG-context] MetaPost 1.004 announcement

2008-05-04 Thread Mojca Miklavec
etc. whichever ones machine has) > > > > > > It would be most natural, I think, if the -arch switch is added > > standard through the autoconf scripts. Taco could see to that for > > metapost and luatex, I trust. Can someone mail this experience to the > >

Re: [NTG-context] MetaPost 1.004 announcement

2008-05-04 Thread Taco Hoekwater
think, if the -arch switch is added > standard through the autoconf scripts. Taco could see to that for > metapost and luatex, I trust. Can someone mail this experience to the > maintainers of pdftex? (I could not ascertain why pdftex compiles > without problems). > > Hans va

Re: [NTG-context] MetaPost 1.004 announcement

2008-05-04 Thread Thomas A. Schmitz
more specific architecture specification affecting instruction set >> and scheduling if one wants to tune the generated code to ones >> processor: CFLAGS -mcpu=G4 (-mcpu=G5 etc. whichever ones machine has) >> >> >> It would be most natural, I think, if the -arch switch

[NTG-context] Metapost beta 1.090 released

2008-07-18 Thread Taco Hoekwater
Hi all, I have just released the archive files for MetaPost 1.090, the first official beta for the new stable version of MetaPost. -- What is new: -- This

[NTG-context] MetaPost graphics within formulas

2008-07-25 Thread Oliver Buerschaper
ptext --- Now if I only knew how to properly align my MetaPost figure with the rest of the formula … any ideas? Cheerio, Oliver ___ If your question is of interest to others as well, please add an entry to the

[NTG-context] passing dimensions to metapost

2008-08-27 Thread Thomas A. Schmitz
Hi all, cleaning up the code in my module, I run into a very interesting problem. I want to pass a user-defined value to Metapost. Until now, the value "scale" had to be numeric, and I used it like this: draw fullcircle scaled \MPvar{scale}mm and Metapost was happy, and I wa

Re: [NTG-context] Some Metapost Problems

2008-10-06 Thread Mojca Miklavec
ins not > big [11pt] with [global]. How can I toggle the two sizes differently? These settings are used exclusevely for btex ... etex and textext. \sometxt uses the surounding font. There could be some settings for fonts in metapost graphics, but I'm not aware of any. However, it'

Re: [NTG-context] Some Metapost Problems

2008-10-07 Thread Wolfgang Werners-Lucchini
gt; .html strange > You need > \runMPgraphicstrue Yes, this helps! But what are the sideeffects? When is the opposite needed? > These settings are used exclusevely for btex ... etex and textext. > \sometxt uses the surounding font. > > There could be some settings for fonts in metapost

Re: [NTG-context] Some Metapost Problems

2008-10-07 Thread Mojca Miklavec
. It might have to do with write18 (perhaps when it's desabled, one of them doesn't work, but I don't really know). >> These settings are used exclusevely for btex ... etex and textext. >> \sometxt uses the surounding font. >> >> There could be some settings for

Re: [NTG-context] Some Metapost Problems

2008-10-08 Thread Taco Hoekwater
Mojca Miklavec wrote: >> >>> You need >>> \runMPgraphicstrue >> Yes, this helps! >> >> But what are the sideeffects? When is the opposite needed? \runMPgraphicfalse is faster when you need two tex runs anyway, because it collects all the graphic

Re: [NTG-context] Some Metapost Problems

2008-10-08 Thread Wolfgang Werners-Lucchini
o tex runs anyway, > because it collects all the graphics in a single metapost run > which is a more efficient way of generating the graphics (in > mkii), > that is its reason for existence. But sometimes it doesn't work, > so having \runMPgraphicstrue in your cont-usr.tex is not a

Re: [NTG-context] Some Metapost Problems

2008-10-08 Thread Taco Hoekwater
Wolfgang Werners-Lucchini wrote: > > I did this, but 'cont-usr.tex' is never included (windows minimal). cont-usr is read by texexec --make (at format generation time) > The file 'core-job.tex' should do this but it is itself not included. but it does (at format generation time) > 'cont-sys.

Re: [NTG-context] metapost behaving different

2008-10-16 Thread Taco Hoekwater
Hi Hans, Hans van der Meer wrote: > > Why is mkii behaving differently and not affected by pen changes? > Is this to be expected from metapost (and thus to be considered normal > behaviour) or did a bug creep in? Can you please post a small complete example? Best

Re: [NTG-context] tikz and metapost

2008-10-26 Thread Jean Magnan de Bornier
Le 26 octobre à 16:24:40 Alan BRASLAU <[EMAIL PROTECTED]> écrit notamment: | Thus, I am trying to figure out where to invest my learning efforts. Do any | other metapost and/or pgf-tikz experts have something to contribute to this | query? Well, I'm certainly not an expert, but I w

Re: [NTG-context] tikz and metapost

2008-10-28 Thread Mojca Miklavec
On Sun, Oct 26, 2008 at 4:24 PM, Alan BRASLAU wrote: > Following some exchange off-list (trying to figure out how tikz under context > got broken), the subject of understanding pgf/tikz with respect to metapost > came up. I am posting a follow-up here as it may be of interest to others

Re: [NTG-context] mkiv and MetaPost

2009-01-13 Thread Aditya Mahajan
On Wed, 14 Jan 2009, Otared Kavian wrote: Hi all, I have a file which contains the lines below: I can typeset it and obtain a correct result with mkii, but not with mkiv (the second buffer named "axes-1" does not result in a MetaPost graphic when one says \processMPbuffer[axes

Re: [NTG-context] mkiv and MetaPost

2009-01-13 Thread Otared Kavian
On 14 janv. 09, at 06:51, Aditya Mahajan wrote: On Wed, 14 Jan 2009, Otared Kavian wrote: Hi all, I have a file which contains the lines below: I can typeset it and obtain a correct result with mkii, but not with mkiv (the second buffer named "axes-1" does not result in

Re: [NTG-context] mkiv and MetaPost

2009-01-13 Thread Taco Hoekwater
Otared Kavian wrote: Thanks Aditya for your explanation, but I must say that it is not convincing because with mkiv one of the buffers is processed with \processMPbuffer, while the other is not… So there must be some other hidden behaviour which has changed between mkii and mkiv. I will lea

Re: [NTG-context] mkiv and MetaPost

2009-01-14 Thread Otared Kavian
my installation: is it removed or I understod wrong? Best wishes: OK % bug-metapost-1.tex %!TEX TS-program = mkiv \setupcolors[state=start] \starttext \startbuffer[axes-1] numeric u ; u := .5cm ; path xox ; xox := (-u,0)--(8u,0) ; path yoy ; yoy := (0,-u)--(0,7u) ; draw xox withcolor

Re: [NTG-context] mkiv and MetaPost

2009-01-14 Thread Taco Hoekwater
Otared Kavian wrote: > > By the way, in one of your messages some time ago you said that there is > a command > \luatexversion > but it doesn't exist on my installation: is it removed or I understod > wrong? Try \the\luatexversion, and \luatexrevision. Best wishes, Taco _

Re: [NTG-context] mkiv and MetaPost

2009-01-14 Thread Otared Kavian
On 14 janv. 09, at 09:31, Taco Hoekwater wrote: Otared Kavian wrote: By the way, in one of your messages some time ago you said that there is a command \luatexversion but it doesn't exist on my installation: is it removed or I understod wrong? Try \the\luatexversion, and \luatexrevi

Re: [NTG-context] mkiv and MetaPost

2009-01-14 Thread Hans Hagen
Otared Kavian wrote: I will leave it for Hans to figure what exactly goes wrong, but the problem is caused by the comment characters in the axes-1 buffer. core-buf.lua: line 253 return concat(t,separator or "\n") -- "\n" is safer due to comments and such (easier fix than passing "\\n"

Re: [NTG-context] mkiv and MetaPost

2009-01-14 Thread Otared Kavian
On 14 janv. 09, at 11:30, Hans Hagen wrote: Hans Hagen wrote: Otared Kavian wrote: I will leave it for Hans to figure what exactly goes wrong, but the problem is caused by the comment characters in the axes-1 buffer. core-buf.lua: line 253 return concat(t,separator or "\n") -- "\n" is

Re: [NTG-context] mkiv and MetaPost

2009-01-14 Thread Hans Hagen
Hans Hagen wrote: Otared Kavian wrote: I will leave it for Hans to figure what exactly goes wrong, but the problem is caused by the comment characters in the axes-1 buffer. core-buf.lua: line 253 return concat(t,separator or "\n") -- "\n" is safer due to comments and such (easier fix

Re: [NTG-context] mkiv and MetaPost

2009-01-14 Thread Otared Kavian
-- "\n" is safer due to comments and such (easier fix than passing "\\n" in meta-ini.mkiv there was some more involved, i'll upload a fixed beta Hi Hans, I tested the new beta mkiv ConTeXt version 2009.01.14 11:29 on many of my files having MetaPost, and everything w

[NTG-context] Labels in MetaPost (MetaObj)

2011-01-18 Thread Stefan Müller
Hi list, I'm having some trouble with MetaPost in general and MetaObj in particular. I hope someone on this list can assist me here. I'm trying to run the appended ConTeXt file with a quite simple object "Segment" (from the manual [1], section 2.1). This script works fine

[NTG-context] metapost fill between outlines

2011-02-20 Thread Reviczky, Adam
can have only one segment (so that regions are simply connected), (...)" (http://en.wikipedia.org/wiki/MetaPost). I thought I ask here before I put this aside. As a workaround I fill out the bigger one with color black and the smaller one with color white, but I need to put this on different

Re: [NTG-context] simpleslides/metapost bug ?

2011-03-13 Thread Thomas Schmitz
On Fri, 11 Mar 2011 16:02:32 +0100 zs wrote: Hello everybody. Can you please confirm that following code fails: \usemodule[simpleslides] \starttext \IncludePicture[horizontal][cow][highlight=yes, alternative=circle, x=1, y=1, xscale=1, yscale=1, shadow=bottomleft]{hello} \stoptext And thi

[NTG-context] Position of MetaPost graphics

2011-04-03 Thread Tim Steenvoorden
Dear list, I'm trying to make some fancy chapter headers. With MetaPost I drew a wave, which I'd like to place in the margin. I've read details.pdf and metafun.pdf, but I don't manage to get the positioning right. The wave should begin where the bottomframe ends and move o

Re: [NTG-context] simpleslides/metapost bug ?

2011-04-04 Thread Henning Hraban Ramm
Am 2011-03-13 um 22:31 schrieb Thomas Schmitz: what fails is the shadow for the highlight. Aditya wrote this code, so please curse him :-) I must admit I don't really understand what he did there. As a workaround (or solution?): line 835 of simpleslides-s-default.tex: withcolor trans

Re: [NTG-context] cmyk in metapost

2011-06-26 Thread Hans Hagen
On 26-6-2011 1:51, Hans van der Meer wrote: I must be doing something wrong. But what? Relevant part of Metapost code: I got the code from the Metafun manual. Beta from ConTeXt ver: 2011.03.28 01:03 MKIV download. Something obvious I am overlooking? cmykcolor is another datatype in mp than

Re: [NTG-context] metapost question (bug?)

2011-07-21 Thread luigi scarso
On Thu, Jul 21, 2011 at 4:39 PM, Alan Braslau wrote: > Hello, > > I have a question for metapost specialists: > > I am looking for some sort of effect, built upon a zig-zag line. > The first graphic in the minimal example below is as I would expect. > The second graphic seem

Re: [NTG-context] metapost question (bug?)

2011-07-21 Thread Peter Rolf
Am 21.07.2011 16:53, schrieb luigi scarso: > On Thu, Jul 21, 2011 at 4:39 PM, Alan Braslau wrote: >> Hello, >> >> I have a question for metapost specialists: >> >> I am looking for some sort of effect, built upon a zig-zag line. >> The first graphic in

Re: [NTG-context] metapost question (bug?)

2011-07-21 Thread Alan Braslau
ole point of this figure -- I am using metapost to achieve very easily an effect, conceptually very simple, that a colleague has not been able to produce using Adobe Illustrator. Thank you again for helping out. Alan

Re: [NTG-context] metapost question (bug?)

2011-07-22 Thread Peter Rolf
that drawing with an asymmetrical pen >> has its own (complex) rules. > > Thank you -- I forgot about the path operator & > same here (i had to browse the metapost manual for the operator) :-) > (Funny thing, though, that the problem shows up with point 0. I would also

Re: [NTG-context] MetaPost glyph operator

2011-08-12 Thread Hans Hagen
On 10-8-2011 11:49, Andreas Harder wrote: Hi all, the following used to work not so long time ago. \startMPpage[offset=1ex] fontmapfile "=lm-ec.map" ; picture q ; path p ; q := (glyph "Q" of "ec-lmr10") ; for item within q : p := pathpart item ; draw p ; endfor ; \stop

Re: [NTG-context] nocolor in MetaPost

2011-10-05 Thread Hans Hagen
On 5-10-2011 19:56, Hans van der Meer wrote: Is there a value that can be given to a color variable in MetaPost that might function as some sort of "no color". Thus something like NULL in the programming language C. not that

Re: [NTG-context] nocolor in MetaPost

2011-10-05 Thread Alan Braslau
On Wed, Oct 05, 2011 at 08:46:22PM +0200, Hans Hagen wrote: > On 5-10-2011 19:56, Hans van der Meer wrote: > > Is there a value that can be given to a color variable in MetaPost that > > might function as some sort of "no color". Thus something like NULL in the &

[NTG-context] metapost not adding picture

2011-10-09 Thread Meer, H. van der
I have this question on the implementation of metapost. The following program ends in an error: \startMPpage picture v; draw origin--(1cm,1cm); v = currentpicture; clearit; draw (1cm,0)--(0,1cm); currentpicture := currentpicture + v; \stopMPpage The error is: ! Not implemented: (picture

[NTG-context] macro string in metapost

2011-11-01 Thread Meer, H. van der
The goal is to make the following string in metapost: string s; where s must become "\MPcolor{Blue}". and ultimately execute this at the right moment with: scantokens s; The following makes s = "MPcolor{Blue}": s := "MPcolor" & char oct"134" &

Re: [NTG-context] Math in metapost

2011-11-30 Thread Otared Kavian
. I put my test file in which some maths is used in a MetaPost graphic here: http://dl.dropbox.com/u/4316076/test-graphique.tex http://dl.dropbox.com/u/4316076/test-graphique.pdf Best regards: OK On 30 nov. 2011, at 20:59, Hans van der Meer wrote: > I would like to put s

Re: [NTG-context] Math in metapost

2011-11-30 Thread Hans Hagen
On 30-11-2011 20:59, Hans van der Meer wrote: I would like to put some math in metapost pictures. For the moment I am using textext for the typesetting in my metapost macro: pic := textext("\setbox0=\hbox{\color["&textcolor&"]"&labeltext&"}\dp0=0pt\

[NTG-context] Wrong MetaPost text output

2019-08-11 Thread Henri Menke
Dear devs, There seems to be a bug in the MetaPost integration of ConTeXt. The MWE below should produce three different labels “dummy foo bar” but instead produces “bar bar bar”. The same example works correctly in plain MetaPost. Originally reported on https://tex.stackexchange.com

[NTG-context] Convert SVG to MetaPost

2019-08-12 Thread Jon Wong
Hi all, Is it possible to convert SVG to MetaPost? Currently, I have Bash scripts in my workflow to invoke Inkscape (converting SVG to PDF). I don’t like to allow shell access to TeX. If I can convert SVG to MetaPost, I will gladly Git-track MetaPost files instead of SVG files. That will do

Re: [NTG-context] colors in MetaPost

2019-09-11 Thread Henning Hraban Ramm
Am 2019-09-11 um 13:46 schrieb Henning Hraban Ramm : > \definecolor[VerlaufVon][c=75,m=5,y=95,k=60] > \definecolor[VerlaufNach][c=88,m=95,y=5,k=60] Of course I need values between 0 and 1. Sorry for the noise. I think I’m too tired... Greetlings, Hraban --- https://www.fiee.net http://wiki.conte

Re: [NTG-context] colors in MetaPost

2019-09-11 Thread Hans Hagen
On 9/11/2019 2:18 PM, Henning Hraban Ramm wrote: Am 2019-09-11 um 13:46 schrieb Henning Hraban Ramm : \definecolor[VerlaufVon][c=75,m=5,y=95,k=60] \definecolor[VerlaufNach][c=88,m=95,y=5,k=60] Of course I need values between 0 and 1. Sorry for the noise. I think I’m too tired... there is an a

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

[NTG-context] Parenthesis error in metapost

2021-04-07 Thread Mikael Sundqvist
Hi, the following code has been working before: \starttext \startMPpage[instance=decimalfun] draw function(1,"x","x*sin(x)",0.5,1,1/100) scaled 1in; \stopMPpage \stoptext Now (with an updated ConTeXt) I get an error: metapost> loading 'metafun' as &#x

[NTG-context] MetaPost bug? in MKIV

2010-03-02 Thread Troy Henderson
eMPgraphic \starttext \useMPgraphic{foo} \stoptext The data stored in data.d is as follows: 0 0 1 1 2 4 When compiling with MKIV, the following error occurs: !mplib : mp terminal: (/opt/context-minimals/tex/texmf/metapost/base/graph.mp ! Redundant equation. ; l.143 G

[NTG-context] MetaPost + format("%g",n)

2010-03-07 Thread Troy Henderson
This code compiles fine with plain MetaPost. input graph; beginfig(0); draw begingraph(1in,1in); setrange((0,0),(1,1)); for n=auto.x: show format("%g",n); endfor; endgraph; endfig; end However, this "ConTeXt translated" version errors in MK

[NTG-context] Lua-loop inside MetaPost

2010-03-09 Thread Andreas Harder
Hi all, I can't find a solution for the following example: \starttext \startMPpage draw origin for i=0 step 10 until 100 : ..{down}(i,0) endfor ; \stopMPpage \startluacode context.startMPpage() context("draw origin"..for i=0,100,10 do.."..{down}("..i..",0)"..end..";") context.stopMPpage() \

[NTG-context] SVG 2 MetaPost/MetaFun

2010-04-04 Thread Matija Šuklje
Is there a SVG to MetaPost/MetaFun converter available? I want to get this quite simple logo to converted from SVG into a ConTeXt- native vector graphic. Cheers, Matija P.S. Too bad SVG is not ConTeXt-native (yet?) -- gsm: +386 41 849 552 www: http://matija.suklje.name xmpp: matija.suk

Re: [NTG-context] MetaPost in TABLEs ?

2010-04-11 Thread Hans Hagen
On 11-4-2010 3:25, Steffen Wolfrum wrote: Hi all, In a book on construction engineering I found two kind of tables that presumably could be set very nicely in ConTeXt (see attachments). Set with MetaPost within natural tables? 1) Curly braces that span over cells: Their height should be

Re: [NTG-context] MetaPost in TABLEs ?

2010-04-11 Thread Steffen Wolfrum
Am 11.04.2010 um 17:51 schrieb Hans Hagen: > On 11-4-2010 3:25, Steffen Wolfrum wrote: >> Hi all, >> >> In a book on construction engineering I found two kind of tables that >> presumably could be set very nicely in ConTeXt (see attachments). Set with >&g

Re: [NTG-context] MetaPost in TABLEs ?

2010-04-11 Thread Hans Hagen
On 11-4-2010 6:10, Steffen Wolfrum wrote: Thank you Hans! I can imagine that this fits on the first example. Do you also have an idea on the second case, the arrows from one table cell to another? (Does it has to be so complex as in metafun manual, page 140: "5.2 Anchors and layers"??) posi

Re: [NTG-context] MetaPost in TABLEs ?

2010-04-11 Thread Vianney le Clément
> use textbackgrounds ... instead of drawing lines you then do a textext that > does a \left{ in math alongside a vbox that has the height of the lefgt > boundary etc etc That would be really interesting for a project I'm working on (a songbook). I thought textbackgrounds could only put a color be

Re: [NTG-context] MetaPost in TABLEs ?

2010-04-11 Thread Steffen Wolfrum
Am 11.04.2010 um 18:31 schrieb Hans Hagen: > On 11-4-2010 6:10, Steffen Wolfrum wrote: > >> Thank you Hans! I can imagine that this fits on the first example. >> >> Do you also have an idea on the second case, the arrows from one table cell >> to another? >> (Does it has to be so complex as in

Re: [NTG-context] Ampersand in Metapost

2010-05-13 Thread Hans Hagen
On 13-5-2010 9:18, Marco wrote: Hi, I have a problem producing an ampersand in metapost. In ConTeXt it works as expected. Have a look at the following example. \starttext \& % OK \startMPcode label(textext("\&"),origin); % produces error \stopMPcode \stoptext The compile

Re: [NTG-context] Ampersand in Metapost

2010-05-13 Thread Mojca Miklavec
On Thu, May 13, 2010 at 22:58, Hans Hagen wrote: > On 13-5-2010 9:18, Marco wrote: >> >> I have a problem producing an ampersand in metapost. In ConTeXt it works >> as expected. Have a look at the following example. >> >> \starttext >> \&  % OK &g

Re: [NTG-context] Ampersand in Metapost

2010-05-13 Thread Marco
On Thu, 13 May 2010 22:58:46 +0200, Hans Hagen wrote: > On 13-5-2010 9:18, Marco wrote: > > Hi, > > > > I have a problem producing an ampersand in metapost. In ConTeXt it > > works as expected. Have a look at the following example. > > > > \starttext

Re: [NTG-context] Ampersand in Metapost

2010-05-13 Thread Mojca Miklavec
On Thu, May 13, 2010 at 23:45, Marco wrote: > On Thu, 13 May 2010 22:58:46 +0200, Hans Hagen wrote: >> On 13-5-2010 9:18, Marco wrote: >> > Hi, >> > >> > I have a problem producing an ampersand in metapost. In ConTeXt it >> > works as e

Re: [NTG-context] Ampersand in Metapost

2010-05-13 Thread Aditya Mahajan
On Fri, 14 May 2010, Mojca Miklavec wrote: On Thu, May 13, 2010 at 23:45, Marco wrote: On Thu, 13 May 2010 22:58:46 +0200, Hans Hagen wrote: On 13-5-2010 9:18, Marco wrote: > Hi, > > I have a problem producing an ampersand in metapost. In ConTeXt it > works as expected. Have a

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Marco
On Fri, 14 May 2010 00:37:44 +0200, Mojca Miklavec wrote: > On Thu, May 13, 2010 at 23:45, Marco wrote: > > On Thu, 13 May 2010 22:58:46 +0200, Hans Hagen > > wrote: > >> On 13-5-2010 9:18, Marco wrote: > >> > Hi, > >> > > >> > I h

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Marco
or \& generates the > > character & alone: you need to preceed it with backslash, so that > > metapost finally knows what to do. > > So, should all the \letter... commands (basically anything generated > from char-def.lua) be unexpandable? What are the disadvantages of un

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Hans Hagen
On 14-5-2010 12:06, Marco wrote: iii) Why should I better use \sometxt? sometxt was introduced in mkii to avoid text processing mp, i.e. it is done at the context end in the current run and mp only gets dimensions; so, it avoids the nested tex run in mkii there is some more trickery and

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Hans Hagen
On 14-5-2010 12:06, Marco wrote: for i=0 downto -3: ran; label(\sometxt{\bold{Test}}, (7cm,-4cm)) rotatedaround ((7cm,-4cm),i*20) withcolor transparent("normal", .2, (r,g,b)); endfor; because transparent overloads the mechanism that sometxt (textext) uses for passing info to te

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Marco
On Fri, 14 May 2010 12:44:47 +0200, Hans Hagen wrote: > On 14-5-2010 12:06, Marco wrote: > > for i=0 downto -3: > >ran; > >label(\sometxt{\bold{Test}}, (7cm,-4cm)) > > rotatedaround ((7cm,-4cm),i*20) > > withcolor transparent("normal", .2, (r,g,b)); > > endfor; > > because tran

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Hans Hagen
On 14-5-2010 1:45, Marco wrote: On Fri, 14 May 2010 12:44:47 +0200, Hans Hagen wrote: On 14-5-2010 12:06, Marco wrote: for i=0 downto -3: ran; label(\sometxt{\bold{Test}}, (7cm,-4cm)) rotatedaround ((7cm,-4cm),i*20) withcolor transparent("normal", .2, (r,g,b)); endfor; b

Re: [NTG-context] Ampersand in Metapost

2010-05-14 Thread Hans Hagen
On 14-5-2010 3:07, Aditya Mahajan wrote: This is because the commands are interpreted with TeX before they are written to mpgraph.mp. The \letterampersand or \& generates the character & alone: you need to preceed it with backslash, so that metapost finally knows what to do. So, sh

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