From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/2718 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Metaerror? Date: Thu, 14 Sep 2000 15:20:10 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <3.0.6.32.20000914152010.013fe540@pop.wxs.nl> References: <39C0BF10.E9456027@pobox.com> <3.0.6.32.20000914104817.0165d7f0@pop.wxs.nl> <3.0.6.32.20000914133700.01bb89f0@pop.wxs.nl> <39C0BF10.E9456027@pobox.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: main.gmane.org 1035393487 11171 80.91.224.250 (23 Oct 2002 17:18:07 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 17:18:07 +0000 (UTC) Cc: Berend de Boer , ntg-context@ntg.nl Original-To: Marc van Dongen In-Reply-To: <20000914134058.H6603@cs.ucc.ie> Xref: main.gmane.org gmane.comp.tex.context:2718 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:2718 At 01:40 PM 9/14/00 +0100, Marc van Dongen wrote: >Also I noticed you use btex etex which doesn't >work properly with me. In stead I am using the >code appended below which I shamelessly stole >and adapted from btex .. etex returns a picture picked up from a file generated by a bunch of mp tools. >http://www.mathp7.jussieu.fr/~zoonek/LaTeX/Metapost/metapost.html > >You can use this macro and play sexy games like: > ..... > counter := 3; > boxit.ctr( LATEX( "The value of counter is " > & decimal( counter ) > & ". Cool no?" > ) > ); > >Perhaps context's btex and etex work fine---I it's metapost's btex etex btw >vardef LATEX primary s = > write "verbatimtex" to "mptextmp.mp"; > write "\documentclass[12pt]{article}" to "mptextmp.mp"; > write "\usepackage[T1]{fontenc}" to "mptextmp.mp"; > write "\usepackage{amsmath,amssymb}" to "mptextmp.mp"; > write "\begin{document}" to "mptextmp.mp"; > write "etex" to "mptextmp.mp"; > write "btex "&s&" etex" to "mptextmp.mp"; > write EOF to "mptextmp.mp"; > scantokens "input mptextmp" >enddef; This is not needed in context since it saves environments and additional data already. Also, this macro is rather hard coded -) see metafun manual: \startMPenvironment \setupbodyfont[pos,12pt] \stopMPenvironment So, for string composition purposes, one may define: vardef TEX primary s = write "btex " &s " etex" & EOF to "mptextmp.mp" ; scantokens "input mptextmp" enddef ; But there are easier ways I think. Btw, i'm thinking of a different mechanism which permits making macros with embedded btex/etex things, Hans Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com -------------------------------------------------------------------------