[pstricks] English Rule
Herbert Voss
Herbert.Voss at FU-Berlin.DE
Mon Jun 1 18:03:35 CEST 2009
David Arnold schrieb:
> Here's some Metapost code that draws an "English Rule".
>
>
> \startuniqueMPgraphic{EnglishRule}{height,width,color}
> numeric height; height=\MPvar{height};
> x1=0; x3=\MPvar{width}; x2=x4=.5x3;
> y1=y3=0; y2:=-y4=height/2;
> fill z1..z2..z3 & z3..z4..z1 & cycle withcolor \MPvar{color};
> \stopuniqueMPgraphic
>
> The result looks something like this (attached):
>
>
>
> Can someone show me how to the same thing in PSTricks?
with ordinary LaTeX
\documentclass{article}
\def\ERule{\begin{center}
\makebox[0pt]{\rule[1pt]{0.5\linewidth}{1pt}}%
\makebox[0pt]{\rule{\linewidth}{1pt}}%
\makebox[0pt]{\rule[-1pt]{0.3\linewidth}{1pt}}%
\end{center}}
\begin{document}
foo
\ERule
bar
\end{document}
Herbert
More information about the PSTricks
mailing list