ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Alan BRASLAU <alan.braslau@cea.fr>
To: Florian Unglaub <f.unglaub@googlemail.com>
Cc: ntg-context@ntg.nl
Subject: Re: Including xfig graphics
Date: Sat, 8 Jan 2011 18:34:50 +0100	[thread overview]
Message-ID: <201101081834.51067.alan.braslau@cea.fr> (raw)
In-Reply-To: <20110107153945.GA4681@mars.foo>

Florian,

This is not exactly how to proceed.
The metapost export needs to be stripped of its preamble
before being used with ConTeXt.

Can you send us a (simple) concrete example, i.e. .fig file.

It may not be worth the effort to get fig2dev fixed to produce pure (LaTeX 
free) metapost. I had started learning Metapost playing with xfig exports, but 
quickly entirely dropped xfig and now work directly with metapost code.

Alan


On Friday 07 January 2011 16:39:45 Florian Unglaub wrote:
> On Fri, Jan 07, 2011 at 10:09:47AM +0100, Taco Hoekwater wrote:
> > I did a quick test, and the transfig mp code starts with this nice (!)
> > block of verbatimtex:
> > 
> > % +MP-ADDITIONAL-HEADER
> > verbatimtex
> > %&latex
> > \documentclass{article}
> > \begin{document}
> > etex
> > % -MP-ADDITIONAL-HEADER
> 
> [...]
> 
> > It looks configurable-ish, but I do not feel like experimenting
> > without a proper test case.
> 
> I tried exporting to metapost inside xfig aswell yesterday, leading to
> similar results as posted above.
> 
> I found out that XFig uses a small shell script called 'fig2dev' to do
> all the exporting to other formats. This script supports an option '-o'
> to use plain TeX.
> 
> I tried \input'ing the resulting .mp file into my ConTeXt-file:
> 
> \startuseMPgraphic{foo}
>   \input ../figures/bar.fig
> \stopuseMPgraphic
> 
> \placefigure[here][fig:foo]{A small test}{
>   \useMPgraphic{foo}
> }
> 
> This, however, doesn't work and shows the figure as 'undefined' in the
> PDF.
> 
> My current solution now is to convert the XFig file to MetaPost with
> fig2dev and use mptopdf.
> 
> Regards, Florian.
> 
> PS: Sorry for the duplicate message, Taco. I forgot to CC to the list.

-- 
Alan Braslau
CEA DSM-IRAMIS-SPEC
CNRS URA 2464
Orme des Merisiers
91191 Gif-sur-Yvette cedex FRANCE
tel: +33 1 69 08 73 15
fax: +33 1 69 08 87 86
mailto:alan.braslau@cea.fr

 .''`.
: :'  :
`. `'`
  `-
___________________________________________________________________________________
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-01-08 17:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-06 12:21 Florian Unglaub
2011-01-07  7:11 ` Taco Hoekwater
2011-01-07  9:07   ` Alan BRASLAU
2011-01-07  9:09     ` Taco Hoekwater
2011-01-07 15:39       ` Florian Unglaub
2011-01-08 17:34         ` Alan BRASLAU [this message]

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=201101081834.51067.alan.braslau@cea.fr \
    --to=alan.braslau@cea.fr \
    --cc=f.unglaub@googlemail.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).