%% BEGIN textpath.tex/textpath.sty
%%
%% For placing text on a path with PSTricks.
%%
\def\fileversion{0.93a}
\def\filedate{93/03/12}
%%
%% COPYRIGHT 1993, by Timothy Van Zandt, [email protected]
%% See pstricks.tex or pstricks.doc for copying restrictions.
%%
%% See the PSTricks User's Guide for description.
%% See tp-test.tex for sample input.
%% See tp-test.ps for sample output.
%%
%% This uses the header file textpath.ps.
\message{ v\fileversion, \filedate}
\csname PSTextPathLoaded\endcsname
\let\PSTextPathLoaded\endinput
\ifx\PSTricksLoaded\endinput\else
\def\next{\input pstricks.tex}\expandafter\next
\fi
\edef\TheAtCode{\the\catcode`\@}
\catcode`\@=11
\pstheader{textpath.pro}
\def\pstextpath{\@ifnextchar[{\pstextpath@}{\pstextpath@[l]}}
\def\pstextpath@[#1]{%
\@ifnextchar({\pstextpath@@[#1]}{\pstextpath@@[#1](0,\TPoffset)}}
\def\pstextpath@@[#1](#2)#3{\pst@makebox{\pstextpath@@@[#1](#2){#3}}}
\def\pstextpath@@@[#1](#2,#3)#4{%
\begingroup
\ifx c#1\relax
\def\pst@tempa{.5}%
\else
\ifx r#1\relax
\def\pst@tempa{1}%
\else
\def\pst@tempa{0}%
\fi
\fi
\def\use@pscode{%
\pst@Verb{%
/mtrxc CM def
\tx@STV
CP translate
newpath
\pst@code\space
mtrxc setmatrix
0 setgray}%
\gdef\pst@code{}}%
\def\psclip#1{\pst@misplaced\psclip}%
\let\endpsclip\relax
\def\@multips(##1)(##2)##3##4{\pst@misplaced\multips}%
\def\nc@object##1##2##3##4{\pst@misplaced{node connection}}%
\def\PSTtoEPS@i##1##2{\pst@misplaced\PSTtoEPS}%
\pssetlength\pst@dima{#2}%
\pssetlength\pst@dimb{#3}%
\setbox\pst@hbox\hbox{%
\hbox to\z@{%
\kern -\wd\pst@hbox
% BoxWidth = CurrX - Hoffset.
\pstVerb{tx@TextPathDict begin
currentpoint pop /Hoffset exch def end}%
\kern\pst@dima
% XOffset = Voffset - Hoffset (extra horizontal skip)
\pstVerb{tx@TextPathDict begin
currentpoint pop /Voffset exch def end}%
\hss
\pstVerb{%
tx@TextPathDict begin \pst@tempa\space InitTextPath end
/tx@TextPathSavedShow /show load def
/show { tx@TextPathDict begin TextPathShow end } def}}%
\raise\pst@dimb\box\pst@hbox
\pstVerb{%
currentpoint newpath moveto
/show /tx@TextPathSavedShow load def}}%
\wd\pst@hbox=\z@ \dp\pst@hbox=\z@ \ht\pst@hbox=\z@
\leavevmode
\hbox{{#4}\box\pst@hbox}%
\endgroup\ignorespaces}
\def\TPoffset{-.7ex}
\catcode`\@=\TheAtCode\relax
\endinput
%% END textpath.tex/textpath.sty
|