diff options
author | Karl Berry <karl@freefriends.org> | 2018-12-22 21:49:26 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-12-22 21:49:26 +0000 |
commit | 064f129c479cbbbf18976c1250f880bb4e2fab56 (patch) | |
tree | 008f2345b18193191ee96be329aead2c768e25cc /Master/texmf-dist | |
parent | e246c1a36719fa89b7c182dfa7ec587005b43fff (diff) |
pst-text (22dec18)
git-svn-id: svn://tug.org/texlive/trunk@49477 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-text/Changes | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-text/README | 13 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-text/pst-text-doc.bib | 81 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-text/pst-text-doc.pdf | bin | 139818 -> 180174 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-text/pst-text-doc.tex | 77 | ||||
-rw-r--r-- | Master/texmf-dist/dvips/pst-text/pst-text.pro | 55 | ||||
-rw-r--r-- | Master/texmf-dist/source/generic/pst-text/Makefile | 70 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-text/pst-char.tex | 5 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-text/pst-text.tex | 70 |
9 files changed, 224 insertions, 149 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-text/Changes b/Master/texmf-dist/doc/generic/pst-text/Changes index 876042d4703..3798d49a878 100644 --- a/Master/texmf-dist/doc/generic/pst-text/Changes +++ b/Master/texmf-dist/doc/generic/pst-text/Changes @@ -2,11 +2,13 @@ pst-text.sty -------- 2006-01-01 pst-text.tex -------- +1.01 2018-12-22 - added \psWarp for warping text 1.00 2006-11-06 - integrate the pst-char stuff, which is now obsolete. (hv) pst-text.pro -------- +1.01 2018-12-22 - added \psWarp for warping text 1.00 2006-11-06 - add a patch for japanese text (hv) - first CTAN contrib version (hv) diff --git a/Master/texmf-dist/doc/generic/pst-text/README b/Master/texmf-dist/doc/generic/pst-text/README index 0be87e6a80e..9e508dc13ea 100644 --- a/Master/texmf-dist/doc/generic/pst-text/README +++ b/Master/texmf-dist/doc/generic/pst-text/README @@ -1,4 +1,8 @@ -pst-text: text along a different path and char manipulations +# pst-text: text along a different path and char manipulations # + +\pscharpath +\pstextpath +\psWarp pst-text.sty - The LaTeX file pst-text.tex - The TeX file @@ -8,5 +12,10 @@ pst-text-doc.tex - The documentation, source pst-text-doc.bib - The documentation, bibfile +%% 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. + + -- -Herbert Voss 2006-11-05 +Herbert Voss 2018-12-22 hvoss@tug.org diff --git a/Master/texmf-dist/doc/generic/pst-text/pst-text-doc.bib b/Master/texmf-dist/doc/generic/pst-text/pst-text-doc.bib index cf3e360a431..f961dfd2f28 100644 --- a/Master/texmf-dist/doc/generic/pst-text/pst-text-doc.bib +++ b/Master/texmf-dist/doc/generic/pst-text/pst-text-doc.bib @@ -2,15 +2,63 @@ @STRING{tugboat = {TUGboat} } @STRING{dtk = {{D}ie {\TeX}nische {K}om{\"o}die} } + @Book{companion, - author = {Michel Goosens and Frank Mittelbach and Sebastian Rahtz and Dennis Roegel and Herbert Vo\ss}, + author = {Michel Goosens and Frank Mittelbach and Sebastian Rahtz and Denis Roegel and Herbert Voß}, title = {The {\LaTeX} {G}raphics {C}ompanion}, publisher = {{Addison-Wesley Publishing Company}}, - edition = {second}, + edition = 2, year = {2007}, - address = {Reading, Mass.} + address = {Reading, Mass. (USA)} +} + +@Book{PSTricks2, + author = {Herbert Voß}, + title = {\texttt{PSTricks} -- {G}rafik f\"ur \TeX{} und \LaTeX}, + edition = {7}, + publisher = {DANTE and Lehmanns Media}, + year = {2017}, + address = {Heidelberg and Berlin} +} + + +@Book{PSTricksE, + author = {Herbert Voß}, + title = {\texttt{PSTricks} -- {G}raphics and {P}ost{S}cript for \LaTeX}, + edition = {1}, + publisher = {UIT}, + date = {2011}, + location = {Cambridge -- UK} +} + + + +@Book{LaTeXRef, + author = {Herbert Voß}, + title = {\LaTeX\ Referenz}, + edition = {3}, + publisher = {DANTE and Lehmanns Media}, + year = {2012}, + address = {Heidelberg and Berlin} +} +@Book{PostScript, + Author = {Kollock, Nikolai G.}, + Title = {Post{S}cript richtig eingesetzt: vom {K}onzept zum + praktischen {E}insatz}, + Publisher = {IWT}, + Address = {Vaterstetten}, + year = 1989, } +@online{pstricks, + Title = {PSTricks - {\PS} macros for generic {\TeX}}, + Author = {{Timothy van} Zandt}, + url = {http://www.tug.org/application/PSTricks}, + year = 1993 +} + + + @Article{girou:01:, author = {Denis Girou}, title = {Pr\'esentation de {PST}ricks}, @@ -31,30 +79,3 @@ pages = {239-246} } -@Book{PostScript, - Author = {Kollock, Nikolai G.}, - Title = {Post{S}cript richtig eingesetzt: vom {K}onzept zum - praktischen {E}insatz}, - Publisher = {IWT}, - Address = {Vaterstetten}, - year = 1989, -} - -@Manual{multido, - Title = {\texttt{multido.tex} - a loop macro, that supports fixed-point addition}, - Author = {{Timothy Van} Zandt}, - Organization = {}, - Address = {\url{CTAN:/graphics/pstricks/generic/multido.tex}}, - Note = {}, - year = 1997 -} - -@Book{PSTricks2, - author = {Herbert Vo\ss{}}, - title = {\texttt{PSTricks} -- {G}rafik f\"ur \TeX{} und \LaTeX}, - edition = {fifth}, - publisher = {DANTE -- Lehmanns}, - year = {2008}, - address = {Heidelberg/Hamburg} -} - diff --git a/Master/texmf-dist/doc/generic/pst-text/pst-text-doc.pdf b/Master/texmf-dist/doc/generic/pst-text/pst-text-doc.pdf Binary files differindex c09315682e7..a9031cd9b9a 100644 --- a/Master/texmf-dist/doc/generic/pst-text/pst-text-doc.pdf +++ b/Master/texmf-dist/doc/generic/pst-text/pst-text-doc.pdf diff --git a/Master/texmf-dist/doc/generic/pst-text/pst-text-doc.tex b/Master/texmf-dist/doc/generic/pst-text/pst-text-doc.tex index ccd11a4fd31..d5801859495 100644 --- a/Master/texmf-dist/doc/generic/pst-text/pst-text-doc.tex +++ b/Master/texmf-dist/doc/generic/pst-text/pst-text-doc.tex @@ -1,18 +1,26 @@ -%% $Id: pst-func-doc.tex 64 2008-12-08 22:14:27Z herbert $ -\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings - headexclude,footexclude,oneside]{pst-doc} -\usepackage[utf8]{inputenc} -\usepackage{pst-plot,pst-text,pst-grad} +%% $Id: pst-text-doc.tex 873 2018-12-22 19:34:12Z herbert $ +\documentclass[fontsize=11pt,english,BCOR=10mm,DIV=12,bibliography=totoc,parskip=false, + headings=small, headinclude=false,footinclude=false,oneside,abstract=on]{pst-doc} +\usepackage{pst-plot,pst-grad,pst-text} \let\pstTextFV\fileversion -\lstset{pos=t,language=PSTricks, - morekeywords={psGammaDist,psChiIIDist,psTDist,psFDist,psBetaDist,psPlotImpl},basicstyle=\footnotesize\ttfamily} -% +\usepackage{dtk-logos} + + +\renewcommand\bgImage{% +\begin{pspicture}(10,5) +\psWarp[fillcolor=red!40,fontsize=0.5cm,font=Times-Roman]{Some Text manipulations}% +\end{pspicture}% +} + +\addbibresource{\jobname.bib} + + \begin{document} \title{\texttt{pst-text}} \subtitle{Manipulate text and characters; v.\pstTextFV} -\author{Timothy Van Zandt\\Herbert Vo\ss} -\docauthor{Herbert Vo\ss} +\author{Timothy Van Zandt\\Herbert Voß} +\docauthor{Herbert Voß} \date{\today} \maketitle @@ -44,7 +52,7 @@ Thanks to: Lars Kotthoff, Geoff Mercer % --------------------------------------------------------------------------------------- The package \LPack{pst-text} defines only one macro for text manipulations. \begin{BDef} -\Lcs{pstextpath}\OptArg\Largr{x,y}\Largb{Graphic object}\Largb{Text} +\Lcs{pstextpath}\OptArg{\Largr{x,y}}\Largb{Graphic object}\Largb{Text} \end{BDef} \begin{description} @@ -183,10 +191,10 @@ Verzweifelt legst du dich nieder - Doch der Frieden, er kommt nicht wieder - Die Augen sind hellwach - Es beginnt doch erst die Nacht - -Leicht d\"mmerst du in den Schlaf - +Leicht d\"ammerst du in den Schlaf - und kommst dir vor, wie in einem Grab - Mit einem Mal bist du hellwach - -Es ist, als h\"ttest du dauernd gedacht, - +Es ist, als h\"attest du dauernd gedacht, - Nun verstehst du alles, wie es war \ldots } \end{pspicture} @@ -212,16 +220,18 @@ Verzweifelt legst du dich nieder - Doch der Frieden, er kommt nicht wieder - Die Augen sind hellwach - Es beginnt doch erst die Nacht - -Leicht d\"mmerst du in den Schlaf - +Leicht d\"ammerst du in den Schlaf - und kommst dir vor, wie in einem Grab - Mit einem Mal bist du hellwach - -Es ist, als h\"ttest du dauernd gedacht, - +Es ist, als h\"attest du dauernd gedacht, - Nun verstehst du alles, wie es war \ldots } \end{pspicture} \end{lstlisting} + + \section{Character manipulations}\label{sec:psttext:Zeichenmanipulationen} % --------------------------------------------------------------------------------------- With character manipulations the same issue with the \verb+DVI-PS+ driver applies, @@ -459,11 +469,42 @@ It should be kept in mind that alternatively \Lcs{pscharpath} may be used in conjunction with \Lcs{psboxfill}. +\section{Warping a text} + +\begin{BDef} +\Lcs{psWarp}\OptArgs\OptArg{\Largr{x,y}}\Largb{Text} +\end{BDef} + +Optional arguments are + +\begin{description} +\item[\texttt{font}] Textfont, predefined as NimbusSanL-Regu. It must be a PostScript font. +\item[\texttt{fontsize}] Predefined to 24pt +\item[\texttt{fillcolor}] Predefined as red!40 +\item[\texttt{doublecolor}] The fillcolor for the doubleline, predefined as blue +\end{description} + + +\begin{pspicture}(10,5) +\psWarp[fillcolor=red!40,fontsize=0.5cm,font=Times-Roman]{All is Fun with the typesetting system LaTeX}% +\psWarp[fillcolor=green,fontsize=12pt](0,2){What a wonderfull day, it is raining and + I do not know what to do...}% +\end{pspicture} + + +\begin{lstlisting} +\begin{pspicture}(10,5) +\psWarp[fillcolor=red!40,fontsize=0.5cm,font=Times-Roman]{All is Fun with the typesetting system LaTeX}% +\psWarp[fillcolor=green,fontsize=12pt](0,2){What a wonderfull day, it is raining and + I do not know what to do...}% +\end{pspicture} +\end{lstlisting} + + \nocite{*} \bgroup -\raggedright -\bibliographystyle{plain} -\bibliography{\jobname} +\RaggedRight +\printbibliography \egroup \printindex diff --git a/Master/texmf-dist/dvips/pst-text/pst-text.pro b/Master/texmf-dist/dvips/pst-text/pst-text.pro index 99e705b2205..f4fb7ca43aa 100644 --- a/Master/texmf-dist/dvips/pst-text/pst-text.pro +++ b/Master/texmf-dist/dvips/pst-text/pst-text.pro @@ -1,11 +1,11 @@ %! % PostScript header file pst-text.pro -% Version 1.0, 2005-11-29 (hv) +% Version 1.01, 2018-12-22 (hv) % For distribution, see pstricks.tex. - -/tx@TextPathDict 40 dict def +% +/tx@TextPathDict 45 dict def tx@TextPathDict begin - +% % Syntax: <dist> PathPosition - % Function: Searches for position of currentpath distance <dist> from % beginning. Sets (X,Y)=position, and Angle=tangent. @@ -20,16 +20,16 @@ tx@TextPathDict begin /pathforall load stopped { pop pop pop pop /X 0 def /Y 0 def } if grestore } def - +% /movetoproc { continue { @movetoproc } { pop pop } ifelse } def - +% /@movetoproc { /newy exch def /newx exch def /firstx newx def /firsty newy def } def - +% /linetoproc { continue { @linetoproc } { pop pop } ifelse } def - +% /@linetoproc { /oldx newx def /oldy newy def /newy exch def /newx exch def @@ -45,7 +45,7 @@ tx@TextPathDict begin /continue false def } if } def - +% /TextPathShow { /String exch def /CharCount 0 def @@ -64,7 +64,7 @@ tx@TextPathDict begin % hv end 2005-11-29 1.00 } repeat } def - +% % Syntax: <pathlength> <position> InitTextPath - /InitTextPath { gsave @@ -75,7 +75,7 @@ tx@TextPathDict begin /Voffset Y def grestore } def - +% /Transform { PathPosition dup @@ -84,18 +84,17 @@ tx@TextPathDict begin translate Angle rotate } def - +% /ShowChar { /Char exch def gsave Char end stringwidth tx@TextPathDict begin 2 div /Sy exch def 2 div /Sx exch def - +% %%% MV 10-09-99 00:36 /sc?currentpoint where {pop sc?currentpoint} {currentpoint} ifelse % currentpoint - Voffset sub Sy add exch Hoffset sub Sx add Transform @@ -106,5 +105,31 @@ tx@TextPathDict begin Sx 2 mul Sy 2 mul rmoveto } def % +/warp { + 1 index + 1.4 mul + cos 2 add + mul +} def +/warpmove{ + 2 index { + newpath + } if + warp moveto + pop false +} def +/warpline { warp lineto } def +/warpcurve { + 6 2 roll warp + 6 2 roll warp + 6 2 roll warp + curveto +} def +/warpit { + true + { warpmove } { warpline } { warpcurve } { closepath } pathforall + pop +} def +% end -% END pst-text.pro +% END pst-text.pro
\ No newline at end of file diff --git a/Master/texmf-dist/source/generic/pst-text/Makefile b/Master/texmf-dist/source/generic/pst-text/Makefile deleted file mode 100644 index f6caa012fbf..00000000000 --- a/Master/texmf-dist/source/generic/pst-text/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -# `Makefile' for `pst-text.pdf', hv, 2006/08/11 - -.SUFFIXES : .tex .ltx .dvi .ps .pdf .eps - -PACKAGE = pst-text - -MAIN = pst-text-doc - -LATEX = latex - -ARCHNAME = $(MAIN)-$(shell date +%y%m%d) - -ARCHFILES = $(PACKAGE).sty $(PACKAGE).tex $(PACKAGE).pro $(MAIN).tex README Changes Makefile - -TDS = ~/PSTricks/PSTricks-TDS - -all : doc clean tds - -doc: $(MAIN).pdf - -$(MAIN).pdf : $(MAIN).ps - GS_OPTIONS=-dAutoRotatePages=/None ps2pdf $< - -$(MAIN).ps : $(MAIN).dvi - dvips $< - -$(MAIN).dvi : $(MAIN).tex - $(LATEX) $< - $(LATEX) $< - if ! test -f $(basename $<).glo ; then touch $(basename $<).glo; fi - if ! test -f $(basename $<).idx ; then touch $(basename $<).idx; fi - makeindex -s gglo.ist -t $(basename $<).glg -o $(basename $<).gls \ - $(basename $<).glo - makeindex -t $(basename $<).ilg -o $(basename $<).ind \ - $(basename $<).idx - bibtex $(basename $<) - $(LATEX) $< - $(LATEX) $< - -clean : - $(RM) $(addprefix $(MAIN), .log .aux .glg .glo .gls .ilg .idx .ind .tmp .toc .out ) - $(RM) $(addprefix $(MAIN), .dvi .ps) - -veryclean : clean - $(RM) $(addprefix $(MAIN), .pdf .bbl .blg) - -arch : - zip $(ARCHNAME).zip $(ARCHFILES) - -tds: - cp -u Changes $(TDS)/doc/generic/$(PACKAGE)/ - cp -u README $(TDS)/doc/generic/$(PACKAGE)/ - cp -u $(MAIN).pdf $(TDS)/doc/generic/$(PACKAGE)/ -# - cp -u Changes $(TDS)/tex/latex/$(PACKAGE)/ - cp -u $(PACKAGE).sty $(TDS)/tex/latex/$(PACKAGE)/ -# - cp -u Changes $(TDS)/tex/generic/$(PACKAGE)/ - cp -u $(PACKAGE).tex $(TDS)/tex/generic/$(PACKAGE)/ -# - cp -u Changes $(TDS)/dvips/$(PACKAGE)/ - cp -u $(PACKAGE).pro $(TDS)/dvips/$(PACKAGE)/ -# - cp -u Changes $(TDS)/source/$(PACKAGE)/ - cp -u $(MAIN).tex $(TDS)/source/$(PACKAGE)/ - cp -u $(MAIN).bib $(TDS)/source/$(PACKAGE)/ - cp -u Makefile $(TDS)/source/$(PACKAGE)/ - - -# EOF diff --git a/Master/texmf-dist/tex/generic/pst-text/pst-char.tex b/Master/texmf-dist/tex/generic/pst-text/pst-char.tex deleted file mode 100644 index 93e7a9594fe..00000000000 --- a/Master/texmf-dist/tex/generic/pst-text/pst-char.tex +++ /dev/null @@ -1,5 +0,0 @@ -%% BEGIN pst-char.tex -%% -\input pst-text - -\endinput diff --git a/Master/texmf-dist/tex/generic/pst-text/pst-text.tex b/Master/texmf-dist/tex/generic/pst-text/pst-text.tex index 02de2985623..b38689418e5 100644 --- a/Master/texmf-dist/tex/generic/pst-text/pst-text.tex +++ b/Master/texmf-dist/tex/generic/pst-text/pst-text.tex @@ -6,7 +6,7 @@ %% %% %% COPYRIGHT 1993, 1994, 1999 by Timothy Van Zandt, tvz@nwu.edu. -%% 2006 Herbert Voss <hvoss@tug.org> +%% 2006, 2019 Herbert Voss <hvoss@tug.org> %% %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN @@ -18,14 +18,17 @@ \ifx\PSTricksLoaded\endinput\else\input pstricks \fi %\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi % -\def\fileversion{1.00} -\def\filedate{2006/11/05} +\def\fileversion{1.01} +\def\filedate{2018/12/22} \message{ v\fileversion, \filedate (tvz,hv)} \edef\TheAtCode{\the\catcode`\@} \catcode`\@=11 -%\pst@addfams{pst-text} +\pst@addfams{pst-text} + + + \pstheader{pst-text.pro} % \def\pstextpath{\@ifnextchar[{\pstextpath@}{\pstextpath@[l]}} @@ -50,7 +53,7 @@ \tx@STV CP translate newpath - \pst@code\space + \pst@code mtrxc setmatrix 0 setgray}% \gdef\pst@code{}}% @@ -89,7 +92,8 @@ \leavevmode \hbox{{#4}\box\pst@hbox}% \endgroup\ignorespaces} -\def\TPoffset{-.7ex} +% +\def\TPoffset{-0.7ex} % \def\tx@CharPathShow{% /tx@CharPathSavedShow /show load def @@ -125,13 +129,13 @@ \showpointsfalse \let\pst@newpath\@empty \def\use@pscode{% - \pst@Verb{% + \pst@Verb{ gsave \tx@STV \pst@code grestore % DG/SR modification begin - Jul. 3, 1998 / Mar. 11, 1999 - Patches 1 and 3 -% \if@star\else CP newpath moveto \fi}}% +% \if@star\else CP newpath moveto \fi}}% \if@star\else CP newpath moveto \fi}% \gdef\pst@code{}}% % DG/SR modification end @@ -149,8 +153,56 @@ \ignorespaces} \def\endpscharclip{\pst@misplaced\endpscharclip} % -\catcode`\@=\TheAtCode\relax +\define@key[psset]{pst-text}{font}[NimbusSanL-Regu]{\def\psk@warpfont{#1 }} +\define@key[psset]{pst-text}{fontsize}[24pt]{\pst@getlength{#1}\psk@warpfontsize} +\psset[pst-text]{font=NimbusSanL-Regu,fontsize=24pt} +\def\psWarp{\def\pst@par{}\pst@object{psWarp}} +\def\psWarp@i{\@ifnextchar(\psWarp@ii{\psWarp@ii(0,0)}} +\def\psWarp@ii(#1)#2{% + \addbefore@par{linewidth=0.1pt,doublecolor=blue}% + \begin@ClosedObj + \pst@getcoor{#1}\pst@tempCoor + \pstverb{ + /\psk@warpfont findfont \psk@warpfontsize\space scalefont setfont + /amplitude \psk@warpfontsize\space 0.75 mul def + /damplitude amplitude 1.05 mul def + /warptxt (#2) def + /warpwidth warptxt stringwidth pop def + /warphalf warpwidth 2 div def + \pst@tempCoor translate + 0 \psk@warpfontsize\space neg moveto + 0 amplitude moveto %%% orig + 0 1 warpwidth { amplitude lineto } for + warpwidth -1 0 { damplitude lineto } for + closepath + tx@TextPathDict begin + warpit + gsave + \pst@usecolor\psdoublecolor + fill + grestore + \pst@number\pslinewidth setlinewidth + stroke + end + 0 0 moveto + warptxt true charpath + tx@TextPathDict begin + warpit + gsave + \pst@usecolor\psfillcolor + fill + grestore + \pst@number\pslinewidth setlinewidth + stroke + end + } + \end@ClosedObj +} + + +% +\catcode`\@=\TheAtCode\relax \endinput %% %% END pst-text.tex |