[metapost] Umlaute in labels

Klaus Jantzen kdjantzen at t-online.de
Fri Nov 17 10:29:30 CET 2006


Hello,

how can I get umlate in to a label?
As shown in the example I write the label as I do it in all my LaTeX 
documents, but I get only a  space instead of the appropriate character.
Can I use only a specific font? Which one?

Thank you for any help.

=======================
% umltest.mp created on 2006-11-17 at 09:58:05
prologues:=2;
verbatimtex
%&latex
\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{ngerman}
%
\renewcommand{\sfdefault}{phv}
\renewcommand{\familydefault}{\sfdefault}
%
\begin{document}
etex
%
% ------------------------------------------------
% showpoint (t, point P, Label)
% show a point (with label)
%  t (test): if t = 0 the point is not shown
%  point P (e.g. z1);
%  Label must be given as btex z1 etex (can be blank: btex etx)
% ------------------------------------------------   
vardef showpoint(expr t, P)(text T) =
  picture lab;
  %
  if t <> 0 :
    lab = T;
    dotlabel.top(lab, (P*u));
    fi;
  enddef;      
%
numeric u, width, height;
u = 1cm;
z0 = (0,0);
width = 5;
height = 5;
%
beginfig(1);
%
% showgrid(width, height);
%
z1 = (1,1);
showpoint(1, z1, btex Punkt etex);
%
z2 = (2,2);
showpoint(1, z2, btex L\"osung etex);
%
z3 = (3,3);
showpoint(1, z3, btex L"osung etex);
%
z4 = (4,4);
showpoint(1, z4, btex Loesung etex);
%
endfig;
end
-- 

K. Jantzen


<http://www.jantzen-software.de>



More information about the metapost mailing list