1 % Sample MetaPost with embedded LaTeX, used as unit test for ohcount
3 % The MetaPost code is taken of LaTeXLabels.mp from
4 % the excellent MetaPost tutorial by Urs Oswald
5 % http://www.ursoswald.ch/metapost/tutorial.html
9 \documentclass{article}
10 \newcommand{\uB}{\upshape{B\'ezier}} % up: upright
11 \newcommand{\iB}{\itshape{B\'ezier}} % it: italic
12 \newcommand{\lB}{\slshape{B\'ezier}} % sl: slanted
13 \newcommand{\cB}{\scshape{B\'ezier}} % sc: small caps
14 \newfont{\cyr}{wncyr10}
18 u:=25; % 25 = 25bp = 25 PostScript points = 30/72 in
19 wi:=10; % width in units u
20 he:=7; % height in units u
28 draw (0, i*u)--(breite, i*u) withcolor .7white;
31 draw (j*u, 0)--(j*u, hoehe) withcolor .7white;
35 draw (0, 0)--(breite, 0)--(breite, hoehe)--(0, hoehe)--cycle;
38 draw .5(u, u){dir 20i}..{dir 20i}(9.5u, 4u);
43 \begin{tabular}{|r|l|l|l|l|}
45 \textbf{md} & upright & italic & slanted & smallcaps \\
47 rm & \textrm{\uB} & \textrm{\iB} & \textrm{\lB} &\textrm{\cB} \\
48 sf & \textsf{\uB} & \textsf{\iB} &\textsf{\lB} &\textsf{\cB} \\
49 tt & \texttt{\uB} & \texttt{\iB} &\texttt{\lB} &\texttt{\cB} \\
53 (.5breite, hoehe-1.5u)
59 label.ulft(btex \cyr C\char24 rih, 08.09.2002 etex, (breite, 0));