chapter titles:
\startuniqueMPgraphic{titled}
path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
pickup pencircle scaled 1mm ;
drawoptions(withcolor .625yellow) ;
draw llcorner p -- lrcorner p ;
setbounds currentpicture to p ;
\stopuniqueMPgraphic
\defineoverlay
r ip[];
w = OverlayWidth;
h = OverlayHeight;
p[1] := fullcircle scaled h;
p[2] := p[1] shifted (0.2 w,0);
ip[1] := p[1] intersectionpoint p[2];
ip[2] := reverse p[1] intersectionpoint p[2];
p[3] := p[1] cutbefore ip[1] cutafter ip[2];
p[4] := p[2] cutbefore ip[1] cutafter
Kip Warner schrieb am 27.05.2024 um 19:23:
On Mon, 2024-05-27 at 05:43 -0400, seyal zavira wrote:
if you don't want to use metapost you can also use svg for background
for example:
\startuniqueMPgraphic{centered_svg}
draw lmt_svg [
filename = "badge.svg",
width
On Mon, 2024-05-27 at 05:43 -0400, seyal zavira wrote:
> if you don't want to use metapost you can also use svg for background
> for example:
>
> \startuniqueMPgraphic{centered_svg}
> draw lmt_svg [
> filename = "badge.svg",
> width = OverlayW
if you don't want to use metapost you can also use svg for background
for example:
\startuniqueMPgraphic{centered_svg}
draw lmt_svg [
filename = "badge.svg",
width = OverlayWidth,
y = OverlayHeight/2, ] ;
\stopuniqueMPgraphic
\defineoverlay
[svgback]
Hi Alexander,
Thank you for this suggestion which will do the trick.
Fabrice
Le mar. 22 août 2023 à 10:26, Alexandre Christe a
écrit :
> Hi Fabrice,
>
> I have this from former exchanges
>
> % Cancel command for use in equations.
> \startuniqueMPgraphic{cross out}
> pi
Hi Fabrice,
I have this from former exchanges
% Cancel command for use in equations.
\startuniqueMPgraphic{cross out}
picture cross;
cross := image(draw (0,0)--(1,1); draw (0,1)--(1,0););
draw cross xscaled \overlaywidth yscaled \overlayheight withpen pencircle
scaled .8pt
{\color[darkred]{#1}}}
>
> \setuppagenumbering[location=]
> \setupheadertexts[margin][][\hbox to \hsize{\hss\Circled\pagenumber\hss}]
>
> \startuniqueMPgraphic{titled}
> path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
> pickup pencircle sca
led%
{\framed
[background=circled,frame=off,offset=overlay]
{\color[darkred]{#1}}}
\setuppagenumbering[location=]
\setupheadertexts[margin][][\hbox to \hsize{\hss\Circled\pagenumber\hss}]
\startuniqueMPgraphic{titled}
path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayhei
use the MetaFun features of ConTeXt to cross out stuff.
% Cancel command for use in equations.
\startuniqueMPgraphic{cross out}
picture cross;
cross := image(draw (0,0)--(1,1); draw (0,1)--(1,0););
draw cross xscaled \overlaywidth yscaled \overlayheight withpen pencircle
scaled .8pt
Hi Uschi,
I use the MetaFun features of ConTeXt to cross out stuff.
% Cancel command for use in equations.
\startuniqueMPgraphic{cross out}
picture cross;
cross := image(draw (0,0)--(1,1); draw (0,1)--(1,0););
draw cross xscaled \overlaywidth yscaled \overlayheight withpen pencircle
{Cutpointstight}]
\startuniqueMPgraphic{Cutpointstight}
path p;
p := unitsquare xscaled OverlayWidth yscaled OverlayHeight;
draw ulcorner p;
draw urcorner p;
draw llcorner p;
draw lrcorner p
l.lft(100-s, (0, (s-2.5)*mm));
> > endfor;
> > \stopMPpage
> >
> > This used to work with previous LMTX versions.
> fixed in next upload
Is this related?
(regression: uniqueMPgraphic drops color)
\startuniqueMPgraphic{red}
draw textext("red?") withcolor red ;
\st
idths) .. and
> some still use acrobat 4 -)
Yep, last weekend I finally sent the latest issue of our magazine to the
printshop, of course with correctly set boxes (and markings activated), and
since the content didn’t need bleed this time, I set the CropBox to TrimBox.
Everything in per
Thanks Hans!
On Sun, 12 Sept 2021 at 19:02, Hans Hagen wrote:
> On 9/12/2021 6:54 PM, Sylvain Hubert via ntg-context wrote:
> > Dear List,
> >
> > The following code draws a circle at the center of the page, ignoring
> > the "shifted" part.
> >
On 9/12/2021 6:54 PM, Sylvain Hubert via ntg-context wrote:
Dear List,
The following code draws a circle at the center of the page, ignoring
the "shifted" part.
\startuniqueMPgraphic{concept}
draw fullcircle scaled 1cm shifted (10cm,10cm);
\stopuniqueMPgraphic
\defineoverl
Dear List,
The following code draws a circle at the center of the page, ignoring the
"shifted" part.
\startuniqueMPgraphic{concept}
draw fullcircle scaled 1cm shifted (10cm,10cm);
\stopuniqueMPgraphic
\defineoverlay[concept][\uniqueMPgraphic{concept}]
\setupbackgrounds[page][backgrou
context.stopxcell()
end
context.stopxrow()
end
context.stopxtable()
end
\stopluacode
\startuniqueMPgraphic{cross}{width,height,depth,color,line}
draw image (
draw (\MPvar{depth},\MPvar{height}) -- (\MPvar{width},0) ;
draw (\MPvar{depth}
onvertnumber(conversion,i)
> context.stopxcell()
> end
> context.stopxrow()
> for i=1,n do
> context.startxrow()
> context.startxcell()
> context.convertnumber(con
opxcell()
for j=1,n do
context.startxcell { align = "middle" }
action(string.sub(pattern[i],j,j))
context.stopxcell()
end
context.stopxrow()
end
context.stop
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
>>>
>>&
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
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
&
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
t customized square root signed
which was asked on TeX.SE a few years ago:
https://tex.stackexchange.com/a/406680/323
I tried the code from the link above, but:
- I had change some macro names: \mpvar -> \MPvar, \startuniquempgraphic
-> \startuniqueMPgraphic and some others,
- there
which was asked on TeX.SE a few years ago:
https://tex.stackexchange.com/a/406680/323
I tried the code from the link above, but:
- I had change some macro names: \mpvar -> \MPvar, \startuniquempgraphic
-> \startuniqueMPgraphic and some others,
- there is still an error I'm not able to fix (see att
backgrounds you can use a overlay and don't have
to create a layer for it.
2. Use unitsquare for your bars which has the origin in the lower left
corner because fullsquare has the origin in the center (look at page
383 in the metafun manual).
\setuppapersize [A4,landscape]
\startuniqueMPgr
n the metafun manual).
\setuppapersize [A4,landscape]
\startuniqueMPgraphic{blueShade}
draw lmt_shade [
path= fullsquare xyscaled (OverlayWidth,OverlayHeight) ,
direction = "up",
alternative = "linear",
colors = { "red", "blue"
eight=\paperheight] % let the layer cover the full paper
\startuniqueMPgraphic{blueShade}
draw lmt_shade [
path = fullsquare xyscaled(PaperWidth,PaperHeight),
direction = "up",
alternative = "linear",
colors = { "red", "blue" },
];
\stopuniqueMPgraphi
Hi,
I would like to hatch the cell green.
Thank you.
Fabrice
\usecolors[xwi]
\startuniqueMPgraphic{meta:hash}{linewidth,linecolor,angle,gap}
if unknown context_back : input mp-back ; fi ;
some_hash ( OverlayWidth, OverlayHeight ,
\MPvar{linewidth}, \MPvar{linecolor} ,
\MPvar{angle}, \MPvar{gap
Hi Altoff.
Maybe this markup will help?
\startuniqueMPgraphic{cancel}
pickup pencircle scaled 0.7pt ;
path p ; p := OverlayBox topenlarged -ExHeight bottomenlarged -ExHeight ;
draw llcorner p -- urcorner p withcolor OverlayColor ;
\stopuniqueMPgraphic
\defineoverlay[cancel
Hi,
I’m trying to get a linear shade in the background of my presentation.
But it seems like MetaPost can’t handle my self-defined colors:
\definecolor[VerlaufVon][c=75,m=5,y=95,k=60]
\definecolor[VerlaufNach][c=88,m=95,y=5,k=60]
\startuniqueMPgraphic{Verlauf}
% old method, also doesn’t work
ight)
Hans
--- test file ---
\setupinteraction
[state=start]
\definesymbol[yes][1]
\definesymbol[nop][0]
\setupfield[whatever][width=20mm,height=20mm,frame=off]
\definefield[what][radio][whatever][whatone,whattwo][whatone]
\definesubfield[whatone][][yes,nop]
\definesubfield[whattwo][][yes,nop
>
>> \setuppagenumbering [
>> alternative=,
>> location=,
>> ]
>>
>> \setupfootertexts
>> [Laubblatt 2019/1] [{\externalfigure[cow][height=15mm]}]
>>
>> \setupfooter
>> [style=\ss]
>>
>> \setuptolerance
>> [verytolerant,str
\externalfigure[cow][height=15mm]}]
>
> \setupfooter
> [style=\ss]
>
> \setuptolerance
> [verytolerant,stretch]
>
> \definecolor[color-1][.5(red,green)]
> \definecolor[color-2][.5(green,blue)]
> \definecolor[color-3][.5(blue,red)]
> \definecolor[color-4][.5
rance
[verytolerant,stretch]
\definecolor[color-1][.5(red,green)]
\definecolor[color-2][.5(green,blue)]
\definecolor[color-3][.5(blue,red)]
\definecolor[color-4][.5(white,black)]
\definecolor[color-5][.5(white,color-4)]
\startuniqueMPgraphic{frame}
fill OverlayBox withcolor \MPcolor{co
=
math_stacker_arrow_shape
enddef ;
vardef math_stacker_rightarrow_shape =
math_stacker_arrow_shape rotated 180
enddef ;
\stopMPextensions
\startuniqueMPgraphic{math:stacker:\number"2190}
math_stacker_draw(math_stacker_leftarrow_shape) ;
\stopuniqueMPgr
Hi,
I run into this error after updating my ConTeXt version.
Small (but not minimal) example attached.
mtx-context | current version: 2018.10.18 00:07
Peter
\startuniqueMPgraphic{column:bg}
fill OverlayBox withcolor yellow;
\stopuniqueMPgraphic
\defineoverlay[columnbg
at follows arbitrary
shapes, maybe even letters (like drop shadows e.g. in InDesign do).
\startuniqueMPgraphic{mpnewshadow}{offset}
MyOffset := \MPvar{offset} ;
...
... OverlayWidth ...
\defineoverlay[newshadow][\uniqueMPgraphic{mpnewshadow}{offset=.3em}]
you use unique graphics ... so you ne
?
The Metafun experts would probably tear this apart...
\startuniqueMPgraphic{half circle}
path p, q ;
p := fullcircle scaled OverlayWidth;
q := (p cutafter (point .5 along p)) shifted (0,-.5BodyFontSize) ;
fill q -- cycle withcolor lightgray ;
draw q withpen pencircle scaled 2pt
Metafun experts would probably tear this apart...
\startuniqueMPgraphic{half circle}
path p, q ;
p := fullcircle scaled OverlayWidth;
q := (p cutafter (point .5 along p)) shifted (0,-.5BodyFontSize) ;
fill q -- cycle withcolor lightgray ;
draw q withpen pencircle scaled 2pt withcolor
to draw the arrows of the vectors does not seem to
>> work anymore.
>> Thank you
>> Fabrice
>>
>
> Did you check ou tthe latest meta-imp file? Alan and I added more and also
> changed the interface a little which might have consequences.
>
> \useMPlibrary[mat]
>&
) ;
)
enddef ;
vardef math_stacker_leftarrow_shape =
math_stacker_arrow_shape
enddef ;
vardef math_stacker_rightarrow_shape =
math_stacker_arrow_shape rotated 180
enddef ;
\stopMPextensions
\startuniqueMPgraphic{math:stacker:\number"2190}
math_stacker
=
math_stacker_arrow_shape
enddef ;
vardef math_stacker_rightarrow_shape =
math_stacker_arrow_shape rotated 180
enddef ;
\stopMPextensions
\startuniqueMPgraphic{math:stacker:\number"2190}
math_stacker_draw(math_stacker_leftarrow_shape) ;
\stopuniqueMPgr
r/
> tree/beta/doc/context/sources/general/fonts
>
> > I did this :
> >
> > \startuniqueMPgraphic{titled}
> > path p ;
> > p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
> > pickup pencircle scaled 1mm ;
> > linecap := squared
imals. It can be found
in
tex/texmf-context/doc/context/sources/general/fonts/
or online on GitHub
https://github.com/contextgarden/context-mirror/tree/beta/doc/context/sources/general/fonts
> I did this :
>
> \startuniqueMPgraphic{titled}
> path p ;
> p := unitsqua
imals. It can be found
in
tex/texmf-context/doc/context/sources/general/fonts/
or online on GitHub
https://github.com/contextgarden/context-mirror/tree/beta/doc/context/sources/general/fonts
> I did this :
>
> \startuniqueMPgraphic{titled}
> path p ;
> p := unitsqua
Hi Hans,
I love the style used for this manual. I tried to do the same thing, but
it's a long way off !
I tried to find the source code to inspire me :-)
I did this :
\startuniqueMPgraphic{titled}
path p ;
p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
pickup penc
ottomenlarged (OverlayOffset/2) topenlarged (OverlayOffset/2) ;
>> )
>> enddef ;
>> vardef math_stacker_leftarrow_shape =
>> math_stacker_arrow_shape
>> enddef ;
>> vardef math_stacker_rightarrow_shape =
>> mat
enddef ;
\stopMPextensions
\startuniqueMPgraphic{math:stacker:\number"2190}
math_stacker_draw(math_stacker_leftarrow_shape) ;
\stopuniqueMPgraphic
\startuniqueMPgraphic{math:stacker:\number"2192}
math_stacker_draw(math_stacker_rightarrow_shape) ;
\stopuniqueMPgraphic
) ;
)
enddef ;
vardef math_stacker_leftarrow_shape =
math_stacker_arrow_shape
enddef ;
vardef math_stacker_rightarrow_shape =
math_stacker_arrow_shape rotated 180
enddef ;
\stopMPextensions
\startuniqueMPgraphic{math:stacker:\number"2190}
math_stacker
yond the edges of the
>> cell.
>> Thank you
>> Fabrice
>>
>> \startuniqueMPgraphic{Vertical}
>>
>> linecap:=squared ;
>> path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
>> drawoptions (withpen pencircle withcolor \MPco
linecap:=butt ;
Am 14. Februar 2017 16:53:04 MEZ schrieb Fabrice Couvreur
:
>Hello,
>In the code below, the red vertical line extends beyond the edges of
>the
>cell.
>Thank you
>Fabrice
>
>\startuniqueMPgraphic{Vertical}
>
> linecap:=squared ;
> path p ; p :=
Hello,
In the code below, the red vertical line extends beyond the edges of the
cell.
Thank you
Fabrice
\startuniqueMPgraphic{Vertical}
linecap:=squared ;
path p ; p := unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
drawoptions (withpen pencircle withcolor \MPcolor{red}) ;
draw .5
r command as in the exmaple below.
> Best regards: Otared K.
>
> %% begin
> \startuniqueMPgraphic{MyShape}
> path p ;
> p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
> pickup pencircle scaled \overlaylinewidth ;
> fill p withcolor \MPcolor{\overlay
Hi Fabrice,
In order to have the box aligned with the text, it is enough to use the \lower
command as in the exmaple below.
Best regards: Otared K.
%% begin
\startuniqueMPgraphic{MyShape}
path p ;
p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
pickup
Hi Fabrice,
Below you have an example which may help you to achieve what you want, but in
the example I am sending there is an issue with the alignment of the title.
I could not solve the issue, sorry…
Best regards: Otared K.
%% begin example boxed-title.tex
\startuniqueMPgraphic{MyShape
arrow_shape =
> image (
> drawarrow
> (OverlayWidth,OverlayOffset) -- (0,OverlayOffset)
> withcolor
> OverlayLineColor ;
> setbounds currentpicture to boundingbox currentpicture
> b
) ;
)
enddef ;
vardef math_stacker_leftarrow_shape =
math_stacker_arrow_shape
enddef ;
vardef math_stacker_rightarrow_shape =
math_stacker_arrow_shape rotated 180
enddef ;
\stopMPextensions
\startuniqueMPgraphic{math:stacker:\number"2190}
math_stacker
ed options but you can do a lot when you use Metapost to
draw the background.
\startuniqueMPgraphic{TextBackground}
path p ; p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ;
draw p topenlarged 5mm ;
setbounds currentpicture to OverlayBox ;
\stopuniqueMPgraphic
\define
Hi,
Strange behavior: why is the colored text ?
Thanks,
Fabrice
\usemodule[tikz]
\startuniqueMPgraphic{titled}
path p ;
p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ;
pickup pencircle scaled 1mm ;
drawoptions(withcolor .625yellow) ;
draw llcorner p--lrcorner p ;
setbounds
>> understand the definition and operation, which is not always easy with
>> TeX commands.
>> Also, in the following code, this does not give the expected result.
>> Thank you.
>> Fabrice
>>
>> \showframe
>>
>> \setupcolors
>>[state=start
\showframe
\setupcolors
[state=start]
\setuppagenumbering[location=,alternative]
\startuniqueMPgraphic{titled}
path p ;
p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ;
pickup pencircle scaled 1mm ;
drawoptions(withcolor .625yellow) ;
draw llcorner p--lrcorner p ;
setbounds
]
\setuppagenumbering[location=,alternative]
\startuniqueMPgraphic{titled}
path p ;
p := unitsquare xscaled OverlayWidth yscaled OverlayHeight ;
pickup pencircle scaled 1mm ;
drawoptions(withcolor .625yellow) ;
draw llcorner p--lrcorner p ;
setbounds currentpicture to p ;
\stopuniqueMPgraphic
Hello,
Is it possible to calculate the position of something in Metapost, and
to export that value to TeX such that I can use it in setups and
things?
I thought perhaps I could \def inside btex..etex. Here's a minimal
example trying to illustrate the idea:
\startuniqueMPgraphic{canon}
\def\Bolha[#1]#2#3#4%
{\setupMPvariables[bolha][#1]%
\setMPtext{labelcima}{#3}%
\setMPtext{labelesquerda}{#2}%
\setMPtext{labeldireita}{#4}%
\useMPgraphic{bolha}}
\startuniqueMPgraphic{bolha}
path p, q, cima, esquerda, direita, vertical; pair A, B, C;
p:=fullcircle scaled \MPvar{size};
A
=lightgray]
\definecolor[Border][c=0.00, m=0.00, y=0.00, k=0.25]
\startuniqueMPgraphic{borderline}
path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
draw p withcolor \MPcolor{Border} dashed evenly withpen pencircle scaled
1.2pt ;
\stopuniqueMPgraphic
\defineoverlay[borderline
=0.00, y=0.00, k=0.25]
\startuniqueMPgraphic{borderline}
path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
draw p withcolor \MPcolor{Border} dashed evenly withpen pencircle scaled
1.2pt ;
\stopuniqueMPgraphic
\defineoverlay[borderline][\uniqueMPgraphic{borderline
foregroundstyle={\switchtobodyfont[10pt]},
align={high,flushleft},
frame=off,
framecolor=0.625white,
background=borderline,
]
\definefiller[dots][left=\dontleavehmode,right=\hskip\zeropoint\par]
\starttext
\startuniqueMPgraphic{borderline}
path p ; p := unitsquare xscaled \ov
,right}
offset=1ex,
frame=off,
]
\setupTABLE[column][first][width=0.25\textwidth]
\setupTABLE[column][2][width=0.35\textwidth]
\stopsetups
\starttext
\startuniqueMPgraphic{borderline}
path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight
]
\setuphead
[subsection]
[sectionstopper={},
sectionsegments=subsection:subsection,
conversion=number,]
\setupcolors[state=start,cmyk=yes,mpcmyk=yes]
\definecolor[mycolor][c=0.45,m=0.00,y=0.1,k=0.00]
\definecolor[colortext][c=1,m=0.00,y=0.3,k=0.3]
\starttext
\startuniqueMPgraphic
]
\starttext
\startuniqueMPgraphic{funny}
path p ;
numeric h ;
h := OverlayHeight ;
p:=unitsquare xscaled \overlaywidth yscaled \overlayheight superellipsed
0.9 ;
pickup pencircle scaled \overlaylinewidth ;
fill p withcolor \MPcolor{\overlaycolor} ;
draw (20,1)--(20,h-1) withcolor red ;
draw p withcolor
Dear Fabrice,
A try and error method which you may not want:
% macros=mkvi
\setuppapersize[A4][A4]
\setupcolors[state=start,cmyk=yes,mpcmyk=yes]
\definecolor[mycolor][c=0.45,m=0.00,y=0.1,k=0.00]
\definecolor[colortext][c=1,m=0.00,y=0.3,k=0.3]
\starttext
\startuniqueMPgraphic{funny}
path p
[mycolor][c=0.45,m=0.00,y=0.1,k=0.00]
\definecolor[colortext][c=1,m=0.00,y=0.3,k=0.3]
\starttext
\startuniqueMPgraphic{funny}
path p ;
numeric h ;
h := OverlayHeight ;
p:=unitsquare xscaled \overlaywidth yscaled \overlayheight superellipsed
0.9 ;
pickup pencircle scaled \overlaylinewidth ;
fill p
quare scaled 1cm xshifted i*cm;
> endfor;
> \stopMPcode
> \stoptext
>
> How can a line be drawn connecting the right edges of the rectangles? I have
> played with:
>
> \startuniqueMPgraphic{line}
> path a;
> a:=(0,0)--(0,3cm);
> draw a withpen pencircle
;> \startMPcode
>> for i=0 upto 1:
>> draw unitsquare scaled 1cm xshifted i*cm;
>> endfor;
>> \stopMPcode
>> \stoptext
>>
>>
>> How can a line be drawn connecting the right edges of the rectangles? I
>> have pla
upto 1:
> draw unitsquare scaled 1cm xshifted i*cm;
> endfor;
> \stopMPcode
> \stoptext
>
>
> How can a line be drawn connecting the right edges of the rectangles? I
> have played with:
>
> \startuniqueMPgraphic{line}
> path a;
>
the rectangles? I have
played with:
\startuniqueMPgraphic{line}
path a;
a:=(0,0)--(0,3cm);
draw a withpen pencircle scaled 3pt withcolor green;
\stopuniqueMPgraphic
\defineoverlay[line][{\uniqueMPgraphic{line}}]
and using it in \framed, but placing the line correctly is elusive
>>>
>>> I tested your example file: it works fine here with
>>> ConTeXt ver: 2014.09.25 18:58 MKIV beta fmt: 2014.9.25 int:
>>> english/english
>>> Which version are using?
>>>
>>> Best regards: OK
>>>
>>> On 26
;>
>>> Hello!
>>>
>>> Today I wanted to use an older tex file…. I get the same error as in the
>>> following test.
>>>
>>> \startuniqueMPgraphic{test}
>>>
>>> path p;
>>> p := fullcircle scaled 5cm
. I get the same error as in the
>> following test.
>>
>> \startuniqueMPgraphic{test}
>>
>> path p;
>> p := fullcircle scaled 5cm;
>> draw p;
>> label.bot(textext("Centre"), center p);
>>
tex file…. I get the same error as in the
> following test.
>
> \startuniqueMPgraphic{test}
>
> path p;
> p := fullcircle scaled 5cm;
> draw p;
> label.bot(textext("Centre"), center p);
>
> \stopuniqueMPgraphic
>
Hello!
Today I wanted to use an older tex file…. I get the same error as in the
following test.
\startuniqueMPgraphic{test}
path p;
p := fullcircle scaled 5cm;
draw p;
label.bot(textext("Centre"), center p);
\stopuniqueMPgraphic
ied a metafun approach
\startuniqueMPgraphic{math:mydot}
fill unitcircle scaled 2 shifted
(OverlayWidth/2-1,OverlayHeight+OverlayOffset);
path q;
q:= unitsquare xscaled OverlayWidth yscaled (OverlayHeight+OverlayOffset+1);
setbounds currentpicture to q;
\stopuniqueMPgr
extends into the
> margins ... it depends a bit on what 'line' means here
>
> \startuniqueMPgraphic{whatever}
> fill OverlayBox
> leftenlarged BackSpace
> rightenlarged CutSpace
> withcolor OverlayColor ;
>
example my section heads, or to
highlight one specific \item. What’s the best way to do it?
you can use textbackgrounds and plug in some mp code that extends into
the margins ... it depends a bit on what 'line' means here
\startuniqueMPgraphic{whatever}
fill
uffer
% ....
\startuniqueMPgraphic{mp:margin}
picture text;
text := btex \getbuffer[buffer:dummy] etex;
draw text shifted(-11.8mm,-4.8mm );
% Some more fancy drawing her
\stopuniqueMPgraphic
Can I render that with MetaPost to SVG?
Is it possible to render text as paths n
white]
\framed[align=middle,width=28mm,frame=off]
{
\SansBodyBold % Font definition done earlier
Test to \par
rendered \par
}
\stopcolor
\stop
\stopbuffer
% ....
\startuniqueMPgraphic{mp:margin}
picture text;
text := btex \getbuffer[buffer:dummy]
e=off] { \SansBodyBold % Font definition done earlier Test to \par rendered \par } \stopcolor \stop\stopbuffer% \startuniqueMPgraphic{mp:margin} picture text; text := btex \getbuffer[buffer:dummy] etex; draw text shifted(-11.8mm,-4.8mm ); % Some more fancy drawin
#x27;
{R:/tex/texmf/fonts/map/dvips/lm/lm-math.map}{R:/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts > 'fallback modern rm 12pt' is loaded
metapost> initializing instance 'metafun' using format 'metafun'
metapost> loading 'metafun'
Hi Thomas,
One way is to increase the « degree of randomness » by saying
withcolor transparent (1,0.3,mycolor[round(uniformdeviate(10*i)/10)])
or you can define a RandomColor as below:
\startuniqueMPgraphic{colortest}
save mycolor ; color mycolor[] ;
mycolor[1] := (0.07, 0.21, 0.65
z Thomas A. wrote:
> Hi all,
>
> I would like to have mp choose a (transparent) color randomly from a
> predefined list. My naive approach was (let’s restrict it to three
> colors):
>
> \startuniqueMPgraphic{colortest}
> save mycolor ; color mycolor[] ;
> mycolor[1] := (0.0
Hi all,
I would like to have mp choose a (transparent) color randomly from a predefined
list. My naive approach was (let’s restrict it to three colors):
\startuniqueMPgraphic{colortest}
save mycolor ; color mycolor[] ;
mycolor[1] := (0.07, 0.21, 0.65) ;
mycolor[2] := (0.6, 0.6, 0.4) ;
mycolor[3
can be removed without consequences
\startuniqueMPgraphic{first demo}
\stopuniqueMPgraphic
\startMPpositiongraphic{mypos:circle}
% absolute coordinates relative to paper by default?
numeric x, y, w, h, d, radius;
x = \MPx{\MPvar{self}};
y = \MPy{\MPvar{self}};
w = \MPw{\MPvar{self}};
o write
the command
Pointers, help welcome.
MWE:
%
%% NassiSimpleFrameBox
%%
%% Draw a box around a frame using exact height
%% and width. to use it use overlay NassiSimpleFrameBox
%%
\startuniqueMPgraphic{NassiSimpleFrameBox}
pickup pencircle scaled \overlaylinewi
Hi,
This should work ok now in the current beta.
\starttext
\startuniqueMPgraphic{mytest}
fill OverlayBox withcolor green ;
draw textext("nested") xsized 8cm shifted center OverlayBox
withcolor blue ;
draw fullcircle scaled bbwidth(OverlayBox) wit
On 10/5/2013 1:55 AM, Peter Münster wrote:
Hi,
The flowchart disappears when using background=mytest here:
--8<---cut here---start->8---
\usemodule[chart]
\startuniqueMPgraphic{mytest}
path p ; p := unitsquare
xscaled \overlaywidth yscaled \overlay
Hi,
The flowchart disappears when using background=mytest here:
--8<---cut here---start->8---
\usemodule[chart]
\startuniqueMPgraphic{mytest}
path p ; p := unitsquare
xscaled \overlaywidth yscaled \overlayheight ;
fill p withcolor green ;
\stopuniqueMPg
> \startreusableMPgraphic-\reuseMPgraphic "for graphics that don't change".
> \startuniqueMPgraphic-\uniqueMPgraphic "this graphic is calculated for each
> distinctive case".
>
> I fail to see in what respect startuseMPgraphic en startuniqueMPgraphic d
at don't change".
\startuniqueMPgraphic-\uniqueMPgraphic "this graphic is calculated for each
distinctive case".
I fail to see in what respect startuseMPgraphic en startuniqueMPgraphic do
differ? Can someone
1 - 100 of 293 matches
Mail list logo