ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Vedran Miletić" <rivanvx@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: MPdefinitions
Date: Mon, 23 May 2011 17:37:16 +0200	[thread overview]
Message-ID: <BANLkTik6d9EodvUN6x8qxHOje-wbSfRRoA@mail.gmail.com> (raw)
In-Reply-To: <E7E49851-D39D-4017-A4A6-241B972C8702@googlemail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1448 bytes --]

2011/5/23 Wolfgang Schuster <schuster.wolfgang@googlemail.com>

> Please send a complete example!
>

Sure:

\startMPdefinitions{solvers}
\stopMPdefinitions

\starttext
Hello.
\stoptext
or this:

\startMPdefinitions{solvers}
def draw_problem (expr p, q, r, s, show_lables)=
begingroup ; save x, y, a, b, c, d, e, f, g, h ;
z11=z42=p ; z21=z12=q ; z31=z22=r ; z41=z32=s ;
a=x12-x11 ; b=y12-y11 ; c=x22-x21 ; d=y22-y21 ;
e=x32-x31 ; f=y32-y31 ; g=x42-x41 ; h=y42-y41 ;
z11=(x11, y11) ; z12=(x12, y12) ;
z13=(x12-b, y12+a) ; z14=(x11-b, y11+a) ;
z21=(x21, y21) ; z22= (x22, y22);
z23=(x22-s,y22+c) ; z24=(x21-d, y21+c) ;
z31=(x31, y31) ; z32=(x32, y32) ;
z33=(x32-f, y32+e) ; z34=(x31-f, y31+e);
z41=(x41, y41) ; z42=(x42, y42) ;
z43=(x42-h,y42+g) ; z44=(x41-h,y41+g) ;
pickup pencircle scaled .5pt ;
draw z11--z12--z13--z14--cycle ; draw z11--z13 ; draw z12--z14 ;
draw z21--z22--z23--z24--cycle ; draw z21—z23 ; draw z22—z24 ;
draw z31--z32--z33--z34--cycle ; draw z31—z33 ; draw z32—z34 ;
draw z41--z42--z43--z44--cycle ; draw z41—z43 ; draw z42—z44 ;
z1=0.5[z11,z13] ; z2=0.5[z21,z23] ;
z3=0.5[z31,z33] ; z4=0.5[z41,z43] ;
draw z1--z3 dashed evenly ; draw z2--z4 dashed evenly ;
z0=whatever[z1,z3]=whatever[z2,z4] ;
mark_rt_angle (z1,z0,z2);
if show_labels>0:
draw_problem_labels ;
fi;
endgroup ;
enddef ;
\stopMPdefinitions

\starttext
Hello.
\stoptext

Result is the same.

Vedran

[-- Attachment #1.2: Type: text/html, Size: 2045 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2011-05-23 15:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-23 10:02 MPdefinitions Vedran Miletić
2011-05-23 10:45 ` MPdefinitions Wolfgang Schuster
2011-05-23 15:37   ` Vedran Miletić [this message]
2011-05-23 16:23     ` MPdefinitions Wolfgang Schuster
2011-05-23 16:57       ` MPdefinitions Vedran Miletić

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTik6d9EodvUN6x8qxHOje-wbSfRRoA@mail.gmail.com \
    --to=rivanvx@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).