(0,0)--(0,PaperHeight) withcolor red;
\stopuseMPgraphic
\startsetups S1
\setlayer[T]{\useMPgraphic{VerticalRule}}
\stopsetups
\startluasetups S2
\startluacode
context.setlayer({T}, \\useMPgraphic{VerticalRule})
\stopluacode
\stopluasetups
\starttext
\setupbackgrounds[page][setups=S1
]
\definelayer[T][x=10mm,y=0mm]
\startuseMPgraphic{VerticalRule}
draw (0,0)--(0,PaperHeight) withcolor red;
\stopuseMPgraphic
\startsetups S1
\setlayer[T]{\useMPgraphic{VerticalRule}}
\stopsetups
\startluasetups S2
\startluacode
context.setlayer({T}, \\useMPgraphic{VerticalRule})
\stopluacode
][A4,landscape]
\setuplayout[page]
\definelayer[T][x=10mm,y=0mm]
\startuseMPgraphic{VerticalRule}
draw (0,0)--(0,PaperHeight) withcolor red;
\stopuseMPgraphic
\startsetups S1
\setlayer[T]{\useMPgraphic{VerticalRule}}
\stopsetups
\startluasetups S2
\startluacode
context.setlayer({T
:
---
\setuppapersize[A4,landscape][A4,landscape]
\setuplayout[page]
\definelayer[T][x=10mm,y=0mm]
\startuseMPgraphic{VerticalRule}
draw (0,0)--(0,PaperHeight) withcolor red;
\stopuseMPgraphic
\startsetups S1
\setlayer[T]{\useMPgraphic{VerticalRule}}
\stopsetups
\startluasetups S2
\startluacode
the resulting .mp file into my ConTeXt-file:
\startuseMPgraphic{foo}
\input ../figures/bar.fig
\stopuseMPgraphic
\placefigure[here][fig:foo]{A small test}{
\useMPgraphic{foo}
}
This, however, doesn't work and shows the figure as 'undefined' in the
PDF.
My current solution now is to convert
. This script supports an option '-o'
to use plain TeX.
I tried \input'ing the resulting .mp file into my ConTeXt-file:
\startuseMPgraphic{foo}
\input ../figures/bar.fig
\stopuseMPgraphic
\placefigure[here][fig:foo]{A small test}{
\useMPgraphic{foo}
}
This, however, doesn't work and shows
[QuadreBasic][\useMPgraphic{QuadreBasic}]
% interface=en output=pdftex
% Regime
\enableregime[utf]
\input capcalera.contex
\setupheadertexts[{\tfx 3r DIV. T4 - MAT}][{\tfx {\bf FULL 1}. \currentdate}]
% Start the text
\starttext
\bigskip
\startframedtext[width=broad, location=middle]
\startalignment
(false) ;
newCircle.o(btex M'' etex) framed(false) ;
newMatrix.mat(2,2)(m,n,nb,o) hsep(1cm), vsep(2cm) ;
mcline.mat(1,1,1,2) nodesepA(3pt) ;
mcline.mat(1,2,2,2) nodesepA(3pt) ;
mcline.mat(1,1,2,2) nodesepA(3pt) ;
mat.c: = origin ;
drawObj(mat) ;
\stopuseMPgraphic
\useMPgraphic
);
\stopuseMPgraphic
\useMPgraphic{commutativediagram}
\stoptext
what I don't understand is that this examples builds and runs fine under
mkii but not under mkiv, what did I do wrong, where is my error in this
code so it will not build?
Greetings
--
Martin 'golodhrim' Scholz
Auf dem Sattler 4
34516
;
label.bot(textext(\switchtobodyfont[30pt]\startcolor[orange]
decimal PageNumber \stopcolor\ -- \startcolor[darkblue] decimal
NOfPages \stopcolor), z[1]) ;
StopPage ;
\stopuseMPgraphic
\defineoverlay
[pageback]
[\useMPgraphic{back}]
\setupbackgrounds[page][background=pageback
using a useMPgraphic
%D defined set by \mono{mp=}. I define a useMPgraphic \mono{background:random}
%D to get the frame that I wanted. The code looks a bit complicated, because
%D \tex{texbackground} is supposed to work in a multi||column documents.
% A randomized frame
\startuseMPgraphic
to OverlayBox;
\stopuniqueMPgraphic
\startuniqueMPgraphic{Diagonal}
path p,q;
p := unitsquare xscaled \overlaywidth yscaled \overlayheight;
draw llcorner p -- urcorner p withpen pencircle scaled 2pt;
\stopuniqueMPgraphic
\defineoverlay[Topline][\useMPgraphic{Topline
On 2-8-2010 3:16, Julian Becker wrote:
\defineoverlay[left page] [\useMPgraphic{left page}]
\defineoverlay[right page][\useMPgraphic{right page}]
\setupbackgrounds[leftpage] [background=left page]
\setupbackgrounds[rightpage][background=right page]
But now I have them on every page.
I don't
I'm working on a document with page backgrounds. I got them working now,
using
...
...
\defineoverlay[left page] [\useMPgraphic{left page}]
\defineoverlay[right page][\useMPgraphic{right page}]
\setupbackgrounds[leftpage] [background=left page]
\setupbackgrounds[rightpage][background=right page
:
---
\startuseMPgraphic{diagram}
u := StrutHeight;
draw origin--(2u,0)--(u,sqrt(3)*u)--cycle;
% MathAxis at y-coordinate sqrt(3)*u/3
\stopuseMPgraphic
\starttext
\startformula
A\useMPgraphic{diagram}
=B
\stopformula
\stoptext
---
It would be great if the comment could be turned
\Umathaxis\displaystyle\hbox{\useMPgraphic{diagram2}}
=B
\stopformula
\stoptext
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl
)--cycle;
% MathAxis at y-coordinate sqrt(3)*u/3
\stopuseMPgraphic
\starttext
\startformula
A\useMPgraphic{diagram}
=B
\stopformula
\stoptext
---
It would be great if the comment could be turned into a processing instruction
for ConTeXt such that the triangle's center of mass ends up
; % create an instance
\stopuseMPgraphic
\placefigure[here][fig:objecttest]{My
object}{\useMPgraphic{objecttest}}
\stoptext
now produces the metapost error
! Isolated expression.
to be read again
(
newSegment-begingroup.assignObj(
(SUFFIX2),Segment);ObjPoint.a,b
\starttext
\placefigure[here][]{sample}
{\useMPgraphic{sample}}
\stoptext
Thank you.
Dalyoung
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http
+ ry)...
% (xa + hx, ya)...cycle
% withcolor transparent(normal, .04, black) ;
endfor;
setbounds currentpicture to OverlayBox ;
\stopuniqueMPgraphic
\defineoverlay[shadow][\useMPgraphic{mpshadow}]
\starttext
\rotate[rotation=12]{%
\externalfigure[koe][width=50mm
;
\stopuniqueMPgraphic
\defineoverlay[shaded][\useMPgraphic{texthole}]
\starttext
\rotate[rotation=12]{%
\framed[height=50mm, width=50mm, frame=off, background=shaded,
backgroundoffset=5mm, align=middle]%
{\offset[x=1mm,y=-2mm]{\externalfigure[koe][width=50mm]}}%
}
\stoptext
I'm glad I found
, black);
endfor;
\stopuniqueMPgraphic
\defineoverlay[shaded][\useMPgraphic{texthole}]
\starttext
\rotate[rotation=12]{%
\framed[height=50mm, width=50mm, frame=off, background=shaded,
backgroundoffset=5mm, align=middle]%
{\offset[x=1mm,y=-2mm]{\externalfigure[koe][width=50mm]}}%
}
\stoptext
I'm
smaller then anticipated.
Please find the receipts attached. \useMPgraphic{plussy}
\footnotetext[style]{If it's in anyone's interest, I can link or upload my template to this \ConTeXt\ document on the FSFE wiki.}
\stopletter
]{\useMPgraphic{accolade}}}]
\defineoverlay[rightbrace][\rightaligned{\mirror{\scale[height=\overlayheight]{\useMPgraphic{accolade]
\starttext
\framedtext[frame=off,loffset=1em,roffset=1em,background={leftbrace,rightbrace}]{\input
knuth\par}
\setupTABLE[frame=off,offset=1ex]
\setupTABLE[row
;
\stopuseMPgraphic
\defineoverlay[leftbrace] [\leftaligned
{\scale[height=\overlayheight]{\useMPgraphic{accolade}}}]
\defineoverlay[rightbrace][\rightaligned{\mirror{\scale[height=\overlayheight]{\useMPgraphic{accolade]
\starttext
\framedtext[frame=off,loffset=1em,roffset=1em,background
,
+y: int) ();
Class.B(Circle)
(radius: int)
(+getRadius(): int,
+setRadius(r: int):void);
topToBottom(45)(A, B);
drawObjects(A, B);
clink(aggregationUni)(A, B);
\stopuseMPgraphic
\placefigure[here][fig:xx]{xx}{\useMPgraphic{xx}}
This is included in starttext block
][fig:Circle]{A circle}{\useMPgraphic{Circle}}
\placeformula[eq:pythag]
\startformula
c^2
= a^2 + b^2
\stopformula
\section{Second section}
See \in{Figure}[fig:Circle] on \at{page}[fig:Circle].
See \in{equation}[eq:pythag] for Pythagoras.
\placefigure[here][fig:Circle2]{Another
circle
,
+y: int) ();
Class.B(Circle)
(radius: int)
(+getRadius(): int,
+setRadius(r: int):void);
topToBottom(45)(A, B);
drawObjects(A, B);
clink(aggregationUni)(A, B);
\stopuseMPgraphic
\placefigure[here][fig:xx]{xx}{\useMPgraphic{xx}}
This is included in starttext block
)(A, B);
\stopuseMPgraphic
\placefigure[here][fig:xx]{xx}{\useMPgraphic{xx}}
This is included in starttext block.
For verbosity I am also giving you some errors.
Isolated expression.
to be read again
(
* save A; save B; Class.A(
Point
1cm;
\stopuseMPgraphic
\useMPgraphic{test}
\stoptext
It stops with the error Use of \p!compareprocessaction doesn't match
its definition.
Like many of the more complex commands, \processaction does not
expand totally. If you are using mkiv, you could define \Shape
like this:
\def\Shape#1
},
circle={unitcircle }]
\starttext
\startuseMPgraphic{test}
fill \Shapesquare scaled 1cm;
\stopuseMPgraphic
\useMPgraphic{test}
\stoptext
%%
\setevalue{square}{unitsquare}
\setevalue{circle}{unitcircle}
\starttext
\startuseMPgraphic{test}
fill \getvalue
On 13-5-2010 11:13, luigi scarso wrote:
\setevalue{square}{unitsquare}
\setevalue{circle}{unitcircle}
\starttext
\startuseMPgraphic{test}
fill \getvalue{square} scaled 1cm;
\stopuseMPgraphic
\useMPgraphic{test}
\stoptext
or
\setevalue{mynamespace:square}{unitsquare}
\setevalue
\getparameters[Shape][square={unitsquare },
circle={unitcircle }]
\starttext
\startuseMPgraphic{test}
fill \Shapesquare scaled 1cm;
\stopuseMPgraphic
\useMPgraphic{test}
\stoptext
This one's very nice. Thanks.
Vianney
2010/5/13 Vianney le Clément vleclem...@gmail.com:
\getparameters[Shape][square={unitsquare },
circle={unitcircle }]
\starttext
\startuseMPgraphic{test}
fill \Shapesquare scaled 1cm;
\stopuseMPgraphic
\useMPgraphic{test}
\stoptext
This one's very nice. Thanks
\useMPgraphic{test}
\stoptext
It stops with the error Use of \p!compareprocessaction doesn't match
its definition.
Any ideas?
Vianney
___
If your question is of interest to others as well, please add an entry to the
Wiki
), (i*1cm,-2cm));
endfor;
\stopuseMPgraphic
\useMPgraphic {1}
\stoptext
Is it possible to get the metapost construct »withcolor« to work with
text or do I have to take a different approach?
Thanks for any help.
Marco
the following construct
for i=0 upto 5:
label(textext(\color[static]Test), (i*1cm,-2cm));
endfor;
\stopuseMPgraphic
\useMPgraphic {1}
\stoptext
Is it possible to get the metapost construct »withcolor« to work with
text or do I have to take a different approach?
Thanks for any help.
Marco
in compile error
% for i=0 upto 5:
% label(textext(\definecolor[my][r=\r,g=\r,b=\r]\color[my]{Test}),
% (i*1cm,-3cm));
% endfor;
\stopuseMPgraphic
\useMPgraphic {1}
\stoptext
Maybe this code is an improvable step in the right direction, maybe it's
rubbish. Necessary improvements need to be:
i
);
\stopuseMPgraphic
\useMPgraphic {1}
\stoptext
Marco
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
:= uniformdeviate 1 ;
b := uniformdeviate 1 ;
label(textext(\colored[r= decimal(r) ,g= decimal(g) ,b=
decimal(b) ]{Test}),origin);
label(textext(r= decimal(r) ,g= decimal(g) ,b=
decimal(b) ),origin+(0,-100));
\stopuseMPgraphic
\useMPgraphic {1}
\stoptext
( tested :-) )
Warning: default is preserve
I found that the following example
\starttext
\startuseMPgraphic{test}
draw btex some text with space etex;
\stopuseMPgraphic
\useMPgraphic{test}
\stoptext
can generate the text between btex and etex correct no matter I use
MKII or MKIV.
But, when I running the following example
beginfig(0
});
fretmark(4,\MPvar{D});
fretmark(5,\MPvar{A});
fretmark(6,\MPvar{E});
\stopuseMPgraphic
\define[6]\Ch
{\dontleavehmode
\useMPgraphic{chordgrid}{e={#1},B={#2},G={#3},D={#4},A={#5},E={#6}}%
\hskip2mm}
\starttext
\Ch{1}{3}{1}{2}{1}{4}
\stoptext
However, my current trouble is chord caption (like Am
hlingrid(0, 5, 1, 0.8cm, 1cm) ;
draw vlingrid(0, 4, 1, 1cm, 0.8cm) ;
draw mark(1,\MPvar{e});
draw mark(2,\MPvar{B});
draw mark(3,\MPvar{G});
draw mark(4,\MPvar{D});
draw mark(5,\MPvar{A});
draw mark(6,\MPvar{E});
\stopuseMPgraphic
\define[6]\Ch
{\dontleavehmode
\useMPgraphic{chordgrid}{e={#1},B={#2
pencircle scaled 0.4pt withcolor black) ;
draw hlingrid(0, 5, 1, 0.8cm, 1cm) ;
draw vlingrid(0, 4, 1, 1cm, 0.8cm) ;
\stopreusableMPgraphic
\define[0]\ChGrid{\dontleavehmode\useMPgraphic{chordgrid}\hskip2mm}
\starttext
\ChGrid
\stoptext
I need to change it so that I could specify fret
{\dontleavehmode
\useMPgraphic{chordgrid}{e={#1},B={#2},G={#3},D={#4},A={#5},E={#6}}}%
\hskip2mm}
Best wishes,
Taco
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg
, 1, 1cm, 0.8cm) ;
\stopreusableMPgraphic
\define[0]\ChGrid{\dontleavehmode\useMPgraphic{chordgrid}\hskip2mm}
\starttext
\ChGrid
\stoptext
I need to change it so that I could specify fret numbers, i.e. six
numbers for each string, and draw a filled circles in these positions.
I've started
}
...
\stopuseMPgraphic
\starttext
test
\placefigure[here][fig1]{yyy} {\useMPgraphic{obr30}}
end of test
\stoptext
Nice day,
Jindro
See http://archive.contextgarden.net/message/20100322.074003.4e366fdd.en.html
Perhaps this ought to be added to the texlive page
Aditya
} {\useMPgraphic{obr30}}
end of test
\stoptext
Nice day,
Jindro
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman
Hi,
the following example just prints »Hello World!«, without the square.
What's wrong?
\startuseMPgraphic{test}
fill fullsquare scaled 5cm;
\stopuseMPgraphic
\starttext
Hello World!
\useMPgraphic{test}
\stoptext
ConTeXt ver: 2010.03.20 22:59 MKIV
this is luatex, version beta-0.50.0
On Wed, Mar 31, 2010 at 2:33 AM, Marco net...@lavabit.com wrote:
Hi,
the following example just prints »Hello World!«, without the square.
What's wrong?
\startuseMPgraphic{test}
fill fullsquare scaled 5cm;
\stopuseMPgraphic
\starttext
Hello World!
\useMPgraphic{test}
\stoptext
isolated it in
the process. There were 3 MP graphics each one used once on each page.
After change them from
\startuseMPgraphic ... \stopuseMPgraphic
and \useMPgraphic
to
\startreusableMPgraphic ... \stopreusableMPgraphic
and \useMPgraphic
error messages disappeared.
Michał
Hi all,
if I compile the following example with the actual beta, the circle is set in
foreground … even if the background is not set.
\startuseMPgraphic{test}
fill fullcircle scaled 5cm withcolor red;
\stopuseMPgraphic
\defineoverlay[test]{\useMPgraphic{test}}
% \setupbackgrounds[page
]{\useMPgraphic{test}}
\defineoverlay[...][...]
Wolfgang
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg
withcolor red;
\stopuseMPgraphic
\defineoverlay[test]{\useMPgraphic{test}}
\defineoverlay[...][…]
:) Thanks Wolfgang!
Andreas
___
If your question is of interest to others as well, please add an entry to the
Wiki
\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.
to be read again
;
l
($1,$2););
draw begingraph(4in,2.5in);
gdraw p;
endgraph;
\stopuseMPgraphic
\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
output with MKII (texexec) but
fails the compilation process with MKIV (context).
\startuseMPgraphic{foo}
input graph;
path p;
gdata(data.d, $, augment.p($1,$2););
draw begingraph(4in,2.5in);
gdraw p;
endgraph;
\stopuseMPgraphic
\starttext
\useMPgraphic{foo
}
\stopFLOWcell
\startFLOWcell
\name {fixistes}
\location{2,1}
\text {Teories fixistes: Els continents i els oceans han ocupat les
mateixes posicions des de l'origen de la Terra.}
\stopFLOWcell
\stopFLOWchart
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext[FunnyText
}
\location{2,1}
\text {Altres suposaven que la Terra s'ha anat arrugat progressivament
en refredar-se i que els relleus són arrugues provocades per l'escorça
en contracció.}
\shape{decision}
\stopFLOWcell
\stopFLOWchart
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext
:= \somestructureheadnumber[chapter][last];
% current := 2 ;
% last:= 6 ;
skip:= TextHeight * (current-1)/last ;
StartPage ;
fill fullcircle scaled 3cm shifted (skip,skip) ;
StopPage ;
\stopuseMPgraphic
\defineoverlay[test][\useMPgraphic{test}]
\setupbackgrounds[page
On 11-1-2010 3:07, Aditya Mahajan wrote:
\startmode[error]
\defineoverlay[MP:background]
[\useMPgraphic{MP:backgound}]
\startuseMPgraphic{MP:backgound}
draw OverlayBox randomized 9pt withcolor blue;
\stopuseMPgraphic
\stopmode
\defineframed[boxframed][frame=on,background
]
[\useMPgraphic{MP:backgound}]
\startuseMPgraphic{MP:backgound}
draw OverlayBox randomized 9pt withcolor blue;
\stopuseMPgraphic
\stopmode
\defineframed[boxframed][frame=on,background=MP:background]
% A frame defined with \defineframe does not work
% inside Metapost, so I prevent
}%
%\edef\rightframeparameter {\framedparameter\c!rightframe }%
\useMPgraphic{tableborder}]
\setupTABLE
[ toprulethickness=\framedparameter{rulethickness},
bottomrulethickness=\framedparameter{rulethickness},
leftrulethickness=\framedparameter{rulethickness},
rightrulethickness
]
[%\edef\topframeparameter {\framedparameter\c!topframe }%
%\edef\bottomframeparameter{\framedparameter\c!bottomframe}%
%\edef\leftframeparameter {\framedparameter\c!leftframe }%
%\edef\rightframeparameter {\framedparameter\c!rightframe }%
\useMPgraphic{tableborder}]
\setupTABLE
\the\dimexpr\framedparameter{rightrulethickness}\relax ;
setbounds currentpicture to OverlayBox ;
\stopuseMPgraphic
\defineoverlay[frameborder][\useMPgraphic{frameborder}]
\defineframed
[mpframed]
[ toprulethickness=\framedparameter{rulethickness},
bottomrulethickness=\framedparameter{rulethickness
thickness
%TheFunction
vardef f(expr x) =
(10/x)-x*((0.5)**x)
enddef;
%Labels
%label.lft(textext(\truncate{ decimal f(5) }),(0,f(5)) scaled u);
label.lft(truncatedtext(decimal f(5)),(0,f(5)) scaled u);
\stopuseMPgraphic
\useMPgraphic{Figure}
\stoptext
Aditya
f(5) }),(0,f(5)) scaled u);
label.lft(truncatedtext(decimal f(5)),(0,f(5)) scaled u);
\stopuseMPgraphic
\useMPgraphic{Figure}
\stoptext
Aditya
___
If your question is of interest to others as well, please add
\defineoverlay[contrast][\useMPgraphic{contrast}]
\showframe
\starttext
\definecolumnset[mycolumnset][n=2]
\definecolumnsetarea
[einschub][left]
[x=1,y=1,nx=4,ny=20,page=2,
background=contrast,align={hi,right},state=start]
\startcolumnset[mycolumnset]
\dorecurse{15}{\input tufte\par
scaled 1pt withcolor 0.5white;
\stopuseMPgraphic
\useMPgraphic{CS}
\placefigure[here][CS1]{Consumer Surplus}{\useMPgraphic{CS}}
\stoptext
___
If your question is of interest to others as well, please add
draw ((6,2) -- (6,0)) scaled u dashed evenly withpen pencircle
scaled 1pt withcolor 0.5white;
draw ((6,2) -- (0,2)) scaled u dashed evenly withpen pencircle
scaled 1pt withcolor 0.5white;
\stopuseMPgraphic
\useMPgraphic{CS}
\placefigure[here][CS1
(5)) scaled u);
\stopuseMPgraphic
\useMPgraphic{Figure}
\stoptext
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl
(0,0)--(4u,0) withpen pencircle scaled 2pt withcolor blue;
\stopuseMPgraphic
\placefigure[here]{Two figures next to each other}
\startcombination[2*1]
{\useMPgraphic{firstFig}}{(a)}
{\useMPgraphic{secondFig}}{(b
{secondFig}
numeric u;
u:=1in;
draw (0,0)--(4u,0) withpen pencircle scaled 2pt withcolor blue;
\stopuseMPgraphic
\placefigure[here]{Two figures next to each other}
\startcombination[2*1]
{\useMPgraphic{firstFig
withcolor
blue;
\stopuseMPgraphic
\placefigure[here]{Two figures next to each other}
\startcombination[2*1]
{\useMPgraphic{firstFig}}{(a)}
{\useMPgraphic{secondFig}}{(b)}
\stopcombination
It can be seen that due to the dimensions
;
cyclicPath := buildcycle(Lint[1]--Lint[2],Curve,Lint[3]--Lint[4],reverse
xaxis,yaxis);
draw cyclicPath withpen pencircle scaled 5pt withcolor red;
\stopuseMPgraphic
\useMPgraphic{buildS22}
\stoptext
Curve;
Lint[4]:=stLine intersectionpoint xaxis;
path cyclicPath;
cyclicPath :=
buildcycle(Lint[1]--Lint[2],Curve,Lint[3]--Lint[4],reverse
xaxis,yaxis);
draw cyclicPath withpen pencircle scaled 5pt withcolor red;
\stopuseMPgraphic
\useMPgraphic{buildS22}
\stoptext
fonts in MetaPost are currently dead with MkIV?
%%test-outlined.tex
\starttext
\startTEXpage
\startuseMPgraphic{a}
graphictext \bf Fun scaled 4 zscaled (1,1.5)
withdrawcolor blue
withfillcolor .5white
withpen pencircle scaled 5pt
\stopuseMPgraphic
\useMPgraphic{a}
\stopTEXpage
\stoptext
Am 22.11.2009 um 21:15 schrieb luigi scarso:
%%test-outlined.tex
\starttext
\startTEXpage
\startuseMPgraphic{a}
graphictext \bf Fun scaled 4 zscaled (1,1.5)
withdrawcolor blue
withfillcolor .5white
withpen pencircle scaled 5pt
\stopuseMPgraphic
\useMPgraphic{a}
\stopTEXpage
(btex \tfb S1 etex,(4,5)*u);
\stopuseMPgraphic
\midaligned{\useMPgraphic{Filling}}
The LOG file is:
This is LuaTeX, Version beta-0.44.0-2009103007
\write18 enabled.
(TestFile.tex
ConTeXt ver
] ;
label(btex \tfb S1 etex,(4,5)*u);
\stopuseMPgraphic
\midaligned{\useMPgraphic{Filling}}
\stoptext
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context
(4*u,5*u) withcolor 0.1[white,blue] ;
label(btex \tfb S1 etex,(4,5)*u);
\stopuseMPgraphic
\midaligned{\useMPgraphic{Filling}}
\stoptext
You forgot \stoptext at the end
It works here
--
luigi
___
If your
withpen pencircle scaled w withcolor 0.5red;
draw AC withpen pencircle scaled w withcolor 0.5green;
fill fullcircle scaled u shifted (4*u,5*u) withcolor 0.1[white,blue] ;
label(btex \tfb S1 etex,(4,5)*u);
\stopuseMPgraphic
\midaligned{\useMPgraphic{Filling
\useMPgraphic{test}
\stopTEXpage
\stoptext
%
Works correctly under mkii (texexec) but not under mkiv (context).
Error message:
mplib | mp terminal: (/home/local/context/tex/texmf/metapost/base/graph.mp
! Redundant equation.
to be read again
;
l.143 Gmargin.low=-.07
\stopMPinclusions
\startuseMPgraphic{test}
draw begingraph(16cm,12cm);
setrange(whatever,whatever,whatever,whatever);
gdraw (0,0) -- (1,1) ;
endgraph;
\stopuseMPgraphic
\startTEXpage
\useMPgraphic{test}
\stopTEXpage
\stoptext
) as the
minimal ConTeXt example:
\starttext
\startuseMPgraphic{dummy}
fill fullcircle scaled 5cm withcolor red ;
\stopuseMPgraphic
\useMPgraphic{dummy}
\stoptext
Well, I get nothing on my setup as well as if I use the online compiler.
Therefore I assume that something must be wrong.
Could you comment
be there.
The following is taken directly from metafun manual (page 9) as the
minimal ConTeXt example:
\starttext
\startuseMPgraphic{dummy}
fill fullcircle scaled 5cm withcolor red ;
\stopuseMPgraphic
\useMPgraphic{dummy}
\stoptext
Well, I get nothing on my setup as well as if I use the online
, but there is no trace of the image
that should be there.
The following is taken directly from metafun manual (page 9) as the
minimal ConTeXt example:
\starttext
\startuseMPgraphic{dummy}
fill fullcircle scaled 5cm withcolor red ;
\stopuseMPgraphic
\useMPgraphic{dummy}
\stoptext
Well, I get
red ;
\stopuseMPgraphic
\useMPgraphic{dummy}
\stoptext
Well, I get nothing on my setup as well as if I use the online compiler.
Therefore I assume that something must be wrong.
Could you comment on that?
\setupcolors[state=start]
\starttext
\startuseMPgraphic{dummy}
fill fullcircle scaled
from metafun manual (page 9) as the
minimal ConTeXt example:
\starttext
\startuseMPgraphic{dummy}
fill fullcircle scaled 5cm withcolor red ;
\stopuseMPgraphic
\useMPgraphic{dummy}
\stoptext
Well, I get nothing on my setup as well as if I use the online compiler.
Therefore I assume that something
(OverlayWidth+.5pt,OverlayHeight+.5pt) ;
\stopuseMPgraphic
\startuseMPgraphic{somecolorcircle} % How do you move somecolorcircle.
I want this to be below sometext
colorcircle(2cm,white,.625red,\MPcolor{Orange}) ;
\stopuseMPgraphic
\startTEXpage
\defineoverlay[somebackground][\useMPgraphic
Daniel Bundzik wrote:
Hi!
How do you position/move a MPgraphic?
You move the graphic inside the overlay:
\defineoverlay
[somecolorcircle]
[\vbox{\kern 5cm\useMPgraphic{somecolorcircle}}]
Best wishes,
Taco
black ;
StopPage ;
\stopuseMPgraphic
\defineoverlay
[simpleslides:background:horizontal]
[\useMPgraphic{simpleslides:MP:horizontal}]
\defineoverlay
[simpleslides:background:vertical]
[\useMPgraphic{simpleslides:MP:horizontal}]
\defineoverlay
[simpleslides:background:title
.
%=
\setupinteraction
[state=start,
color=green,
style=]
\starttext
\startuseMPgraphic{circle}
draw fullcircle scaled 1cm;
\stopuseMPgraphic
\placefigure
[]
[fig:ref]
{Text}
{\useMPgraphic{circle}}
\in{figure}[fig:ref]
\at{figure}[fig:ref]
\stoptext
%=
This is a bug in mkiv
document.
%==
\starttext
\startuseMPgraphic{circle}
draw fullcircle scaled 1cm;
\stopuseMPgraphic
\placefigure
[]
[fig:ref]
{Text}
{\useMPgraphic{circle}}
\in{figure}[fig:ref]
\stoptext
%==
How can I fix that?
Further \about{figure}[fig:ref
this, but there
is no figure number visible in my document.
%==
\starttext
\startuseMPgraphic{circle}
draw fullcircle scaled 1cm;
\stopuseMPgraphic
\placefigure
[]
[fig:ref]
{Text}
{\useMPgraphic{circle}}
\in{figure}[fig:ref]
\stoptext
%==
How can I
=]
\starttext
\startuseMPgraphic{circle}
draw fullcircle scaled 1cm;
\stopuseMPgraphic
\placefigure
[]
[fig:ref]
{Text}
{\useMPgraphic{circle}}
\in{figure}[fig:ref]
\at{figure}[fig:ref]
\stoptext
%=
Best wishes
Wolfgang Murth
,
color=green,
style=]
\starttext
\startuseMPgraphic{circle}
draw fullcircle scaled 1cm;
\stopuseMPgraphic
\placefigure
[]
[fig:ref]
{Text}
{\useMPgraphic{circle}}
\in{figure}[fig:ref]
\at{figure}[fig:ref]
\stoptext
%=
This is a bug in mkiv. It works correctly in mkii
;
\dodostartuseMPgraphic ...useMPgraphic {#1}{#2}{#3
}}\elabelgroup
\dostartMPcode ...graphic {@@}#1\stopuseMPgraphic
\useMPgraphic
{@@}\endgroup
l.9 \stopMPcode
Aditya
, 1cm, 0.8cm) ;
\stopuseMPgraphic
\useMPgraphic{cg} \useMPgraphic{cg} \useMPgraphic{cg} \useMPgraphic{cg}
\useMPgraphic{cg}
\stoptext
Regards,
Vyatcheslav
___
If your question is of interest to others as well, please
, 1cm) ;
draw vlingrid(0, 4, 1, 1cm, 0.8cm) ;
\stopuseMPgraphic
\useMPgraphic{cg} \useMPgraphic{cg} \useMPgraphic{cg} \useMPgraphic{cg}
\useMPgraphic{cg}
put \dontleavehmode in front
-
Hans
501 - 600 of 913 matches
Mail list logo