ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: Berend de Boer <berend@pobox.com>, ntg-context@ntg.nl
Subject: Re: Metaerror?
Date: Thu, 14 Sep 2000 15:20:10 +0200	[thread overview]
Message-ID: <3.0.6.32.20000914152010.013fe540@pop.wxs.nl> (raw)
In-Reply-To: <20000914134058.H6603@cs.ucc.ie>

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


  reply	other threads:[~2000-09-14 13:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-14  6:45 Metaerror? Berend de Boer
2000-09-14  8:48 ` Metaerror? Hans Hagen
2000-09-14 11:34   ` Metaerror? Berend de Boer
2000-09-14 11:37     ` Metaerror? Hans Hagen
2000-09-14 12:05       ` Metaerror? Berend de Boer
2000-09-14 12:15         ` Metaerror? Hans Hagen
2000-09-14 12:48           ` Metaerror? Berend de Boer
2000-09-14 12:40         ` Metaerror? Marc van Dongen
2000-09-14 13:20           ` Hans Hagen [this message]
     [not found]         ` <m33dj3jffv.fsf@coe.uga.edu>
2000-09-14 13:05           ` Metaerror? Berend de Boer
2000-09-14 13:23             ` Metaerror? Marc van Dongen
2000-09-14 15:28             ` Metaerror? Hans Hagen
2000-09-14 17:53               ` Metaerror? Berend de Boer
2000-09-14 18:18                 ` Metaerror? Berend de Boer
2000-09-15  7:36                   ` Metaerror? Hans Hagen
2000-09-14 10:49 Metaerror? Haseloff, Lutz
2000-09-14 12:23 ` Metaerror? Berend de Boer
2000-09-14 13:39   ` Metaerror? Tobias Burnus
2000-09-15  9:35 Metaerror? Haseloff, Lutz
     [not found] <0F3313EC125AD311981100105AB3A75D4DBD41@N0795.mdf.fvbb.de>
2000-09-15 10:29 ` Metaerror? Hans Hagen
2000-09-18 10:15 Metaerror? Haseloff, Lutz

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=3.0.6.32.20000914152010.013fe540@pop.wxs.nl \
    --to=pragma@wxs.nl \
    --cc=berend@pobox.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).