ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Metafun standalone and fonts
@ 2014-09-27  8:21 Pol Stra
  2014-09-27 10:23 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Pol Stra @ 2014-09-27  8:21 UTC (permalink / raw)
  To: conteXt mail

Hello!

I have an mp file that I use with success in my document with mprun.

But if I try to generate the figure alone with this command:

mpost --mem=metafun myfigure.mp

I obtain this error:

> ! Font cmr10 not usable: TFM file not found.
> thelabel->...ture(EXPR3):infont.defaultfont.scaled
> 
>                                                   .defaultscale.fi;(p.shifte
>                                                   ...
> 
> l.22 label.ulft("$\vec{k}$", point infinity of p4)
                                                  ;

This is with my ConTeXt installation with only mkiv.
The ConTeXt installation with both mkiv and mkii, the error is:


> Warning: cannot open font map file psfonts.map
> ]
> Missing character: There is no 226 in font cmr10!

I tried to set:
>defaultfont:="latinmodernmath";

Which is in the list of:
>mtxrun --script fonts --list --all --pattern=

but it doesn't found the TFM file either.

I know I can use the:

\startMPpage
	\input myfigure.mp
\stopMPpage

But the point is I want to generate an svg file, not a pdf.

(mpost -s 'outputformat="svg";prologues:=3' --mem=metafun myfigure.mp)


Note that with mpost command, it use metafun.mpii, while with mprun, it use 
metafun.mpiv.

Thanks
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Metafun standalone and fonts
  2014-09-27  8:21 Metafun standalone and fonts Pol Stra
@ 2014-09-27 10:23 ` Hans Hagen
  2014-09-27 12:28   ` Pol Stra
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2014-09-27 10:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 9/27/2014 10:21 AM, Pol Stra wrote:
> Hello!
>
> I have an mp file that I use with success in my document with mprun.
>
> But if I try to generate the figure alone with this command:
>
> mpost --mem=metafun myfigure.mp

that will never work with metafun in mkiv as we have extensions

just run

context myfigure.mp

or do:

\starttext

\startMPpage
    mp code
\stopMPpage

\stoptext

and run that.

Hans



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Metafun standalone and fonts
  2014-09-27 10:23 ` Hans Hagen
@ 2014-09-27 12:28   ` Pol Stra
  2014-09-27 12:50     ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Pol Stra @ 2014-09-27 12:28 UTC (permalink / raw)
  To: ntg-context

Le samedi 27 septembre 2014, 12:23:47 Hans Hagen a écrit :
> On 9/27/2014 10:21 AM, Pol Stra wrote:
> > Hello!
> > 
> > I have an mp file that I use with success in my document with mprun.
> > 
> > But if I try to generate the figure alone with this command:
> > 
> > mpost --mem=metafun myfigure.mp
> 
> that will never work with metafun in mkiv as we have extensions
> 
> just run
> 
> context myfigure.mp
> 
> or do:
> 
> \starttext
> 
> \startMPpage
>     mp code
> \stopMPpage
> 
> \stoptext
> 
> and run that.
> 
> Hans
> 
> 
> 
> -----------------------------------------------------------------
>                                            Hans Hagen | PRAGMA ADE
>                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>      tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
> 
>                                               | www.pragma-pod.nl
> 
> -----------------------------------------------------------------

Ah, nice about directly use the context command!

Unfortunately, this only solve half of my problem: this outputs one pdf with 
all figures, while I try to output all figures in separated svg files.

My workaround is to put only one figure per file and convert the pdf with 
pdf2svg. I hoped there where a more direct way to do it.

Regards
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Metafun standalone and fonts
  2014-09-27 12:28   ` Pol Stra
@ 2014-09-27 12:50     ` Hans Hagen
  2014-09-29 18:22       ` Alan BRASLAU
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2014-09-27 12:50 UTC (permalink / raw)
  To: ntg-context

On 9/27/2014 2:28 PM, Pol Stra wrote:

> Unfortunately, this only solve half of my problem: this outputs one pdf with
> all figures, while I try to output all figures in separated svg files.

that would not give you the benefits of the context run (fonts and so) ...

just use mudraw to convert the bunch to individual svg images

> My workaround is to put only one figure per file and convert the pdf with
> pdf2svg. I hoped there where a more direct way to do it.
>
> Regards
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Metafun standalone and fonts
  2014-09-27 12:50     ` Hans Hagen
@ 2014-09-29 18:22       ` Alan BRASLAU
  0 siblings, 0 replies; 5+ messages in thread
From: Alan BRASLAU @ 2014-09-29 18:22 UTC (permalink / raw)
  To: ntg-context

On Sat, 27 Sep 2014 14:50:10 +0200
Hans Hagen <pragma@wxs.nl> wrote:

> just use mudraw to convert the bunch to individual svg images

or pdftocairo to use the poppler library;
You can also convert the pdf file to svg using inkscape.

Alan
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-09-29 18:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-27  8:21 Metafun standalone and fonts Pol Stra
2014-09-27 10:23 ` Hans Hagen
2014-09-27 12:28   ` Pol Stra
2014-09-27 12:50     ` Hans Hagen
2014-09-29 18:22       ` Alan BRASLAU

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).