AW: [metapost] label.rt(TEX("\tiny little label"), (0, 0)); does
not work
Hartmut Henkel
hartmut_henkel at gmx.de
Wed Dec 22 20:16:56 CET 2004
On Wed, 22 Dec 2004, Fieger, Andreas wrote:
> > -----Ursprüngliche Nachricht-----
> > Von: stefan knorr [mailto:stefan at moontraveler.de]
> >
> > dear list,
> > i tried to typeset some smaller labels:
> > label.rt(TEX("\tiny little label"), (0, 0)); --- does not work
> > label.rt(btex \tiny little label etex, (0, 0)); --- works
> > [...]
>
> use something like the following at the begin of your document:
>
> verbatimtex \documentclass{<baseclass>}
> \usepackage[<options>]{<package>}
> \begin{document}
> etex
>
> and then set the environment variable TEX to latex before you call
> Metapost (how this is done depends on your system).
Does the above indeed work? AFAIK the following is needed:
vardef LATEX primary s =
write "%&latex" to "mptextmp.mp";
write "verbatimtex \documentclass{article}" to "mptextmp.mp";
write "\begin{document} etex" to "mptextmp.mp";
write "btex "&s&" etex" to "mptextmp.mp";
write EOF to "mptextmp.mp";
scantokens "input mptextmp"
enddef;
% ... could also be put into some file LATEX.mp
% and then do: input LATEX;
beginfig(1)
label.rt(LATEX("\tiny little label"), (0, 0));
label.rt(LATEX("\bfseries fat label"), (0, 10mm));
endfig;
end
Regards, Hartmut
More information about the metapost
mailing list