> StopPage in your MPcode, then you can knock yourself out by using variables
> such as PaperHeight or TextHeight and do all sorts of calculations.
>
> All best
>
> Thomas
>
> On 10/5/23 05:54, peter.hopcroft--- via ntg-context wrote:
>> Hello list, I want to dr
Have a look at chapter 6.4 of the metafun manual. You need StartPage ...
StopPage in your MPcode, then you can knock yourself out by using
variables such as PaperHeight or TextHeight and do all sorts of
calculations.
All best
Thomas
On 10/5/23 05:54, peter.hopcroft--- via ntg-context wrote
Am 06.07.23 um 12:02 schrieb Alan Braslau:
On 06/07/23 06/07/23, 11:23, Henning Hraban Ramm wrote:
Hi, if I use \startMPcode to declare variables etc. that I need in
several MP graphics, it always inserts an empty page. How can I avoid
that?
(Actually, I load an external mp file, and for
On 06/07/23 06/07/23, 11:23, Henning Hraban Ramm wrote:
Hi, if I use \startMPcode to declare variables etc. that I need in
several MP graphics, it always inserts an empty page. How can I avoid that?
(Actually, I load an external mp file, and for random value reasons I
must load it only once.
Hi, if I use \startMPcode to declare variables etc. that I need in
several MP graphics, it always inserts an empty page. How can I avoid that?
(Actually, I load an external mp file, and for random value reasons I
must load it only once. But the MWE already shows the problem.)
"""
\startMPcode
t it to pass mine. Is
>> there some intermediate step? Your example has a key=value pair in
>> \connectboxanchors and which is accessed in the MetaPost code. The pair, and
>> MetaPost code are:
>> rulethickness=1pt
>> mpvard “rulethickness"
>> However,
it to pass mine. Is there
some intermediate step? Your example has a key=value pair in \connectboxanchors
and which is accessed in the MetaPost code. The pair, and MetaPost code are:
rulethickness=1pt
mpvard “rulethickness"
However, if I change the pair and MPcode to (see attached ex
Is there
some intermediate step? Your example has a key=value pair in \connectboxanchors
and which is accessed in the MetaPost code. The pair, and MetaPost code are:
rulethickness=1pt
mpvard “rulethickness"
However, if I change the pair and MPcode to (see attached example for full code
\starttext
It seems that the problem comes up when the same color as the surrounding
text is used in MPcode.\par
{
\red
text red\par
\startMPcode
drawoptions(withcolor blue);
label("text blue in MPcode", origin);
\stopMPcode
\par
text still red\par
But\par
te
On 7/28/2020 11:35 AM, Fabrice Couvreur wrote:
\definemathmatrix [pmatrix][matrix:parentheses][simplecommand=MATRIX]
\starttext
\math{\MATRIX{\MPcode{draw (0,0) -- (1cm,0);} ;\MPcode{draw (0,0) --
(1cm,0);} }}
\stoptext
found it ... (typo in var name after i made the mem footprint
Hi Hans,
With the upgraded version of lmtx, the parentheses of the matrix are no
longer adjusted to the content.
Thank you.
Fabrice
\definemathmatrix [pmatrix][matrix:parentheses][simplecommand=MATRIX]
\starttext
\math{\MATRIX{\MPcode{draw (0,0) -- (1cm,0);} ;\MPcode{draw (0,0) --
(1cm,0
Dear Jeroen,
If you change “pair a;” to “numeric a;” in the second MPcode, it draws a circle
without error.
Best regards,
Dalyoung
>
> \placefloatright{}{
> \startMPcode
> pair a;
numeric a;
> a := 2cm;
> draw fullcircle scaled (2*a);
> \stopM
circle scaled (2*a); ;
I'm sorry, but I don't know how to make such things equal.
(See the two expressions just above the error message.)
You can fix that by saying
numeric a;
a := 2cm;
One needs to keep in mind that all the code in multiple MPcode
environments are run in the same scope. I occas
It works for me when I add a space after each \MPcode{…} block.
\math{\MATRIX{\MPcode{...} ;\MPcode{...} }}
Wolfgang
Fabrice Couvreur schrieb am 14.10.18 um 12:18:
Hi Wolfgang,
Thank you for your solution.The space came from copy-paste because if
I do this, it does not work
a
graphic as an svg file.
/outputformat := "svg"; /
/outputtemplate := "test.svg";/
//
I have tried adding this to some MPcode in a ConteXt document but these
lines seem to be ignored since no svg file is produced apart from the
usual ConTeXt files. Is this expected behavio
side (yes); A circle with "3" inside again (no,
instead it produces circle with "2" inside); A rhombus with "2"
inside
(no, instead it produces a rhombus with "1")
and so on.
(tested on http://live.contextga
>>
>>
>> First, it shows why *MPinitializations can't replace *MPinclusions for
>> me (it affects all instances),
>>
>> and second, it silently produces produces some really unexpected results:
>>
>> It looks like it should produce (by line)
>>
>
h "1" inside (yes); A circle with "3" inside again (no,
instead it produces circle with "2" inside); A rhombus with "2" inside
(no, instead it produces a rhombus with "1")
and so on.
(tested on http://live.contextgarden.net/)
In fact, I failed to de
h "3" inside again (no, instead
it produces circle with "2" inside); A rhombus with "2" inside (no, instead
it produces a rhombus with "1")
and so on.
(tested on http://live.contextgarden.net/)
In fact, I failed to declare picture variable inside with text insi
On 1/11/2017 11:08 PM, Sergey Slyusarev wrote:
Hi, i found the following bug (likely) some time ago:
When \textext (or any other text generating thing like btex etex etc.)
is present inside \*MPinclusions and \*MPinclusions are followed by
\*MPcode ConTeXt returns error:
Equation cannot
Hi, i found the following bug (likely) some time ago:
When \textext (or any other text generating thing like btex etex etc.) is
present inside \*MPinclusions and \*MPinclusions are followed by \*MPcode
ConTeXt returns error:
Equation cannot be performed (color=vacuous).
Minimal example would
[here]
[fig: 5 loop departed setup]
{The start position for a 5-loop braid with departed loops}
{\framed{\getbuffer[setup 5-loop basic]}}
Come to think of it, is there another way of framing the incoming
graphic? I don't want to include the frames in the MPcode as I may
]
{The start position for a 5-loop braid with departed loops}
{\framed{\getbuffer[setup 5-loop basic]}}
Come to think of it, is there another way of framing the incoming
graphic? I don't want to include the frames in the MPcode as I may not
always want them, but that \framed
Can someone give me a short explanation of the difference between the various
metapost enclosures in MetaFun? such as \startMPpage-\stopMPpage,
\startMPcode-\stopMPcode?
I am on the lookout for a setup in which textext can be used and where the
figure comes out clipped, i.e. not contained in a
the MPdefinitions section and put the complete vardef
before your normal mp code in the MPcode section. That should work, I think.
May I ask one more question?
In the macro you wrote
Triangle((0cm,0cm), (5cm,0cm), 8cm, 6cm)
one has to specify the double of the length of each side
vardef before
your normal mp code in the MPcode section. That should work, I think.
May I ask one more question?
In the macro you wrote
Triangle((0cm,0cm), (5cm,0cm), 8cm, 6cm)
one has to specify the double of the length of each side (because a unit
circle in MetaPost
Is there a solution with mkii?
Then just drop the MPdefinitions section and put the complete vardef before
your normal mp code in the MPcode section. That should work, I think.
Or you can use
\startMPinclusions[+]
\stopMPinclusions
[+] appends to the existing content of MPinclusion, so you
Hi,
I've added \MPdrawing and \MPcode so that less calls are needed
for i=1,100,5 do
context.MPdrawing(draw fullsquare scaled ..i .. mm withcolor
white;)
end
Hans
-
Hans Hagen
On 2010-08-06 13:44:14, Hans Hagen wrote:
Hi,
I've added \MPdrawing and \MPcode so that less calls are needed
Great! Many thanks for this.
Philipp
pgp7YJZdtu02k.pgp
Description: PGP signature
___
If your
);
\stopMPcode
that only transfers image, but no text.
But when thinking about it, there might be a good reason that text is
not transferred from MPinclusions to MPcode. If I would change font
between MPinclusions and MPcode ...
Anyway ... no time to lose extra time on that issue now.
This is LuaTeX
); but for that i
first need to implement multiple instances associated with MPcode cum
suis; not that hard but it can wait for a while
Hans
-
Hans Hagen | PRAGMA ADE
Mojca Miklavec wrote:
I thought that \startluacode should be behaving the same way as
verbatim environments where commands inside verbatim have no
influence, but apparently I was wrong.
no, more like MPcode where one can mix things
if the luacode would not expand macros, then we'd need
[pdftex]
\starttext
\section{Including the MPcode in the placefigure mechanism}
\placefigure
[here]
[]
{the label}
{\startMPcode
label.top(btex Some label 1 etex, (1cm,1cm)) ;
\stopMPcode}
\section{startMPgraphic -- placeMPgraphic}
\startMPgraphic
label.top(btex
in no label output:
\starttext
\startMPcode
label.top(btex Some label etex, (1cm,1cm)) ;
\stopMPcode
\stoptext
I'm using ConTeXt 2003.12.12.
By the way, why don't \startMPgraphic and \stopMPgraphic do anything?
\setupoutput[pdftex]
\starttext
\section{Including the MPcode in the placefigure
34 matches
Mail list logo