[dev-context] incorrect internal mptopdf conversion

Sanjoy Mahajan sanjoy at mrao.cam.ac.uk
Sun Jan 21 22:28:33 CET 2007

Here's a problem that I just noticed in the internal mptopdf conversion
macros.  The fig.1 figure looks fine as a mps (eps) file, and 'mptopdf
fig.1' converts it fine.  However, including it in a document as fig.1
(hence via the internal mps to pdf conversion) adds strange thick lines
to it.  Here is the .mp file, and I've attached a complete .zip archive
with a .tex file and Makefile to generate the comparison.

=========================== fig.mp =================================
% equilateral triangles cut in half

% cutter is the path that cuts the triangle in half
def half_triangle(text cutter) =
  path tri, enclosed;
  z0 = (2cm,0);
  z1 = z0 rotated 60;
  tri := origin--z0--z1--origin;
  enclosed := (cutter)--z1--point 0 of (cutter)--cycle;
  fill enclosed withcolor 0.65white;
  draw tri;
  dotlabel (btex etex, point 0 of (cutter));
  dotlabel (btex etex, point 4000 of (cutter));
  draw cutter;

% replicate the triangle and path to make hexagon
def replicate_six_times =
  % move triangle so that is at the origin, then shrink it 
  currentpicture := currentpicture shifted (-z1) scaled 0.7;
  for i = 1 upto 6:
    draw currentpicture rotated (60*i);

% replicate the triangle bisected by line straight across
  half_triangle(point (2+sqrt(0.5)) of tri--point (2-sqrt(0.5)) of tri);


Program versions:

pdfTeX, Version 3.141592-1.40.0 (Web2C 7.5.6)
ConTeXt  ver: 2007.01.12 15:56 MKII  fmt: 2007.1.13  int: english/english
MPtoPDF 1.3.2
MetaPost 0.993


`A nation of slaves is always prepared to applaud the clemency of their
 master who, in the abuse of absolute power, does not proceed to the
 last extremes of injustice and oppression.'  (Gibbon)  

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/x-zip
Size: 61381 bytes
Desc: example files
Url : http://www.ntg.nl/mailman/private/dev-context/attachments/20070121/04e98f74/attachment-0001.bin 

More information about the dev-context mailing list