From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/65028 Path: news.gmane.org!not-for-mail From: Alan BRASLAU Newsgroups: gmane.comp.tex.context Subject: Re: Including xfig graphics Date: Sat, 8 Jan 2011 18:34:50 +0100 Organization: CEA DSM-IRAMIS-SPEC Message-ID: <201101081834.51067.alan.braslau@cea.fr> References: <20110106122113.GA32531@hal.foo> <4D26D85B.4080903@elvenkind.com> <20110107153945.GA4681@mars.foo> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1294508125 9718 80.91.229.12 (8 Jan 2011 17:35:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 8 Jan 2011 17:35:25 +0000 (UTC) Cc: ntg-context@ntg.nl To: Florian Unglaub Original-X-From: ntg-context-bounces@ntg.nl Sat Jan 08 18:35:20 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PbchD-0003Wn-C6 for gctc-ntg-context-518@m.gmane.org; Sat, 08 Jan 2011 18:35:19 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C8E5BCA9D1; Sat, 8 Jan 2011 18:35:18 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id oafn5MhS-jk9; Sat, 8 Jan 2011 18:35:16 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EBA20CA9B9; Sat, 8 Jan 2011 18:35:15 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 25AC1CA9B9 for ; Sat, 8 Jan 2011 18:35:15 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id D2UrcGHjDRcU for ; Sat, 8 Jan 2011 18:35:00 +0100 (CET) Original-Received: from filter7-ams.mf.surf.net (filter7-ams.mf.surf.net [192.87.102.75]) by balder.ntg.nl (Postfix) with ESMTP id 4F854CA9B8 for ; Sat, 8 Jan 2011 18:35:00 +0100 (CET) Original-Received: from smtp2-g21.free.fr (smtp2-g21.free.fr [212.27.42.2]) by filter7-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p08HYu6g026450 for ; Sat, 8 Jan 2011 18:34:58 +0100 Original-Received: from iram-hb-003386.localnet (unknown [81.57.248.225]) by smtp2-g21.free.fr (Postfix) with ESMTP id B65AB4B00C6; Sat, 8 Jan 2011 18:34:52 +0100 (CET) User-Agent: KMail/1.13.5 (Linux/2.6.32; KDE/4.4.5; x86_64; ; ) In-Reply-To: <20110107153945.GA4681@mars.foo> X-Bayes-Prob: 0.5 (Score 0, tokens from: ) X-CanIt-Geo: ip=212.27.42.2; country=FR; latitude=46.0000; longitude=2.0000; http://maps.google.com/maps?q=46.0000,2.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0DDR5yVea - efc120ad97d6 - 20110108 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.75 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:65028 Archived-At: 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 ___________________________________________________________________________________