Re: [NTG-context] luaTeX and on-the-fly MetaPost compilation

2008-05-24 Thread Stephan Hennig
Hans Hagen schrieb:

 glue to tex:
 
 \def\includeMetaPost#1#2% io.loaddata is part of l-io.lua
{\directlua0{tex.print(filterfromMPblob(io.loaddata(#1,#2)))}}
 
 of course this need to be embeded in some general mp support
 
 (i'll add it to my todolist; actually a bit more is involved since one 
 probably wants to include the data between the figures too since it may 
 be called upon)

Thank you for the outline.  For the exact mechanism of how to process an
.mp file I think there are three possible cases:

1. Strictly process what's between figure(n)..endfig only.

For this example

pair pnt;
pnt:=origin;
beginfig(1);
  pnt:=(100,100);
  drawdot pnt;
endfig;
beginfig(2);
  drawdot pnt;
endfig;
end

compilation of figure 2 should fail, since variable pnt is undeclared.

2. Process everything up-to the specified figure, omitting stuff inside
non-matching figure numbers.  In the example above, the output of figure
2 should be a dot at point (0,0).  This case is convenient if multiple
figures share common variables or macros that are defined outside the
scope of beginfig..endfig.  This should be the default case for .mp file
interpretation.

3. Process everything up-to the specified figure, including all
non-matching figures, but discard their output.  That is, in the
example, the output of figure 2 should be a dot at point (100,100),
since pnt was modified in figure 1.

Note, this is not a pressing feature for me.  The advantage is that
MetaPost and TeX code can be held in separate files (which has several
advantages) and users can easily compile the code in a single TeX run,
without knowing about Makefiles.  Well, there is the \write18 feature.
But that is as difficult to use as a Makefile or even more difficult for
the inexperienced user.

Best regards,
Stephan Hennig

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] luaTeX and on-the-fly MetaPost compilation

2008-05-23 Thread Stephan Hennig
Hi,

I didn't have the opportunity to touch luaTeX yet, but let me ask one
question in advance:  Since luaTeX has a built-in MetaPost interpreter,
is it possible to refer to a certain figure in a MetaPost source file
for inclusion, instead of a compiled figure?

As an example, I would like to say in a TeX document (syntax may differ)

  \includeMetaPost{foo.2}

and this should not refer to the pre-compiled file

  foo.2

but to section

  figure(2);
...
  endfig;

in file

  foo.mp

and compile it on-the-fly.  Would that be possible?

Rationale:  I do not want to mix TeX and MetaPost code.  Probably, I'll
stick with compiling .mp files prior to the TeX run anyway, but I'm
curious about this option.

Best regards,
Stephan Hennig

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] MetaPost v1.003: graph package broken

2008-04-24 Thread Stephan Hennig
A note from the MetaPost developers:

We have noticed an incompatibility between the latest MetaPost v1.003
and the graph package.

Severity is considered high, since it prevents compilation of even the
most simple figures.  The problem is identified and a fix is under way.
 A workaround is not possible.

Users of the graph package should not update to MetaPost v1.003.
MetaPost versions 1.002 and prior are not affected.

Best regards,
Stephan Hennig
On behalf of the MetaPost development team

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] ConTeXt Document with SVN Info Included

2008-04-14 Thread Stephan Hennig
Michael Hallgren schrieb:

 Do we have, in userland, an already developed metod of including
 SVN info in a ConTeXt output file? A la svn-multi in the LaTeX
 world...

I have not tested it with ConTeXt, but what about the vc bundle
available at CTAN:support/vc?  Feedback is welcome!

Best regards,
Stephan Hennig

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] problem using mptopdf

2008-02-21 Thread Stephan Hennig
Hans Hagen schrieb:
 [EMAIL PROTECTED] wrote:
 
 - mptopdf test.mp
 
 It does not generate any .pdf file neither gives any output in the 
 shell. I am using mptopdf installed with MikTex2.7.
 
 Can you give me a help here?
 
 is perl installed (mptopdf.pl is a perl script)
 is there an mptopdf.fmt file on your system (the tex related format)

Mptopdf has been missing in a recent context package update.  That bug
is fixed now.  Additionally, there have been several updates for packages

miktex-pdftex-binand
miktex-runtime-bin

in the last four days.  Try updating MiKTeX.  For me, mptopdf works well.

Best regards,
Stephan Hennig

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] OT: typo-fun

