From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/48061 Path: news.gmane.org!not-for-mail From: Jan-Erik =?ISO-8859-1?Q?H=E4ggl=F6f?= Newsgroups: gmane.comp.tex.context Subject: Howto make a handy script to handle dia exported *.mp files Date: Fri, 06 Mar 2009 16:00:23 +0100 Message-ID: <1236351623.32681.17.camel@lundby> Reply-To: janerik.hagglof@bredband.net, 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: ger.gmane.org 1236353476 26867 80.91.229.12 (6 Mar 2009 15:31:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Mar 2009 15:31:16 +0000 (UTC) To: ConTeXt-maillist Original-X-From: ntg-context-bounces@ntg.nl Fri Mar 06 16:32:31 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1Lfc1k-0006Wg-4t for gctc-ntg-context-518@m.gmane.org; Fri, 06 Mar 2009 16:31:56 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 63D121FC14; Fri, 6 Mar 2009 16:30:31 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 24083-01-3; Fri, 6 Mar 2009 16:28:58 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D95131FB4E; Fri, 6 Mar 2009 16:28:34 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 37BB91FB38 for ; Fri, 6 Mar 2009 16:27:36 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 24021-01-3 for ; Fri, 6 Mar 2009 16:26:35 +0100 (CET) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by ronja.ntg.nl (Postfix) with ESMTP id 7891E1FBB8 for ; Fri, 6 Mar 2009 16:26:11 +0100 (CET) Original-Received: from proxy2.bredband.net (proxy2.bredband.net [195.54.101.72]) by filter2-ams.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n26FQ7Rc029906 for ; Fri, 6 Mar 2009 16:26:10 +0100 Original-Received: from ironport.bredband.com (195.54.101.120) by proxy2.bredband.net (7.3.139) id 49A5128F003ED5D2 for ntg-context@ntg.nl; Fri, 6 Mar 2009 16:00:27 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkgBAD/JsEnCZ8uO/2dsb2JhbAAI10WECAY X-IronPort-AV: E=Sophos;i="4.38,315,1233529200"; d="scan'208";a="493738094" Original-Received: from stadsbiblioteket.pub.orebro.se (HELO [10.202.28.67]) ([194.103.203.142]) by ironport1.bredband.com with ESMTP; 06 Mar 2009 16:00:27 +0100 X-Mailer: Evolution 2.24.3 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=195.54.101.72; country=SE; region=26; city=Bromma; latitude=59.3500; longitude=17.9167; http://maps.google.com/maps?q=59.3500,17.9167&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 189748858 - 8c1731c37872 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:48061 Archived-At: HI ALL! According to an earlier post that was very much helpful, I now wish to know how to write a shell script or similar to automate this exporting process. http://archive.contextgarden.net/message/20081124.122842.38fee2f4.en.html I discover it is a lot of typing work to get these work as expected in ConTeXt and specially mkIV. Here is what i wish: Just type in the ubuntu terminal ./mp2context figure.mp figure.tex Inside the file mp2context it replaces all the latex related like verbatimtex bla bla etex with \startuseMPgraphic{figure} and replaces textareas from btex { latex font definitions ..text..} etex to \sometxt{..text..} I saw Aditya mentioned in the earlier post about some regexp but I don't know what do do with it. Finally you just for example in main document do \startproduct \component figure \placefigure[here][fig:myfig]{Here is my picture done in dia}{\scale[width=\textwidth]{\useMPgraphic{figure}}} \stoppproduct Thanks in Advance! Janneman using Minimals current version: 2009.01.18 14:39 This is LuaTeX, Version snapshot-0.35.0-2009022416 (Web2C 7.5.7) ___________________________________________________________________________________ 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 ___________________________________________________________________________________