From 873660d1a83ece926fe7206288dda9c36b349c1b Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 12 Jan 2006 23:46:03 +0000 Subject: generic 1 git-svn-id: svn://tug.org/texlive/trunk@613 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/generic/pstricks/pst-text.tex | 98 ++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 Master/texmf-dist/tex/generic/pstricks/pst-text.tex (limited to 'Master/texmf-dist/tex/generic/pstricks/pst-text.tex') diff --git a/Master/texmf-dist/tex/generic/pstricks/pst-text.tex b/Master/texmf-dist/tex/generic/pstricks/pst-text.tex new file mode 100644 index 00000000000..b0a7b5c5afe --- /dev/null +++ b/Master/texmf-dist/tex/generic/pstricks/pst-text.tex @@ -0,0 +1,98 @@ +%% BEGIN pst-text.tex +%% +%% Placing text on a path with PSTricks 97. +%% See the PSTricks User's Guide for description. +%% See tp-test.tex for sample input and tp-test.ps for sample output. +%% This uses the header file `pst-text.pro'. +%% +\def\fileversion{97} +\def\filedate{1997/03/25} +%% +%% COPYRIGHT 1993, 1994, 1999 by Timothy Van Zandt, tvz@nwu.edu. +%% +%% This program can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License Distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt. +%% +\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{pst-text.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{% + \pst@killglue + \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@TextPathSavedShow /show load def + \pst@dict \tx@PathLength end + dup 0 gt + { tx@TextPathDict begin \pst@tempa\space InitTextPath end + /show { tx@TextPathDict begin TextPathShow end } def + } + { pop } + ifelse}}% + \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 pst-text.tex -- cgit v1.2.3