2007-09-01 Thread Stephan Hennig
Martin Schröder schrieb:
 2007/8/30, Stephan Hennig [EMAIL PROTECTED]:
 Shouldn't page 404 be a left-hand page?
 
 Maybe the book is written in a right-to-left language? :-)

Ha, on a close look it's ordinary lorem ipsum.

Best regards,
Stephan Hennig

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] [metapost] shading text

2007-05-08 Thread Stephan Hennig
[CC'ed back to the metapost list, since this is not only related to
ConTeXt.]

Peter Rolf schrieb:
 Stephan Hennig wrote:
 
 [makempy/pstoedit/Ghostscript hang]

 That is, it seems as if pstoedit calls Ghostscript and that hangs.
 I've updated to v8.56, recently, and didn't observe any problems
 with pstoedit and MetaPost with older versions of Ghostscript (in
 other applications).  What version of Ghostscript are you running?

 also ghostscript 8.56

Could someone with an older version of Ghostscript please check if
pstoedit/Ghostscript hang with the attached example?  That would make it
easier for me deciding where to send the bug report to.

Best regards,
Stephan Hennig

input metafun
beginfig(1);
  graphictext Outlined  text! scaled 8
  withfillcolor .7blue;
endfig;
end

Name the file outline.mp and process with

mpost outline
perl makempy.pl outline

or what's a proper method to run a Perl script on your OS.  (With MiKTeX
you can just say makempy outline.)

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] [metapost] shading text

2007-05-07 Thread Stephan Hennig
Peter Rolf schrieb:

 http://www.pragma-ade.com/general/manuals/mmakempy.pdf

 (this should answer some of your questions). You find the needed
 tools at

Thank you for the pointer!


 I have tested this some years ago and it worked without problems. A fast
 run with the old code ended in the nirvana for pstoedit (3.44) :(
 
 I don't know if this is a general problem, so just give it a try.

Unfortunately, pstoedit seems to fail here, too.

The following file

input metafun
beginfig(1);
  graphictext Shaded text! scaled 8
  withdrawcolor .7blue
  withfillcolor .7white
  dashed evenly
  withpen pencircle scaled 2pt;
endfig;
end

compiles fine with mpost, but hangs with a pstoedit process in the task
manager taking up 100% CPU time.


 If you get it to work, you can try the nice 'graphictext' in
 combination with 'withshade'.

This seems to be the way to go, currently.  I'll try to file a bug
report for pstoedit when I find the time.

Best regards,
Stephan Hennig

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] [metapost] shading text

2007-05-07 Thread Stephan Hennig
Peter Rolf schrieb:

 I have tested this some years ago and it worked without problems. A fast
 run with the old code ended in the nirvana for pstoedit (3.44) :(

When I manually run the following commands

pdftops mpy-outline1.pdf
pstoedit -v -ssp -dt -f mpost mpy-outline1.ps mpy-outline1.mp

the last lines of output are

 GPL Ghostscript 8.56 (2007-03-14)
 Copyright (C) 2007 artofcode LLC, Benicia, CA.  All rights reserved.
 This software comes with NO WARRANTY: see the file PUBLIC for details.

That is, it seems as if pstoedit calls Ghostscript and that hangs.  I've
updated to v8.56, recently, and didn't observe any problems with
pstoedit and MetaPost with older versions of Ghostscript (in other
applications).  What version of Ghostscript are you running?

Best regards,
Stephan Hennig

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___