centered (upper-
> > right) shadow around a figure?
>
> This a simple version (the \setupexternalfigures line is needed to load
> the example image because it won't wotk with dummy graphics):
>
> \startuseMPgraphic{shadow}
>fill OverlayBox shifted (EmWidth/2,EmWid
Am 10.05.2025 um 21:39 schrieb Jeroen:
Is there a way with metapost to get a slightly off-centered (upper-
right) shadow around a figure?
This a simple version (the \setupexternalfigures line is needed to load
the example image because it won't wotk with dummy graphics):
\startuseMPgr
Am 06.03.2025 um 01:49 schrieb Joel via ntg-context:
Here is my minimum working example:
\startuseMPgraphic{FunnyFrame}
picture p ; numeric w, h, o ;
p := textext.rt(\MPstring{FunnyFrame}) ;
w := OverlayWidth ; h := OverlayHeight ; o := BodyFontSize ;
p := p shifted (2o,h-ypart
Here is my minimum working example:
\startuseMPgraphic{FunnyFrame}
picture p ; numeric w, h, o ;
p := textext.rt(\MPstring{FunnyFrame}) ;
w := OverlayWidth ; h := OverlayHeight ; o := BodyFontSize ;
p := p shifted (2o,h-ypart center p) ; draw p ;
drawoptions (withpen pencircle scaled 1pt
at it points from 6 to 7, for instance?
>> (Starting a little to the right and above the 6, ending below and to the
>> left of the 7)
>>
>> Matthias
>>
>>
>>
>> \starttext
>> \startuseMPgraphic{DiagonalArrow}
>> numeri
s from 6 to 7, for instance?
> (Starting a little to the right and above the 6, ending below and to the left
> of the 7)
>
> Matthias
>
>
>
> \starttext
> \startuseMPgraphic{DiagonalArrow}
> numeric w, h;
> w := OverlayWidth ;
> h := OverlayHeight ;
>
to the left
of the 7)
Matthias
\starttext
\startuseMPgraphic{DiagonalArrow}
numeric w, h;
w := OverlayWidth ;
h := OverlayHeight ;
draw lmt_arrow [ path =((.5*w,.5*w) -- (2*w,2*w)), ]
withpen pencircle
scaled (h/40)
withcolor "darkgreen" ;
\stopus
frame).
%
\setupheadertexts[]
\setuppapersize[A8,landscape]
\setupbodyfont[40pt]
\startuseMPgraphic{MPMyPage}
StartPage ;
draw
positionbox("locA")
withpen pencircle scaled 5pt
withcolor transparent(1,0.5,blue);
pair ThePoint;
ThePoint := positionxy("locA");
[40pt]
\startuseMPgraphic{MPMyPage}
StartPage ;
draw
positionbox("locA")
withpen pencircle scaled 5pt
withcolor transparent(1,0.5,blue);
pair ThePoint;
ThePoint := positionxy("locA");
draw ThePoint
withpen pencircle scaled 5pt
withcolor red ;
draw ThePoint
shifted
,
footer=0mm,
height=180mm,
]
\definelayout[one][width=98.8mm]
\definelayout[two][width=158.2mm]
\definelayout[1,2,5,6][one]
\definelayout[3,4,7,8][two]
%=
\startuseMPgraphic{testA}
path p ;
p := fullsquare xscaled 98.8mm yscaled 180mm
8][two]
%=====
\startuseMPgraphic{testA}
path p ;
p := fullsquare xscaled 98.8mm yscaled 180mm;
lmt_parshape [ path = p,] ;
\stopuseMPgraphic
\startuseMPgraphic{testB}
path p ;
p := fullsquare xscaled 158.2mm yscaled 180mm;
lmt_parshape [ path = p,] ;
\stopuseMPg
command as
> shown below. (I presume there is a way to compute the correct offset from the
> column widths and write a macro to avoid having to fine-tune it by hand.)
>
>
> \startuseMPgraphic{recBox}{w,h,sx,sy,lColor}
> numeric u;
he \offset command
as shown below. (I presume there is a way to compute the correct offset
from the column widths and write a macro to avoid having to fine-tune it by
hand.)
\startuseMPgraphic{recBox}{w,h,sx,sy,lColor}
numeric u;u := 1cm;
draw
h \stoptabulate as follows:
>
> _
>
> \startuseMPgraphic{recBox}{w,h,sx,sy,lColor}
> numeric u;u := 1cm;
> draw unitsquare xyscaled (\MPvar{w}, \MPvar{h}) shifted
> (\MPvar{sx},\MPvar{sy}) withpen pencircle scaled 3pt withcolor \MPvar{lColor};
> \stopuseMPgraphic
> \defineoverlay
&g
Hi,
Not sure whether that's the best solution or not, but your example seems to
work on my side if I replace \starttable with
\starttabulate and \stoptable with \stoptabulate as follows:
_____
\startuseMPgraphic{recBox}{w,h,
Sorry.
Here is a sample code.
Thank you.
Best regards,
Dalyoung
\startuseMPgraphic{recBox}{w,h,sx,sy,lColor}
numeric u;u := 1cm;
draw unitsquare xyscaled (\MPvar{w}, \MPvar{h}) shifted
(\MPvar{sx},\MPvar{sy}) withpen pencircle scaled 3pt withcolor \MPvar{lColor};
\stopuseMPgraphic
reading.
Best regards,
Dalyoung
\startbuffer[styleOutline]
\startuseMPgraphic{outlineT}
draw lmt_outline [
text = \MPvar{tt},
kind = "both",
width = OverlayWidth,
align = "middle",
fillcolor = "gray&quo
Thanks a lot. Works for me.
Am 12. Dezember 2024 17:43:44 MEZ schrieb Mikael Sundqvist :
>Hi,
>
>Not sure exactly what you are after, but this could work (I saved your
>svg as juh.svg)
>
>/Mikael
>
>\startuseMPgraphic{juh}{juhcolor}
>
>picture juh ;
>
>juh
Hi,
Not sure exactly what you are after, but this could work (I saved your
svg as juh.svg)
/Mikael
\startuseMPgraphic{juh}{juhcolor}
picture juh ;
juh := lmt_svg [
filename = "juh.svg",
origin = true ] ;
draw juh ysized OverlayHeight withcolor \MPvar{juhcolor} ;
\stopus
stroke-width="2"/>
\stopbuffer
\defineoverlay[pic][\includesvgbuffer[svg][offset=1bp]]
Nothing happens, no form appears in the overlay.
I saw an example with \startstopuseMPgraphic in the Wiki.
\startuseMPgraphic{MPtextcircle}
path p;
p := fullcircle xscaled OverlayWidth
t because a few custom pens can draw all lines.
\startuseMPgraphic{draw}
draw hlingrid(0, 7, 1, 7, 7) withpen pencircle scaled 1/20 shifted
(0.5,0.5) withcolor "darkgray" ;
draw vlingrid(0, 7, 1, 7, 7) withpen pencircle scaled 1/20 shifted
(0.5,0.5) withcolor "darkgray" ;
pen pe
t because a few custom pens can draw all lines.
\startuseMPgraphic{draw}
draw hlingrid(0, 7, 1, 7, 7) withpen pencircle scaled 1/20 shifted
(0.5,0.5) withcolor "darkgray" ;
draw vlingrid(0, 7, 1, 7, 7) withpen pencircle scaled 1/20 shifted
(0.5,0.5) withcolor "darkgray&qu
ith custom pens but failed to create a working triangle pen.
> I'll take another look into it because a few custom pens can draw all lines.
\startuseMPgraphic{draw}
draw hlingrid(0, 7, 1, 7, 7) withpen pencircle scaled 1/20 shifted
(0.5,0.5) withcolor "darkgray" ;
draw vli
nly a
start and end point versus the outline alternative where I need at least
twice as many points to get the desired output.
\starttext
\startuseMPgraphic{draw}
draw hlingrid(0, 7, 1, 7, 7) withpen pencircle scaled 1/20 shifted
(0.5,0.5) withcolor "darkgray" ;
draw vlingrid(0, 7, 1
dcolor=lightgray,
]
\startuseMPgraphic{mpos:region:leftbar}
draw_multi_pars;
draw_multi_side;
\stopuseMPgraphic
\definecolor[lightblue] [0.95(blue,white)]
\definetextbackground
[blocktext]
[leftbartext]
[
framecolor=darkblue,
backgroundcolor=lightblue,
]
\definedescription
[excursus]
[
ater buffalo" so that the single columns have
> >> a width that is similar to the width of the single digit coming in the
> >> second row.
> >
> > To visualize this, I patched the PDF of the above example to the desired
> > result. See the attachmen
the PDF of the above example to the
desired result. See the attachment.
You can use Metapost.
\startuseMPgraphic{tableheader}{text,rotation}
label.lft("\strut\bf\MPvar{text}",origin)
rotated \MPvar{rotation}
shifted (\the\strutht,0);
setbounds currentpicture to unitsquare
red
result. See the attachment.
You can use Metapost.
\startuseMPgraphic{tableheader}{text,rotation}
label.lft("\strut\bf\MPvar{text}",origin)
rotated \MPvar{rotation}
shifted (\the\strutht,0);
setbounds currentpicture to unitsquare
xyscaled(\the\struttotal,sin(\MPvar
tions/377234/context-frame-problems/377261#377261),
the following code works well if there is no more than one box per page:
```
\definecounter[pageNumberTop]
\definecounter[pageNumberBottom]
\startuseMPgraphic{mp:axiomframe}
begingroup;
for i=1 upto nofmultipars :
path p;
In the Metafun manual source the setup for page numbering is:
\startuseMPgraphic{circled}
pickup pencircle scaled 1mm ;
drawoptions(withcolor (.6+uniformdeviate.35)*white) ;
fill fullcircle xscaled 1.5cm yscaled 1cm ;
drawoptions(withcolor .625yellow) ;
draw fullcircle xscaled 1.5cm
oordinates or point size
\startuseMPgraphic{fullheightbackground}
fill unitsquare xyscaled (OverlayWidth, OverlayHeight) withcolor "gray" ;
w := MakeupWidth;
h := OverlayHeight;
draw (0,0)--(w,0) withpen pencircle scaled 2pt withcolor green;
draw (0,h)--(w,h) withpen
alan.caruanam...@gmail.com schrieb am 23.07.2024 um 20:29:
Hello, I need the background (lines and points) to be inside (tangent) of the
frame, I don't know how to do it
\startuseMPgraphic{fullheightbackground}
fill unitsquare xyscaled (OverlayWidth, OverlayHeight) withcolor
diameter of
the pen used for the dot).
Best regards: Otared
> On 23 Jul 2024, at 20:29, alan.caruanam...@gmail.com wrote:
>
> Hello, I need the background (lines and points) to be inside (tangent) of the
> frame, I don't know how to do it
>
> \startuseMPgraphic{fullheig
Hello, I need the background (lines and points) to be inside (tangent) of the
frame, I don't know how to do it
\startuseMPgraphic{fullheightbackground}
fill unitsquare xyscaled (OverlayWidth, OverlayHeight) withcolor "gray" ;
w := MakeupWidth;
h := OverlayHeight;
component[essai]
\setuplayout
[
backspace=28mm,
topspace=35mm,
width=140mm
]
\setuppagenumbering[alternative=doublesided,location=]
\setupbodyfont[pagella,11pt]
\mainlanguage[fr]
\setcharacterspacing
[frenchpunctuation]
\startuseMPgraphic{acframeleft}
fill OverlayBox
leftenla
Z for figure typesetting.
If you use that kind of simple graphics, you can avoid this transparency
hacking by using metafun:
\setupbodyfont[dejavu]
\starttext
\startuseMPgraphic{test}
pickup pencircle scaled 2mm ;
draw fullcircle scaled 3cm withcolor darkred withstacking 1 ;
I'm using LaTeX-Beamer and TikZ for figure typesetting.
> If you use that kind of simple graphics, you can avoid this transparency
> hacking by using metafun:
>
> \setupbodyfont[dejavu]
>
> \starttext
>
> \startuseMPgraphic{test}
> pickup pencircle scaled 2
ng by using metafun:
\setupbodyfont[dejavu]
\starttext
\startuseMPgraphic{test}
pickup pencircle scaled 2mm ;
draw fullcircle scaled 3cm withcolor darkred withstacking 1 ;
draw fullcircle scaled 2cm withcolor darkblue withstacking 2 ;
draw textext("one") with
Hi,
I am testing some of my old styles on latest context and find that the
background key of \startbackground and \starttextbackground doesn't work
(\framed is working as expected). Here is a MWE:
\startuseMPgraphic{background:test}
fill OverlayBox withcolor 0.75[red,white];
lormodel=rgb] % gray rgb cmyk auto none
>
> % Commands for MetaPost interpreter to draw a circle...
> \startuseMPgraphic{textcircle}
> draw fullcircle
> xscaled OverlayWidth
> yscaled OverlayWidth
> withcolor OverlayLineColor;
>
la:
\definecolor[colour_text][r=0.754,g=0.516,b=0.324] % RGB 0xc08453
\setupcolors[
state=start,
textcolor=colour_text,
pagecolormodel=rgb] % gray rgb cmyk auto none
% Commands for MetaPost interpreter to draw a circle...
\startuseMPgraphic{textcircle}
Kip Warner schrieb am 28.05.2024 um 06:29:
On Mon, 2024-05-27 at 19:44 +0200, Wolfgang Schuster wrote:
You can use the \framed solution and modify it to use a metapost
graphic as background, it also easy to replace the circle with a
hexagon etc.
\startuseMPgraphic{textcircle}
draw
On Mon, 2024-05-27 at 19:44 +0200, Wolfgang Schuster wrote:
> You can use the \framed solution and modify it to use a metapost
> graphic as background, it also easy to replace the circle with a
> hexagon etc.
>
> \startuseMPgraphic{textcircle}
> draw fullcircle
y to replace the circle with a hexagon etc.
\startuseMPgraphic{textcircle}
draw fullcircle
xscaled OverlayWidth
yscaled OverlayWidth
withcolor OverlayLineColor ;
\stopuseMPgraphic
\defineoverlay[textcircle][\useMPgraphic{textcircle}]
\defineframed
[textcircled]
[
relax}]
\definemeasure [myheightb]
[{\the\dimexpr\baselineskip*25-\lineskip*1\relax}]
\startuseMPgraphic{shape:1}
path p ;
numeric mywidth ; mywidth := \measure{mywidth};
numeric mywidtha ; mywidtha := \measure{mywidtha};
numeric myheight ; myheight := \measure{myheight};
numeric myhe
asure [myheightb][{\the\dimexpr\baselineskip*25-\lineskip*1\relax}]
\startuseMPgraphic{mymetafunpath}
path p ;
numeric mywidth ; mywidth := \measure{mywidth};
numeric mywidtha ; mywidtha := \measure{mywidtha};
numeric myheight ; myheight := \measure{myheight};
numeric myhe
necessary to show the
problem, the custom layout isn't necessary and can be left out.
\startuseMPgraphic{FunnyFrame}
picture p ; numeric w, h, o ;
p := textext.rt(\MPstring{FunnyFrame}) ;
w := OverlayWidth ; h := OverlayHeight ; o := BodyFontSize ;
p := p shifted (2o,h-ypart center p) ; d
,
rightmargindistance=7mm,
leftmargin=1.5cm,
header=1cm,
headerdistance=.5cm,
bottomspace=.5cm,
bottomdistance=0mm,
footer=.8cm,
footerdistance=.2cm,
setup=strict,]
\startuseMPgraphic
\baselineskip*20-\lineskip*2\relax}]
\startuseMPgraphic{mp1}
path p ;
numeric myheight ; myheight := \measure{myheight};
numeric myheighta ; myheighta := \measure{myheighta};
numeric myheightb ; myheightb := \measure{myheightb};
p := (0,0) -- (6cm,0) --
(6cm,myheighta) -- (4cm
Hi all,
I am happy to share one way to get "pull quotes between two columns"
(in a three columns layout).
https://wiki.contextgarden.net/images/5/50/context_3columns_layout.pdf
It's not based on Columns / ColumnSet / Page Columns.
It just combines \startuseMPgraphic + build_par
garu...@azules.eu schrieb am 20.04.2024 um 23:00:
I can not figure out why this progress bar only works when \showframe is
activated.
When you comment on \showframe, it's as if \realpageno is at zero.
(current version: 2024.04.01 08:59)
\showframe
\startuseMPgraphic{MonGraphis
I can not figure out why this progress bar only works when \showframe is
activated.
When you comment on \showframe, it's as if \realpageno is at zero.
(current version: 2024.04.01 08:59)
\showframe
\startuseMPgraphic{MonGraphisme_MP}
numeric n ; n := \number\realpageno ;
numeric
,
width=max,
height=fit,
style=italic]
\definelabel
[Définition]
[headstyle=\bf\smallcaps]
\startuseMPgraphic{MyFrame}
path b;
picture p;
%p := textext.rt("\white\Définition");
p := textext.rt("\white\framedtextparameter{Title}");
%p := textext.rt("\white\getva
not much interested in dashed borders but to have lines
affected by my sketchy style - courtesy of Aditya et al., see below)
Taco, will the syntax pages in the wiki update automatically to a newer
version?
"""
\startuseMPgraphic{mp:sketchy}
input mp-sketch.mp;
sketchypaths;
ske
On 2/21/2024 7:47 PM, Henning Hraban Ramm wrote:
Am 21.02.24 um 19:43 schrieb Wolfgang Schuster:
… but it would be visible on a colored background. I’m sure you can
show me a better way…
\startuseMPgraphic{dottedborder}
draw bottomboundary OverlayBox withpen pencircle scaled 2 dashed
Am 21.02.24 um 19:43 schrieb Wolfgang Schuster:
… but it would be visible on a colored background. I’m sure you can
show me a better way…
\startuseMPgraphic{dottedborder}
draw bottomboundary OverlayBox withpen pencircle scaled 2 dashed
withdots withcolor "red";
setbounds curr
he graphic (OverlayBox is the size
of the cell).
begin example
\startuseMPgraphic{dottedborder}
draw OverlayBox withpen pencircle scaled 2 dashed withdots
withcolor "red";
\stopuseMPgraphic
\defineoverlay[dottedborder][\useMPgraphic{dottedborder}]
\starttext
\bTABLE[
begin example
\startuseMPgraphic{dottedborder}
draw OverlayBox withpen pencircle scaled 2 dashed withdots withcolor
"red";
\stopuseMPgraphic
\defineoverlay[dottedborder][\useMPgraphic{dottedborder}]
\starttext
\bTABLE[frame=off,background=dottedborder]
Thank you!
Since I needed o
crutch…
The example below draws a custom border for the whole cell but you're
free to draw only certain sides (leftboundary etc. helps) but don't
forget to set the boundary box for the graphic (OverlayBox is the size
of the cell).
begin example
\startuseMPgraphic{dottedbord
a:={layerU,layerM};
> > > >
> > > > In my logic, the layers will be drawn in the order of their appearance
> > > > within the {}. In the example, drawn content of layerM might cover
> > > > drawn content of layerU.
> > > >
> > >
awn content of layerM might cover drawn
> > > content of layerU.
> > >
> > > Contrary to a layer subset, each layer set will result in a PDF page, and
> > > thus the layer sets are related to each other by an inner order. That's
> > > why I would use
t; > layerset1 := {layerW,layerA};> > layerset2 := myappend{layerset1, layerY};> > layerset3 := myappend{layerset2, layersubsetGamma};> > layerset4 := myappend{layerset2, layerU};> > layerset5 := myappend{layerset4, layersubsetGamma};> >> > Finally, I would ne
thus the layer sets are related to each other by an inner order. That's
> > > why I would use an array variable here with [].
> > >
> > > I don't know how to append a set. In the following example, I assumed
> > > there would be a function myappend(,
here
> > would be a function myappend(, > set should be appended with>)
> >
> > myset layerset[];
> > layerset1 := {layerW,layerA};
> > layerset2 := myappend{layerset1, layerY};
> > layerset3 := myappend{layerset2, layersubsetGamma};
> > layerset4
result in a PDF page,
> > > > and thus the layer sets are related to each other by an inner order.
> > > > That's why I would use an array variable here with [].
> > > >
> > > > I don't know how to append a set. In the following example, I a
d with>)
> > >
> > > myset layerset[];
> > > layerset1 := {layerW,layerA};
> > > layerset2 := myappend{layerset1, layerY};
> > > layerset3 := myappend{layerset2, layersubsetGamma};
> > > layerset4 := myappend{layerset2, layerU};
> &g
gt; > myset layerset[];
> > layerset1 := {layerW,layerA};
> > layerset2 := myappend{layerset1, layerY};
> > layerset3 := myappend{layerset2, layersubsetGamma};
> > layerset4 := myappend{layerset2, layerU};
> > layerset5 := myappend{layerset4, layersubsetGamma};
set5 := myappend{layerset4, layersubsetGamma};
>
> Finally, I would need each layerset[k] typeset on its own pdf page. And of
> course on each page k, only the layers which appear in the definition of the
> layerset[k] should be drawn on top of each other in the order as they ap
e code and its outputs of two cases for comparison.Any suggestions are welcomed.Tomorrow is the New Years day in Lunar calendar.Happy new year, again.Best regards,Dalyoung%%%\startuseMPgraphic{mark}path p;p := unitsquare scaled 3cm;draw p;draw (point 0 of p)--(point 2 of p);draw (point 1 of p)--(p
suggestions are welcomed.Tomorrow is the New Years day in Lunar calendar.Happy new year, again.Best regards,Dalyoung%%%\startuseMPgraphic{mark}path p;p := unitsquare scaled 3cm;draw p;draw (point 0 of p)--(point 2 of p);draw (point 1 of p)--(point 3 of p);\stopuseMPgraphic\startuseMPgraphic
]\startuseMPgraphic{ticket}{i,j}path p,q;pair A,B;p := unitsquare xyscaled (67mm,73mm);A := point 0.5 of p;B := point 2.5 of p;draw p;label(textext("Text"), .25A+.75B );label(textext("\tfd " & decimal (3*\MPvar{i}-\MPvar{j})), center p);label(textext("Text"
visible on pages 29 and
forward).
I don't bother you with my code which is too long. Let's use the mwe provided
by you (I added it here for convenience), where we have 3 pages. How can I have
the content of p2 not be added on page 3 and forward?
\startuseMPgraphic{base}
picture p[];
pat
Thank you Mikael,
this works!
Emanuel
On Dez. 2 2023, at 7:46 pm, Mikael Sundqvist wrote:
> Hi,
>
> I don't know if \startMPinclusions \stopMPinclusions shall work with
> \startMPpage and \stopMPpage. In this case, one can use a separate
> graphics:
>
> \startuseM
Hi,
I don't know if \startMPinclusions \stopMPinclusions shall work with
\startMPpage and \stopMPpage. In this case, one can use a separate
graphics:
\startuseMPgraphic{base}
picture p[];
path TheFrame ;
TheFrame := fullsquare scaled 5in ;
z1 = (60,40);
z2 = (40,90);
z3 = (10,70);
p1:=
That works fine except that the following line does only issue the
sequential number and not the chapter number.
Refer to \in{code fragment}[tit1] bla
MWE:
\startuseMPgraphic{CountFrame}
picture p; numeric w, h, o;
p := textext.rt("\wrappedcurrentconstruction");
w := Overlay
)
Code Fragment 2.1 (The Third Title)
MWE:
\startuseMPgraphic{CountFrame}
picture p; numeric w, h, o;
p := textext.rt("\wrappedcurrentconstruction");
w := OverlayWidth; h := OverlayHeight; o := BodyFontSize;
p := p shifted (2o,h-ypart center p);
draw p;
path b;
b := bou
chapter 1, codefragment 1, 2 etc. with the possibility that in the text I
can refer to the codefragment like \in{codefragment\space}[code:ccpsample]
similar as to tables and figures? Thanks Jeroen
%%
% MWE1
%%
\startuseMPgraphic{mpos:par:myexample}
path p;
for i = 1
situation asks for it
to have it only have a frame half pagewidth, like a width=0.5\textwidth
Thanks
Jeroen
\unprotect
\startuseMPgraphic{mpos:par:myexample}
path p;
for i = 1 upto nofmultipars :
p := multipars[1] topenlarged 4pt bottomenlarged 4pt cornered 2mm ;
fill p withcolor 0.95white
a frame half pagewidth, like a width=0.5\textwidth
Thanks
Jeroen
\unprotect
\startuseMPgraphic{mpos:par:myexample}
path p;
for i = 1 upto nofmultipars :
p := multipars[1] topenlarged 4pt bottomenlarged 4pt cornered 2mm ;
fill p withcolor 0.95white ;
draw p withcolor black
withpen pencircle
{concurrent}
why twice ? you only have to typeset the text once, right?
{text:\number\numexpr1+\rawcountervalue[ConcurrentTextGetCounter]/2\relax}}
\startuseMPgraphic{GraphicConcurrent}
numeric index;
index := 1;
% Differentiate between new text blocks and those crossing pages
tTextSetCounter]}
{#1}}
% Account for the counter incrementing twice and the index being 1-based.
\def\ConcurrentTextGet{%
\incrementnumber[ConcurrentTextGetCounter]%
\getvariable
{concurrent}
{text:\number\numexpr1+\rawcountervalue[ConcurrentTextGetCounter]/2\relax}}
\startuseMP
{#1}}
\def\ConcurrentTextGet % we want full expansion here
{\localcontrolled{\global\advance\ConcurrentTextGetCounter\plusone}%
\getvariable
{concurrent}
{text:\the\ConcurrentTextGetCounter}}
% We also use the helpers (so at least we can see what we do):
\startuseMPgraphi
Hi,
First, find the actual point along the curve of the wave you want, then you can
ask for the direction of the wave at that time, and its point:
\startuseMPgraphic{Waves}
numeric height,stops,yoffset;
stops := 10;
height := OverlayHeight/10;
path wave[]; % storing waves
draw (0,0
use a
randomized sinus? (How?)
* The boat should sit on the middle wave and be rotated by the current
slope. I know I need the “time” of the upper curve and get the 1st
derivation, but how?
"""
\setuppapersize[SW]
\startuseMPgraphic{Waves}
numeric height,stops,yoffset;
stop
[state=repeat].
Thank you!
But \setupbackgrounds[footer][text][background=Blocks,state=repeat]
doesn’t work.
Does this make sense if I don’t want layers in _all_ areas to repeat?
\setuppapersize[SW]
\startuseMPgraphic{Blocks}
fill unitsquare xysized (OverlayWidth * PageNumber / LastPageNumber
\setupbackgrounds[state=repeat].
\setuppapersize[SW]
\startuseMPgraphic{Blocks}
fill unitsquare xysized (OverlayWidth * PageNumber / LastPageNumber,
OverlayHeight) withcolor blue;
%setbounds currentpicture to OverlayBox;
\stopuseMPgraphic
\defineoverlay[Blocks][\useMPgraphic{Blocks}]
\setupbackgrounds[state
\useMPgraphics would be enough to re-calculate on every page?
* How can I set a background to the footer area, but page width?
* I tried \overlaywidth as well as OverlayWidth in the MP graphic – how
do I get the page size?
"""
\setuppapersize[SW]
\startuseMPgraphic{Blocks}
fill uni
also welcome. My MWE:
\setuppapersize[S6]
\startuseMPgraphic{itemize:toc}
save p; path p;
p := ( (0,-0.5)--(0,0.5)--(0.866,0)--cycle ) scaled 1.5ExHeight;
fill p withcolor \MPcolor{Black};
\stopuseMPgraphic
\definesymbol[itemize:toc][\useMPgraphic{itemize:toc}]
\definelistalternative
[to
; Thank you for reading.
>
> Best regards,
>
> Dalyoung
>
>
> \startuseMPgraphic{circled}
> pickup pencircle scaled 1mm ;
> drawoptions(withcolor (.6+uniformdeviate.35)*white) ;
> fill fullcircle xscaled 1.5cm yscaled 1cm ;
> drawoptions(w
-related with chapter title.
And, I changed
\def\ChapterCommand#1#2% —> \define[2]\ChapterCommand
Would you please test the following code to find out what is wrong?
Thank you for reading.
Best regards,
Dalyoung
\startuseMPgraphic{circled}
pickup pencircle scaled 1mm ;
drawopti
er useful.
>
> Thanks in advance and happy new year,
> Alex
Hi Alex,
Maybe there are other ways, but one can use \includeMPgraphic. One
simple example given below.
/Mikael
\starttext
\startuseMPgraphic{vanderwaerdenbas}
u:=3cm ;
def vdwbas(expr x) = abs(x-round x) enddef ;
def vdw
Here comes another one that works with the switch --luatex but not in lmtx:
\setuppapersize[A6,landscape][A6,landscape]
\startuseMPgraphic{ornament}
StartPage ;
save diff ;numeric diff;
diff = .3cm ;
save w; numeric w;
w = xpart (lrcorner Field[Text][Text] - llcorner Field[Text][Text]) - diff
edges in the tree.
--
-- @param graph - object - The tree containing numerous nodes.
--
-- @return The number of vertex pairs in the tree.
function ud.count( graph )
return #graph
end
\stopluacode
\startuseMPgraphic{HexGridBaseGraphic}{side}
% Set the random seed to the current sec
Hi there,
How is atan2 called? I rolled my own as follows:
% SOT
\startuseMPgraphic{HexGridBaseGraphic}
vardef atantwo( expr ax, ay, bx, by ) =
save theta;
numeric dx;
numeric dy;
numeric theta;
dx := bx - ax;
dy := by - ay;
theta := 0;
if (dx >
without error!
I don't know what is happened, but it is a good news.
Here is a sample file which I simplified one that is given by one of the
experts.
Someone may modify it better.
Thanks to ConTeXt team.
Best regards,
Dalyoung
\startuseMPgraphic{squareBox}
draw topboundary Overl
e some MP code for several custom enumeration.
> >
> > However I can't make the overall setup work, needless to say different
> > border colors for each enumeration though setupMPvariables. What am I
> > missing?\startuseMPgraphic{mp:textFrame}
> begingroup
I
missing?\startuseMPgraphic{mp:textFrame}
begingroup;
path p ;
for i = 1 upto nofmultipars :
p := (ulcorner multipars[i]) -- (llcorner multipars[i]) -- (llcorner
multipars[i] xshifted .25cm) -- (ulcorner multipars[i] xshifted .25cm)
-- cycle ;
fill p withcolor bo
Hi,
I just came across nofmultipars (which is great for splitting frames across
pages, unlike a simple framed). Is there an equivalent for floats?
The MWE would contain
\startuseMPgraphic{mp:textFrame}
begingroup;
path p ;
for i = 1 upto nofmultipars :
p := (ulcorner multipars[i]) -- (llcorner
On 8/19/2022 3:03 AM, Jeong Dal wrote:
Dear all,
A few days ago, I sent an email as follows. But it is linked to another subject
because I choose reply of another subject.
So, I send the same mail again.
\startuseMPgraphic{outlineT}
draw lmt_outline [
text = \MPvar{tt
than the
textwidth.
It is OK when I use just bigger fonts.
But it writes the long title in one line if I use outlined font for title as in
MWE.
Is there a way to write it in two lines using the outlined font?
Thanks,
Best regards,
Dalyoung
\startuseMPgraphic{outlineT}
draw outlinetext.b
1 - 100 of 1104 matches
Mail list logo