Dear list,
the example below has shifted axes. I updated to the latest standalone
earlier today. The problem was not present some weeks ago.
In particular look at the red line that should start from the origin...
\starttext
\startMPpage
ut:=1.0cm;
ux:=0.6cm;
vardef diffp(expr riktn) =
((-1,0
>>
>> The below MWE represent my MetaFun drawings file.
>> The idea is that by uncommenting the \enablemode[makepdf] I can create the
>> pdf file with drawings. It seems however that startMPpage does not accept
>> buffers (I also tried processbuffer and process
below MWE represent my MetaFun drawings file.
The idea is that by uncommenting the \enablemode[makepdf] I can create
the pdf file with drawings. It seems however that startMPpage does not
accept buffers (I also tried processbuffer and processMPbuffer).
Is it possible to somehow make this work?
Y
the \enablemode[makepdf] I can create the pdf
file with drawings. It seems however that startMPpage does not accept buffers
(I also tried processbuffer and processMPbuffer).
Is it possible to somehow make this work?
Thanks and regards,
Jan Willem Flamma
%\enablemode[makepdf]
\startbuffer[fig1]
draw
Hello Hans,
On Tue, 16 Aug 2016 09:54:26 +0200, Hans Hagen <pra...@wxs.nl> wrote:
the best one can expect without too much work is
\startMPpage
draw outlinetext.f
("A")
() ;
currentpicture := currentpicture shifted (-bbwidth currentpictur
you need to make sure that the dots in the crossbar of an
‘A’ line up nicely with the dots in the diagonal outer strokes, which is
quite hard to do.
the best one can expect without too much work is
\startMPpage
draw outlinetext.f
("A")
() ;
currentpicture := currentpictur
://tex.stackexchange.com/a/127902/10995
Cheers, Henri
Hi Henri,
many thanks for your reply.
I really need the vectors to create an SVG cover from the PDF cover.
Nothing to do with obfuscation at all.
\startMPpage
draw outlinetext.d
("\ConTeXt\ is awesome!")
(withpen pencircle s
On Mon, Aug 8, 2016 at 2:45 PM, Hans Hagen <pra...@wxs.nl> wrote:
> On 8/8/2016 2:29 PM, Mikael P. Sundqvist wrote:
>
>> \startMPpage
>> drawoptions(withcolor darkred);
>> path p;
>> p:= (0,0)--(1cm,1cm)--(1cm,0)--(0,1cm);
>> draw image (
>>
On 8/8/2016 2:29 PM, Mikael P. Sundqvist wrote:
\startMPpage
drawoptions(withcolor darkred);
path p;
p:= (0,0)--(1cm,1cm)--(1cm,0)--(0,1cm);
draw image (
draw p;
draw p xshifted 2cm withcolor darkyellow;
);
\stopMPpage
This gives me two red paths (result attached). I would like
I have two questions:
>>>
>>> 1) In the metafun manual I found (p 57 in the version I browse) a
>>> setting drawpathoptions.
>>>
>>> I tried with
>>>
>>> \startMPpage
>>> drawpathoptions(withcolor darkred);
>>> path p;
On 8/5/2016 7:54 AM, Mikael P. Sundqvist wrote:
On Tue, Aug 2, 2016 at 5:48 PM, Mikael P. Sundqvist <mic...@gmail.com> wrote:
Hi,
I have two questions:
1) In the metafun manual I found (p 57 in the version I browse) a
setting drawpathoptions.
I tried with
\startMPpage
drawpatho
On Tue, Aug 2, 2016 at 5:48 PM, Mikael P. Sundqvist <mic...@gmail.com> wrote:
> Hi,
>
> I have two questions:
>
> 1) In the metafun manual I found (p 57 in the version I browse) a
> setting drawpathoptions.
>
> I tried with
>
> \startMPpage
> drawpathop
Hi,
I have two questions:
1) In the metafun manual I found (p 57 in the version I browse) a
setting drawpathoptions.
I tried with
\startMPpage
drawpathoptions(withcolor darkred);
path p;
p:= (0,0)--(1cm,1cm)--(1cm,0)--(0,1cm);
draw p;
\stopMPpage
but the result turned out to be black. Isn't
gt;> The reason is the following: I want to draw (for example) a circle
>> with a triangle inside, and I want them to look slightly randomized.
>> If I do (see attached pdf for a typical result of this)
>>
>> \startMPpage
>> draw fullcircle scaled 2cm randomized 0.
do (see attached pdf for a typical result of this)
\startMPpage
draw fullcircle scaled 2cm randomized 0.1cm;
draw ((1cm,0)--(0,1cm)--(-1cm,0)--cycle) randomized 0.1cm;
\stopMPpage
then the corners of the triangle does not stay on the circle (and I
want them to). [I dont want the triangle
of this)
\startMPpage
draw fullcircle scaled 2cm randomized 0.1cm;
draw ((1cm,0)--(0,1cm)--(-1cm,0)--cycle) randomized 0.1cm;
\stopMPpage
then the corners of the triangle does not stay on the circle (and I
want them to). [I dont want the triangle to consist of perfectly
straight lines, so I cannot
On Tue, 12 Jul 2016, Fabrice Couvreur wrote:
this is more modern (the method, not the font):
How filling the number ?
\starttext
\startMPpage
draw outlinetext.d
("Hello")
(withpen pencircle scaled 0.1bp withcolor red)
ysized 60pt ;
\
oesn't work, that's fine, I can still add
"-mem=metafun", but ...
input metafun.mpiv ;
How should one properly compile that file then to get the SVG?
some mp directive (but i never tried) as i always just use \startMPpage
.. \stopMPpage so that fonts etc work ok too
Using just
, right?
>>
>> (3) Is there any way to convince the SVG output mode to generate something
>> like
>>
>> rather than
>>
>> because the program I use to convert SVG to DXF has troubles
>> interpreting "points" properly. I read some
use to convert SVG to DXF has troubles
interpreting "points" properly. I read somewhere that they assume 90
points per inch because that's Inkskape's default.
why not just
\startMPpage
whatever you want
\stopMPpage
and then use mudraw (mutools) to go from pdf to svg (that's what i do
> On 27 Jun 2016, at 10:38, Hans Hagen <pra...@wxs.nl> wrote:
>
> The next beta will support this (for mp lovers)
>
> \definecolor[maincolor] [r=.5]
> \startMPpage
>fill fullcircle scaled 10cm withcolor "maincolor" ;
>...
> \stopMPpage
Hi,
The next beta will support this (for mp lovers)
\definecolor[maincolor] [r=.5]
\definecolor[extracolor] [g=.5]
\definecolor[anothercolor][b=.5]
\definecolor[morecolor] [s=.8]
\startMPpage
fill fullcircle scaled 10cm withcolor "maincolor" ;
fill fullcircle scaled 9cm
are two way to define colors for a metapost graphics, the first
> is to define it with metapost itself.
>
> %% begin example
> \startMPpage
> color myred ; myred := (1,0,0) ;
> fill fullcircle scaled 3cm withcolor myred ;
> \stopMPpage
> %% end example
>
> The disadv
]\switchtobodyfont[small]\stopMPenvironment
\startMPpage
% metafont code
\stopMPpage
\stoptext
\endinput
This is called by context --run --once etc. producing the figure and
in this case modifying the font to a smaller size. Note, the context
call occurs on the fly inside a \directlua{{os.execute(.
On 04 Apr 2016, at 00:12, Hans Hagen <pra...@wxs.nl<mailto:pra...@wxs.nl>>
wrote:
On 4/3/2016 4:07 PM, Meer, Hans van der wrote:
Previously I could do the following
\starttext
\startMPenvironment[+]\switchtobodyfont[small]\stopMPenvironment
\startMPpage
% metafont code
\stopMPpa
On 4/3/2016 4:07 PM, Meer, Hans van der wrote:
Previously I could do the following
\starttext
\startMPenvironment[+]\switchtobodyfont[small]\stopMPenvironment
\startMPpage
% metafont code
\stopMPpage
\stoptext
\endinput
This is called by context --run --once etc. producing the figure
Previously I could do the following
\starttext
\startMPenvironment[+]\switchtobodyfont[small]\stopMPenvironment
\startMPpage
% metafont code
\stopMPpage
\stoptext
\endinput
This is called by context --run --once etc. producing the figure and in this
case modifying the font to a smaller size
Hi,
The next beta will have a more efficient metafun filldraw option named
'fillup' (flaw and drill were rejected as operator names):
\starttext
\startMPpage
fill fullsquare scaled 4cm withpen pencircle scaled 1cm;
draw fullsquare scaled 4cm withpen pencircle scaled
,0)(0,B)&\cr}
$
\stopsetups
\startMPpage
label("\setup[dif-1]",origin);
\stopMPpage
\stoptext
tex error > tex error on line 9 in file
/Users/hansm/Documents/TeX/Test-tex/cases/cases.tex: ! Missing $ inserted
$
\endgroup
\math_fenced_fenced_
r}
$
\stopsetups
\startMPpage
label("\setup[dif-1]",origin);
\stopMPpage
\stoptext
tex error > tex error on line 9 in file
/Users/hansm/Documents/TeX/Test-tex/cases/cases.tex: ! Missing $ inserted
$
\endgroup
\math_fenced_fenced_
On Wed, 3 Feb 2016 15:27:36 -0500
John Kitzmiller <k...@inradius.net> wrote:
> I expect anglestriped to work more like fill, but it shifts the path.
> Is it intended behavior?
>
> \startMPpage[offset=2mm]
> path p;
> p = unitsquare scaled 4cm ;
p = fullsq
I expect anglestriped to work more like fill, but it shifts the path. Is it
intended behavior?
\startMPpage[offset=2mm]
path p;
p = unitsquare scaled 4cm ;
filldraw p withcolor blue;
draw p;
draw p anglestriped(0,0,0) withcolor blue;
\stopMPpage
Thanks,
John
On 1/28/2016 2:02 PM, Marco Patzer wrote:
On Thu, 28 Jan 2016 12:29:46 +0100
Hans Hagen <pra...@wxs.nl> wrote:
How to make transparent shadings work with the new mechanism?
withtransparency (1,.5)
next beta
\definecolor [trans] [a=multiply, t=.5, g=.5]
\startMPpage
On Thu, 28 Jan 2016 12:29:46 +0100
Hans Hagen <pra...@wxs.nl> wrote:
> >> How to make transparent shadings work with the new mechanism?
> >
> >withtransparency (1,.5)
>
> next beta
>
> \definecolor [trans] [a=multiply, t=.5, g=.5]
>
> \s
toptext
How to make transparent shadings work with the new mechanism?
withtransparency (1,.5)
next beta
\definecolor [trans] [a=multiply, t=.5, g=.5]
\startMPpage
fill fullcircle scaled 12cm withcolor \MPcoloronly{trans};
fill fullcircle scaled 10cm withcolor \MPcolor{trans};
el.top("A", A) ;
label.lrt("C", z2) ;
label.llft("B", origin) ;
label.ulft("I", I) ;
label.urt("J", J) ;
label.ulft("$x$", L) ;
draw pic rotated 15 ;
\startMPpage
picture pic ;
u := 0.5cm ;
z1 = origin ;
z2 = (9u, 0) ;
path p ;
p := fullci
;
> L := point 0.8 of b ;
> label.top("A", A) ;
> label.lrt("C", z2) ;
> label.llft("B", origin) ;
> label.ulft("I", I) ;
> label.urt("J", J) ;
> label.ulft("$x$", L) ;
> draw pic rotated 15 ;
>
> \star
) (draw options) (fill options) transformations ;
% outlinetext.r (text) (fill options) (draw options) transformations ;
\starttext
\startMPdefinitions
let graphictext = new_graphictext ;
\stopMPdefinitions
\startMPpage
draw outlinetext.b
(\framed[align=normal]{\input
) transformations ;
% outlinetext.r (text) (fill options) (draw options) transformations ;
\starttext
\startMPdefinitions
let graphictext = new_graphictext ;
\stopMPdefinitions
\startMPpage
draw outlinetext.b
(\framed[align=normal]{\input{tufte}})
(withcolor .5white)
(withcolor
options) (fill options) transformations ;
% outlinetext.r (text) (fill options) (draw options) transformations ;
\starttext
\startMPdefinitions
let graphictext = new_graphictext ;
\stopMPdefinitions
\startMPpage
draw outlinetext.b
(\framed[align=normal]{\input{tufte
]
\startMPpage[instance=graph,offset=2mm]
draw begingraph(3cm,5cm);
numeric a[];
gdata(read1.tex, v,
setrange(0,0,3,4);
);
closefrom read1.tex;
autogrid(,grid.lft) withcolor .7white;
gdata(read1.tex,v,
for j = 1 upto 3:
a[j] := scantokens v[j
, but it works to read data from the top
of the .tex file and then plot on the autogrid.
% 1 0.5 2.5
% 2 1 3.5
\usemodule[graph]
\startMPpage[instance=graph,offset=2mm]
draw begingraph(3cm,5cm);
numeric a[];
gdata(read1.tex, v,
setrange(0,0,3,4);
);
closefrom read1.tex
be rendered and then drawn over
The following may not be the best way, but it works to read data from
the top of the .tex file and then plot on the autogrid.
% 1 0.5 2.5
% 2 1 3.5
\usemodule[graph]
\startMPpage[instance=graph,offset=2mm]
draw begingraph(3cm,5cm);
numeric a[];
gdata(read1
to work
using m-graph?
http://ctan.org/tex-archive/systems/doc/metapost/source-manual
http://ctan.org/tex-archive/systems/doc/metapost/source-manual
Thanks again,
John
\usemodule [graph]
\startMPpage [instance=graph]
draw begingraph(3in,2in);
glabel.lft(btex \vbox{\hbox{Quadrillions}\hbox
do need to declare that a is an array, as in
numeric a[];
Here is a MWE
\enabletrackers[metapost.showlog]
\usemodule[graph]
\startMPpage[instance=graph,offset=3mm]
draw begingraph(5cm,5cm);
numeric a[];
gdata(data.d, v,
for j=1 upto 3:
a[j]:=scantokens v[j
[graph]
\startMPpage[instance=graph,offset=3mm]
draw begingraph(5cm,5cm);
numeric a[];
gdata(data.d, v,
for j=1 upto 3:
a[j]:=scantokens v[j];
endfor ;
);
setrange (whatever,0,whatever,2);
gdraw (a2,a1)--(a3,a1);
endgraph;
\stopMPpage
Alan
]
\startMPpage[instance=graph,offset=3mm]
draw begingraph(5cm,5cm);
gdata(data.d, v,
for n = 1 upto 3:
a[n] = scantokens v[n];
endfor;
show a1; show a2; show a3; % numeric
show v1; show v2; show v3; % string
gdraw (a2,a1)—(a3,a1); % same problem
On 8/6/2015 5:30 PM, John Kitzmiller wrote:
Given a file, data.d, containing 1 4 7
I expected the following code to draw a line from (4,1) to (7,1)…
\enabletrackers[metapost.showlog]
\usemodule[m-graph]
\startMPpage[instance=graph,offset=3mm]
draw begingraph(5cm,5cm);
gdata(data.d, v
Given a file, data.d, containing 1 4 7
I expected the following code to draw a line from (4,1) to (7,1)…
\enabletrackers[metapost.showlog]
\usemodule[m-graph]
\startMPpage[instance=graph,offset=3mm]
draw begingraph(5cm,5cm);
gdata(data.d, v,
for n = 1 upto 3:
a[n
at predefined distances,
but it's all a single shading (a single function), not a composition
of multiple sections).
Ok, as I suppose you need it for you thesis ... a new beta ...
I didn't play with values for the circular one but here's a linear:
\startMPpage
fill fullsquare scaled 50pt
):
\startMPpage
fill fullcircle scaled 10cm
withshademethod circular
withshadevector (5cm,1cm)
withshadecenter (.1,.5)
withshadedomain (.2,.6)
withshadefactor 1.2
withshadecolors (red,green)
;
\stopMPage
Great, I love the new syntax
) (fill options) (draw
options) transformations ;
\starttext
\startMPpage
draw outlinetext.b
(\framed[align=normal]{\input{tufte}})
(withcolor .5white)
(withcolor red withpen pencircle scaled 1/10)
xsized 10cm ;
\stopMPpage
On 6/14/2015 11:26 PM, Mojca Miklavec wrote:
On Fri, Jun 12, 2015 at 12:45 AM, Hans Hagen wrote:
Most shades look ugly and useless to me anyway but you have more control
than you think (always had but nicer interfaced in mpiv):
\startMPpage
fill fullcircle scaled 10cm
) (fill options) transformations ;
% outlinetext.b (text) (draw options) (fill options) transformations ;
% outlinetext.r (text) (fill options) (draw options) transformations ;
\starttext
\startMPpage
draw outlinetext.b
(\framed[align=normal]{\input{tufte}})
(withcolor
On Fri, Jun 12, 2015 at 12:45 AM, Hans Hagen wrote:
Most shades look ugly and useless to me anyway but you have more control
than you think (always had but nicer interfaced in mpiv):
\startMPpage
fill fullcircle scaled 10cm
withshademethod circular
withshadevector (5cm
(text) (draw options) (fill options) transformations ;
% outlinetext.r (text) (fill options) (draw options) transformations ;
\starttext
\startMPpage
draw outlinetext.b
(\framed[align=normal]{\input{tufte}})
(withcolor .5white)
(withcolor red withpen pencircle scaled 1/10
think (always had but nicer interfaced in mpiv):
\startMPpage
fill fullcircle scaled 10cm
withshademethod circular
withshadevector (5cm,1cm)
withshadecenter (.1,.5)
withshadedomain (.2,.6)
withshadefactor 1.2
withshadecolors (red,green
=2.5cm,align=center] {Start new Game};
\stoptikzpicture
\startMPcode
draw Start new Game infont defaultfont scaled defaultscale;
\stopMPcode
\stoptext
\startMPpage
draw textext(\framed[width=6cm,align={normal,tolerant}]{\input
tufte\relax}) ;
\stopMPpage
On Feb 16, 2015, at 3:21 PM, Fabrice Couvreur wrote:
This does not work with :
labeloffset := 2mm;
On Feb 09, 2015, Hans Hagen wrote:
\startMPpage[offset=2pt]
path p, q, r ; pair z ;
p := unitsquare scaled 4cm ;
z := point 3.6 of p ;
q := z--urcorner p ;
r := q
?)
There is also anglestriped in mp-tool with some examples. The second argument
changes the angle.
\startMPpage[offset=2mm]
path p, q ;
p := unitsquare scaled 4cm ;
z1 = point 3.6 of p ;
q := subpath (0,2) of p -- z1 -- cycle;
q := q shifted(-4cm,-4cm);
draw q anglestriped(1,180,6) withcolor blue
) ;
label.ulft(btex A etex,ulcorner p) ;
label.urt(btex D etex, urcorner p) ;
label.lft(btex M etex, z) ;
\stopMPcode
\stoptext
\startMPpage[offset=2pt]
path p, q, r ; pair z ;
p := unitsquare scaled 4cm ;
z := point 3.6 of p ;
q := z--urcorner p ;
r := q -- reverse bottomboundary p
to a path. Here is a way to do
your task with (almost) only MetaPost:
\startMPpage[offset=2mm]
path p, q ;
p := unitsquare scaled 4cm ;
z1 = point 3.6 of p ;
q := z1 -- urcorner p -- lrcorner p -- llcorner p -- cycle;
for i = 8 step -.5 until 0:
draw (i,0)*cm -- (i-4,4)*cm withpen pencircle
On Wed, Jan 28, 2015 at 5:49 AM, Van Dung Tang nguyen...@gmail.com wrote:
I edit 1 file metafun with follow:
\startMPenvironment
\usetypescript[times][texnansi]
\switchtobodyfont[times,10pt]
\stopMPenvironment
\startMPpage
fill fullcircle scaled 2cm withcolor red;
label(\sometxt{Cn
I edit 1 file metafun with follow:
\startMPenvironment
\usetypescript[times][texnansi]
\switchtobodyfont[times,10pt]
\stopMPenvironment
\startMPpage
fill fullcircle scaled 2cm withcolor red;
label(\sometxt{Cn},origin) withcolor white;
\stopMPpage
After run context and recieve 1 picture
I edit 1 file metafun follow:
\startMPenvironment
\usetypescript[times][texnansi]
\switchtobodyfont[times,10pt]
\stopMPenvironment
\startMPpage
fill fullcircle scaled 2cm withcolor red;
label(\sometxt{Cn},origin) withcolor white;
\stopMPpage
Ngu-Hanh.pdf
Description: Adobe PDF document
On 1/28/2015 5:49 AM, Van Dung Tang wrote:
I edit 1 file metafun with follow:
\startMPenvironment
\usetypescript[times][texnansi]
\switchtobodyfont[times,10pt]
\stopMPenvironment
\startMPpage
fill fullcircle scaled 2cm withcolor red;
label(\sometxt{Cn},origin) withcolor white;
\stopMPpage
Hi,
From the looks of it you are using legacy code!
For one ConTeXt uses UTF you no need texansi encoding.
In Mkiv all you need is
\startext
\startMPpage
fill fullcircle scaled 2cm withcolor red;
label(\sometxt{Cn},origin) withcolor white;
\stopMPpage
\stoptext
If you want
]
\starttext
\startxtable
\startxrow
\startxcell
\start
\switchtobodyfont[small]
\startMPpage[instance=graph]
drawoptions(withpen pencircle scaled 1pt);
w := 10cm; h := 8cm;
ahlength := .25cm;
draw begingraph (w,h)
numeric xmin, xmax, ymin, ymax;
xmin := 0; xmax :=100
,style=small]
\setupTABLE[row][first][background=color,backgroundcolor=lightgray]
\stopsetups
\usemodule[graph]
\definecolor[mycolor][c=.4,m=0,y=0,k=0]
\starttext
\startTwoColumns
\start
\switchtobodyfont[small]
\startMPpage[instance=graph]
drawoptions(withpen pencircle scaled 1pt);
w
,
}
}
\stopluacode
\startMPpage
numeric dx, dy;
dx = 4.4cm;
dy = 0.53cm;
path b[];
for i=1 upto lua(mp.print(\#document.variables.labels)) :
b[i] = unitsquare xscaled dx yscaled dy shifted (0, (i-1)*dy);
draw b[i];
label(lua(mp.quoted(document.variables.labels
= {
one,
two,
three,
}
}
\stopluacode
\startMPpage
numeric dx, dy;
dx = 4.4cm;
dy = 0.53cm;
path b[];
for i=1 upto lua(mp.print(\#document.variables.labels)) :
b[i] = unitsquare xscaled dx yscaled dy shifted (0, (i-1)*dy
Hello Hans,
it's possible to ask values from within mp:
\starttext
\startluacode
document.variables = {
labels = {
one,
two,
three,
}
}
\stopluacode
\startMPpage
numeric dx, dy;
dx = 4.4cm;
dy = 0.53cm;
path b[];
for i=1 upto lua
On 12/8/2014 1:45 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
Hello Hans,
it's possible to ask values from within mp:
\starttext
\startluacode
document.variables = {
labels = {
one,
two,
three,
}
}
\stopluacode
\startMPpage
numeric dx, dy
\starttext
\startMPpage
fill
fullcircle scaled 10cm --
fullcircle scaled 8cm --
fullcircle scaled 4cm -- cycle
withcolor red/4
withtransparency (1,.5) ;
currentpicture := currentpicture shifted (-5cm,0) ;
fill
the TFM file either.
I know I can use the:
\startMPpage
\input myfigure.mp
\stopMPpage
But the point is I want to generate an svg file, not a pdf.
(mpost -s 'outputformat=svg;prologues:=3' --mem=metafun myfigure.mp)
Note that with mpost command, it use metafun.mpii, while with mprun
myfigure.mp
or do:
\starttext
\startMPpage
mp code
\stopMPpage
\stoptext
and run that.
Hans
-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt
that will never work with metafun in mkiv as we have extensions
just run
context myfigure.mp
or do:
\starttext
\startMPpage
mp code
\stopMPpage
\stoptext
and run that.
Hans
.
Alternatively, you can consider making your mp graphics like this:
\startMPpage
some code
\stopMPpage
This will use the regular font system, gives access to everything
context as well, and makes it possible to opentype fonts. The resulting
(cropped) graphic can of course be included. One can also
Hans Hagen pra...@wxs.nl writes:
Alternatively, you can consider making your mp graphics like this:
\startMPpage
some code
\stopMPpage
This will use the regular font system, gives access to everything
context as well, and makes it possible to opentype fonts. The resulting
(cropped
On 6/5/2014 11:27 PM, Sanjoy Mahajan wrote:
Hans Hagen pra...@wxs.nl writes:
Alternatively, you can consider making your mp graphics like this:
\startMPpage
some code
\stopMPpage
This will use the regular font system, gives access to everything
context as well, and makes it possible
-- (0,ymax)*u;
drawarrow axe_x;
drawarrow axe_y;
draw pts_f withpen pencircle scaled 1;
clip currentpicture to screen;
\stopMPcode
\stoptext
Are there any routines with Metafun to improve this code?
define 'improve' .. anyway:
\starttext
\startMPpage
numeric xmin, xmax, ymin, ymax;
xmin
-509039343)
and then apt-get context which gave a texlive version for armhf; also got vim
and evince. From terminal under Ubuntu, which runs on top of ChromeOS, context
foo.tex compiled a Hello World and a \startMPpage figure. That much worked.
This made me think the link for armhf-linux above
;
\stopuseMPgraphic
\followtokens{{\hskip1em}some text{\hskip1em}}
\stopsetups
\startMPpage
draw textext(\setups{text-a}) ;
draw textext(\setups{text-b}) shifted (0,-.5cm);
% equal to RotPath in text-b
path RotPath ; RotPath := reverse halfcircle xyscaled 3cm ;
draw
text-b
\startuseMPgraphic{followtokens}
path RotPath ; RotPath := reverse halfcircle xyscaled 3cm ;
draw RotPath ;
\stopuseMPgraphic
\followtokens{{\hskip1em}some text{\hskip1em}}
\stopsetups
\startMPpage
draw textext(\setups{text-a}) ;
draw textext(\setups{text-b
{\hskip1em}}
\stopsetups
\startMPpage
draw textext(\setups{text-a}) ;
draw textext(\setups{text-b}) shifted (0,-.5cm);
\stopMPpage
\stoptext
This stretches the text. One has to use \hskip to squeeze the text
back to its normal inter character space, but I assume that's what
you meant
;
\stopuniqueMPgraphic
\defineoverlay[mytest][\uniqueMPgraphic{mytest}]
\startMPpage[offset=1pt]
fill fullcircle scaled 10cm withcolor red ;
draw textext(\framed[background=mytest]{bla}) ;
draw textext(test 1.1) xsized 8cm rotated 45 withcolor white/2 ;
draw
Am 06.10.2013 00:37, schrieb Hans Hagen:
On 10/5/2013 5:52 PM, Peter Rolf wrote:
I played around with it, but I have problems to understand the format of
the returned path.
Example:
%
\setuppagenumber[state=stop]
\starttext
\nopdfcompression
\startMPpage
path p;
p
I played around with it, but I have problems to understand the format of
the returned path.
Example:
%
\setuppagenumber[state=stop]
\starttext
\nopdfcompression
\startMPpage
path p;
p:= (20,20){up} .. {down}(200,100);
passvariable(path,p);
draw p ;
\stopMPpage
\ctxlua{inspect
On 10/5/2013 5:52 PM, Peter Rolf wrote:
I played around with it, but I have problems to understand the format of
the returned path.
Example:
%
\setuppagenumber[state=stop]
\starttext
\nopdfcompression
\startMPpage
path p;
p:= (20,20){up} .. {down}(200,100);
passvariable(path
and drawoptions are also applied (part of the draw definition)
i made a patch that also carries some extra color info but i'm not sure
how robust it is (i also did some further optimization)
btw, we do have a 'named properties' feature in metafun:
\startMPpage
property p[] ;
p1
.
Yesterday, before an Update, all worked as expected.
Minimal not working example:
\starttext
\startMPpage
draw fullcircle scaled 5cm withcolor red;
label(textext(\CONTEXT),origin);
\stopMPpage
\stoptext
Or am I missing something happened in the last four weeks?
Something seems wrong
.
Minimal not working example:
\starttext
\startMPpage
draw fullcircle scaled 5cm withcolor red;
label(textext(\CONTEXT),origin);
\stopMPpage
\stoptext
Or am I missing something happened in the last four weeks?
some playing with transformations and keeping properties at the same
time ... new
/english
Context seems not to be able to typeset Labels anymore.
Yesterday, before an Update, all worked as expected.
Minimal not working example:
\starttext
\startMPpage
draw fullcircle scaled 5cm withcolor red;
label(textext(\CONTEXT),**origin);
\stopMPpage
\stoptext
Or am I missing
\startMPpage
draw fullcircle scaled 5cm withcolor red;
label(textext(\CONTEXT),origin);
\stopMPpage
\stoptext
Or am I missing something happened in the last four weeks?
Thanks
Greetings Lutz
___
If your question
) seems to augment.p(v1 Sadd
0.4,v2);Sadd instead. An mwe of a bar graph:
(data1 is a separate file containing
01 02
02 03)
\usemodule[m-graph]
\startMPpage[instance=graph]
input sarith;
draw begingraph(5cm,5cm);
gdata(data1, v,
path p;
augment.p(v1,0
03)
\usemodule[m-graph]
\startMPpage[instance=graph]
input sarith;
draw begingraph(5cm,5cm);
gdata(data1, v,
path p;
augment.p(v1,0);
augment.p(v1,v2)
augment.p(v1 Sadd 0.4,v2);
augment.p(v1 Sadd 0.4,0);
gfill p--cycle
When trying to make a bar graph with m-graph.mkiv and sarith, the command Ssub
(string subtract) seems to Sadd instead. An mwe of a bar graph:
(data1 is a separate file containing
01 02
02 03)
\usemodule[m-graph]
\startMPpage[instance=graph]
input sarith;
draw begingraph(5cm,5cm);
gdata
(and where I stand right now) is to simply
use \startMPpage and \stopMPpage to scale to the page.
Thera are a couple of issues, though, with this approach. First, I want
to add additional information to the page, other than what would be
handled by MetaPost, e.g., some tables, etc. Even without
x 11)..
My first successful approach (and where I stand right now) is to simply
use \startMPpage and \stopMPpage to scale to the page.
Thera are a couple of issues, though, with this approach. First, I want
to add additional information to the page, other than what would be
handled by MetaPost
,
Your idea did help for minimal examples. I get conflicts with more elaborate
files (even the dreaded 'cannot make .mpx file') sometimes using either
suggestions so...
retraining my fingers to put MP code in \startMPpage is the direction I will
take because it gives the best looking forward result
401 - 500 of 819 matches
Mail list logo