input latexmp ; string OrdMacro, OoosMacro, otherDefs ; OrdMacro := "\newcommand*{\Ord}[1]{\ifcase #1\relax" & " #1\textsuperscript{th}\or" & " #1\textsuperscript{st}\or" & " #1\textsuperscript{nd}\or" & " #1\textsuperscript{rd}\else" & " #1\textsuperscript{th}\fi}" ; OoosMacro := "\newcommand*{\Ooos}[1]{\setcounter{Ooos}{1}O\whiledo{\value{Ooos}<#1}" & "{o\stepcounter{Ooos}}h}" ; otherDefs := "\newcounter{Ooos}\renewcommand{\familydefault}{\sfdefault}" ; setupLaTeXMP( mode=rerun, inputencoding="latin1", fontencoding="T1", packages="helvet,calc,ifthen,mflogo", preamble=(OrdMacro & OoosMacro & otherDefs) , textextlabel=enable ); beginfig(1); for i=1 upto 5: label.urt( "\Ord{" & (decimal i) & "} {\MP} label",(0,-10*i) ) ; endfor; endfig; beginfig(2); for i=1 upto 50: label( "\Ooos{" & (decimal i)& "}",(0,10*i) ) ; endfor; currentpicture:= (currentpicture slanted 0.5) yscaled 0.7 ; endfig; bye