diff options
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-arrow/Changes | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-arrow/pst-arrow-doc.pdf | bin | 212452 -> 222065 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-arrow/pst-arrow-doc.tex | 44 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-arrow/pst-arrow.tex | 332 |
4 files changed, 42 insertions, 340 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-arrow/Changes b/Master/texmf-dist/doc/generic/pst-arrow/Changes index bfb9b33776e..c1d761a987b 100644 --- a/Master/texmf-dist/doc/generic/pst-arrow/Changes +++ b/Master/texmf-dist/doc/generic/pst-arrow/Changes @@ -1,11 +1,15 @@ -%% $Id: Changes 136 2021-07-28 09:39:03Z herbert $ +%% $Id: Changes 164 2021-08-25 19:26:42Z herbert $ %% pst-arrow.sty ----------- v. 0.01 2016-09-09 initial version pst-arrow.tex ----------- (hv) + v. 0.04 2021-04-25 - moved the basic arrow code into pstricks-arrows.tex + which is in the pstricks-base dir + - updated documentation v. 0.03 2021-07-28 - fix introduced bug for linecolor which schould not be affected by tipcolor v. 0.02 2021-07-23 - added tipcolor option v. 0.01 2016-09-09 initial version + diff --git a/Master/texmf-dist/doc/generic/pst-arrow/pst-arrow-doc.pdf b/Master/texmf-dist/doc/generic/pst-arrow/pst-arrow-doc.pdf Binary files differindex 19928822476..065e35f3051 100644 --- a/Master/texmf-dist/doc/generic/pst-arrow/pst-arrow-doc.pdf +++ b/Master/texmf-dist/doc/generic/pst-arrow/pst-arrow-doc.pdf diff --git a/Master/texmf-dist/doc/generic/pst-arrow/pst-arrow-doc.tex b/Master/texmf-dist/doc/generic/pst-arrow/pst-arrow-doc.tex index 79ac2d4085e..39a82019757 100644 --- a/Master/texmf-dist/doc/generic/pst-arrow/pst-arrow-doc.tex +++ b/Master/texmf-dist/doc/generic/pst-arrow/pst-arrow-doc.tex @@ -1,13 +1,13 @@ -%% $Id: pst-arrow-doc.tex 136 2021-07-28 09:39:03Z herbert $ -\documentclass[11pt,english,BCOR10mm,DIV14,bibliography=totoc,parskip=false,smallheadings +%% $Id: pst-arrow-doc.tex 164 2021-08-25 19:26:42Z herbert $ +\errorcontextlines=100 +\documentclass[11pt,english,BCOR10mm,DIV=14,bibliography=totoc,parskip=false,smallheadings, headexclude,footexclude,twoside]{pst-doc} -\usepackage[utf8]{inputenc} -\usepackage{pst-node,pst-arrow} +\usepackage{pst-node,hvlogos,pst-arrow} \let\pstArrowFV\fileversion \lstset{preset=\centering,pos=l,wide=false,vsep=5mm,language=PSTricks,%width=0.5\linewidth, morekeywords={multidipole,parallel},basicstyle=\footnotesize\ttfamily} % -\def\bgImage{\begin{pspicture}(5,6) +\renewcommand\bgImage{\begin{pspicture}(5,6) \psset{arrowscale=2} \pnode(3,4){A}\pnode(5,6){B}\pnode(5,0){C} \psbezier[ArrowInside=->,% @@ -31,7 +31,8 @@ \author{Herbert Voß} %\docauthor{Herbert Vo\ss} \date{\today} -\maketitle + +\settitle \tableofcontents @@ -47,9 +48,10 @@ The \LPack{pstricks} related package provides more arrow types. %-------------------------------------------------------------------------------------- \section{Arrows} %-------------------------------------------------------------------------------------- -\LPack{pst-arrow} defines the following "`arrows"': +\LPack{pstricks} defines the following "`arrows"': \def\myline#1{\psline[linecolor=red,linewidth=0.5pt,arrowscale=1.5]{#1}(0,1ex)(1.3,1ex)}% + \def\mylineA#1{\psline[linecolor=red,linewidth=0.5pt,arrowscale=4.5]{#1}(0,1ex)(2,1ex)}% \psset{arrowscale=1.5} \begin{longtable}{@{} c @{\qquad} p{3cm} l @{}}% Value & Example & Name \\[2pt]\hline @@ -70,17 +72,26 @@ The \LPack{pstricks} related package provides more arrow types. \Lnotation{**-**} & \myline{**-**} & Disks, flush to endpoints.\\ \Lnotation{{|}<->{|}} & \myline{|<->|} & T-bars and arrows.\\ \Lnotation{{|}>-<{|}} & \myline{|>-<|} & T-bars and reverse arrows.\\ - \Lnotation{h-h{|}} & \myline{h-h} & left/right hook arrows.\\ - \Lnotation{H-H{|}} & \myline{H-H} & left/right hook arrows.\\ - \Lnotation{v-v|} & \myline{v-v} & left/right inside vee arrows.\\ - \Lnotation{V-V|} & \myline{V-V} & left/right outside vee arrows.\\ - \Lnotation{f-f|} & \myline{f-f} & left/right inside filled arrows.\\ - \Lnotation{F-F|} & \myline{F-F} & left/right outside filled arrows.\\ - \Lnotation{t-t|} & \myline{t-t} & left/right inside slash arrows.\\[5pt] - \Lnotation{T-T|} & \myline{T-T} & left/right outside slash arrows.\\ + \Lnotation{h-h{}} & \myline{h-h} & left/right hook arrows.\\ + \Lnotation{H-H{}} & \myline{H-H} & left/right hook arrows.\\ + \Lnotation{v-v} & \myline{v-v} & left/right inside vee arrows.\\ + \Lnotation{V-V} & \myline{V-V} & left/right outside vee arrows.\\ + \Lnotation{f-f} & \myline{f-f} & left/right inside filled arrows.\\ + \Lnotation{F-F} & \myline{F-F} & left/right outside filled arrows.\\ + \Lnotation{t-t} & \myline{t-t} & left/right inside slash arrows.\\[5pt] + \Lnotation{T-T} & \myline{T-T} & left/right outside slash arrows.\\ +% + \Lnotation{<D-D>} & \mylineA{<D-D>} & curved arrows.\\ + \Lnotation{<D<D-D>D>} & \mylineA{<D<D-D>D>} & curved doubled arrows.\\ + \Lnotation{D>-<D} & \mylineA{D>-<D} & curved arrows, tip inside.\\ + \Lnotation{<T-T>} & \myline{<T-T>} & curved lines.\\ +% \Lnotation{>T-T<} & \mylineA{>T-T<} & \TikZ\ like arrows.\\ \hline \end{longtable} +%\def\pst@arrowtable{,-,<->,<<->>,>-<,>>-<<,(-),[-],)-(,]-[,|>-<|,% +% <D-D>,D>-<D,<D<D-D>D>,<T-T>,|<*->|*,|<->|,v-v,V-V,f-f,F-F,t-t,T-T} + \psset{arrowscale=1} @@ -93,7 +104,8 @@ of the \Lkeyword{arrows} parameter. The parameter can be set with \noindent or for some macros with a special option, like\\[5pt] \noindent\verb|\psline[<general options>]{<arrow type>}(A)(B)|\\ -\noindent\verb/\psline[linecolor=red,linewidth=2pt]{|->}(0,0)(0,2)/ \ \psline[linecolor=red,linewidth=2pt]{|->}(0,0)(0,2) +\noindent\verb/\psline[linecolor=red,tipcolor=blue,linewidth=2pt]{|->}(0,0)(0,2)/ \ +\psline[linecolor=red,tipcolor=blue,linewidth=2pt]{|->}(0,0)(0,2) \subsection{Multiple arrows} There are two new options which are only valid for the arrow type \verb+<<+ or \verb+>>+. diff --git a/Master/texmf-dist/tex/generic/pst-arrow/pst-arrow.tex b/Master/texmf-dist/tex/generic/pst-arrow/pst-arrow.tex index d5bd965bba9..3dee550dfd7 100644 --- a/Master/texmf-dist/tex/generic/pst-arrow/pst-arrow.tex +++ b/Master/texmf-dist/tex/generic/pst-arrow/pst-arrow.tex @@ -1,4 +1,4 @@ -%% $Id: pst-arrow.tex 136 2021-07-28 09:39:03Z herbert $ +%% $Id: pst-arrow.tex 164 2021-08-25 19:26:42Z herbert $ %% %% This is file `pst-arrow.tex', %% @@ -6,7 +6,7 @@ %% %% Package `pst-arrow.tex' %% -%% Herbert Voss <hvoss@tug.org> +%% Copyright 2021 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 archives @@ -22,26 +22,14 @@ \ifx\PSTricksLoaded\endinput\else\input pstricks \fi \ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi % -\def\fileversion{0.03} -\def\filedate{2021/07/28} +\def\fileversion{0.04} +\def\filedate{2021/08/25} \message{`pst-arrow' v\fileversion, \filedate\space (dr,hv)} % \edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax -\pst@addfams{pst-arrow} -% -\define@key[psset]{pst-arrow}{tipcolor}[black]{\def\pst@tipcolor{#1}} -\psset[pst-arrow]{tipcolor=} -\def\ps@check@tipcolor{% - \expandafter\if\expandafter$\pst@tipcolor$ - \pst@usecolor\pslinecolor - \else - \pst@usecolor\pst@tipcolor - \fi -} +\pst@addfams{pst-arrow} % -\def\tx@EndDot{ \ps@check@tipcolor\space EndDot } - \def\psBigArrow{\pst@object{psBigArrow}} \def\psBigArrow@i(#1)(#2){% \addbefore@par{doublesep=1cm} @@ -75,300 +63,9 @@ }% \end@ClosedObj } -% the original table -% \def\pst@arrowtable{,<->,<<->>,>-<,>>-<<,(-),[-],)-(,]-[,|>-<|} -% -% v : Vee arrow (inside) v,V,f and F by Christophe FOUREY -% V : Vee arrow (outside) -% f : Filled vee arrow (inside) -% F : Filled vee arrow (outside) -\edef\pst@arrowtable{\pst@arrowtable,v-v,V-V,f-f,F-F,t-t,T-T} - -% Vee arrow -\define@key[psset]{pst-arrow}{veearrowlength}[3mm]{\pst@getlength{#1}\psk@veearrowlength} -\psset[pst-arrow]{veearrowlength=3mm} % default projected length -\define@key[psset]{pst-arrow}{veearrowangle}[30]{\pst@getangle{#1}\psk@veearrowangle} -\psset[pst-arrow]{veearrowangle=30} % default angle -\define@key[psset]{pst-arrow}{veearrowlinewidth}[0.35mm]{\pst@getlength{#1}\psk@veearrowlinewidth} -\psset[pst-arrow]{veearrowlinewidth=0.35mm} % default vee arrow line width - -% Filled vee arrow -\define@key[psset]{pst-arrow}{filledveearrowlength}[3mm]{\pst@getlength{#1}\psk@filledveearrowlength} -\psset[pst-arrow]{filledveearrowlength=3mm} % default projected length -\define@key[psset]{pst-arrow}{filledveearrowangle}[15]{\pst@getangle{#1}\psk@filledveearrowangle} -\psset[pst-arrow]{filledveearrowangle=15} % default angle -\define@key[psset]{pst-arrow}{filledveearrowlinewidth}[0.35mm]{\pst@getlength{#1}\psk@filledveearrowlinewidth} -\psset[pst-arrow]{filledveearrowlinewidth=0.35mm} % default vee arrow line width -\define@key[psset]{pst-arrow}{arrowlinestyle}[solid]{% - \@ifundefined{psls@#1}% - {\@pstrickserr{Line style `#1' not defined}\@eha}% - {\def\psarrowlinestyle{#1}}} -\psset[pst-arrow]{arrowlinestyle=solid} % default -\pst@def{VeeArrow}<% - 1 setlinecap % round caps - 1 setlinejoin % round join - setlinewidth % vee arrow line width - /y ED % projected length - 2 div /a ED % angle (divide by 2) - /t ED % false = inside, true = outside - a sin a cos div y mul /x ED % perpendicular length : x=tan(a).y - t { 1 -1 scale } if % if outside : symmetry - x neg y moveto % point #1 - 0 0 L % point #2 - x y L % point #3 - { closepath gsave fill grestore } if % if filled : close and fill - \@nameuse{psls@\psarrowlinestyle} - \ps@check@tipcolor - stroke % draw line - 0 t { y 2 mul } { 0 } ifelse moveto> % if outside : twice longer line - -% VeeArrow : filled? outside? (total) angle (projected) length (arrow) line width - -\@namedef{psas@|}{\ps@check@tipcolor \psk@tbarsize \tx@Tbar} - -\@namedef{psas@v}{% - \ps@check@tipcolor - false false \psk@veearrowangle \psk@veearrowlength \psk@veearrowlinewidth \tx@VeeArrow} -\@namedef{psas@V}{% - \ps@check@tipcolor - false true \psk@veearrowangle \psk@veearrowlength \psk@veearrowlinewidth \tx@VeeArrow} -\@namedef{psas@f}{% - \ps@check@tipcolor - true false \psk@filledveearrowangle \psk@filledveearrowlength \psk@filledveearrowlinewidth \tx@VeeArrow} -\@namedef{psas@F}{% - \ps@check@tipcolor - true true \psk@filledveearrowangle \psk@filledveearrowlength \psk@filledveearrowlinewidth \tx@VeeArrow} - -% And An another arrowhead -% architectural tick / oblique arrow - -% Tick arrow -\define@key[psset]{pst-arrow}{tickarrowlength}[1.5mm]{\pst@getlength{#1}\psk@tickarrowlength} -\psset[pst-arrow]{tickarrowlength=1.5mm} % default projected length -\define@key[psset]{pst-arrow}{tickarrowlinewidth}[0.35mm]{\pst@getlength{#1}\psk@tickarrowlinewidth} -\psset[pst-arrow]{tickarrowlinewidth=0.35mm} % default tick arrow line width - -\pst@def{TickArrow}<% - 1 setlinecap % round caps - 1 setlinejoin % round join - setlinewidth % tick line width - /y ED % projected length - /t ED % false = normal, true = reversed - t { 1 -1 scale } if % if reversed : symmetry - y neg y moveto % point #1 - y y neg L % point #2 - \@nameuse{psls@\psarrowlinestyle} - \ps@check@tipcolor - stroke % draw line - 0 0 moveto> % origin - - -\@namedef{psas@t}{ \ps@check@tipcolor\space false \psk@tickarrowlength \psk@tickarrowlinewidth \tx@TickArrow } -\@namedef{psas@T}{ \ps@check@tipcolor\space true \psk@tickarrowlength \psk@tickarrowlinewidth \tx@TickArrow } - -\pst@def{ArrowD}< % the sides are drawn as curves (hv 20071211) - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /Inset ED - { 0 h T 1 -1 scale } if % changes the direction -% we use y=w/h^2 * x^2 as equation for the control points -% for the coordinates the arrow is seen from top to bottom -% the bottom (tip) is (0;0) - w neg h moveto % lower left of > - w 9 div 4 mul neg h 3 div 2 mul - w 9 div neg h 3 div - 0 0 curveto % tip of > - w 9 div h 3 div - w 9 div 4 mul h 3 div 2 mul - w h curveto % upper left of > - w neg Inset neg rlineto % move to x=0 and inset - gsave - \ps@check@tipcolor - fill grestore > -% -\pst@def{ArrowT}< % like tikz - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /Inset ED - { 0 h T 1 -1 scale } if % changes the direction - w 2 mul /w exch def - w neg h moveto % lower left of > - w 9 div 4 mul neg h 3 div 2 mul - w 9 div neg h 3 div - 0 0 curveto % tip of > - w 9 div h 3 div - w 9 div 4 mul h 3 div 2 mul - w h curveto % upper left of > -% w neg Inset neg rlineto % move to x=0 and inset -% CLW SLW -% 1 0 0 setrgbcolor - 2 setlinejoin - \ps@check@tipcolor - stroke - 0 0 moveto > -% -% -% HookLeft/RightArrow -\newdimen\pshooklength -\newdimen\pshookwidth -\define@key[psset]{pst-arrow}{hooklength}[3mm]{\pssetlength\pshooklength{#1}} -\define@key[psset]{pst-arrow}{hookwidth}[1mm]{\pssetlength\pshookwidth{#1}} -%\psset{hooklength=3mm,hookwidth=1mm} -% -\edef\pst@arrowtable{\pst@arrowtable,H-H,h-h} % add new arrow -\def\tx@RHook{RHook } % PostScript name -\def\tx@Rhook{Rhook } % PostScript name - -\@namedef{psas@H}{% - /RHook { - /x ED % hook width - /y ED % hook length - /z CLW 2 div def % save it - x y moveto % goto first point - x 0 0 0 0 y - curveto % draw Bezier - stroke - 0 y moveto % define current point - } def - \ps@check@tipcolor - \pst@number\pshooklength - \pst@number\pshookwidth - \tx@RHook -} -\@namedef{psas@h}{% - /Rhook { - CLW mul % size * CLW - add dup % +length size*CLW+length size*CLW+length - 2 div /w ED % (size*CLW+length)/2 -> w - mul dup /h ED mul % (size*CLW+length) - /a ED - w neg h abs moveto 0 0 L - gsave - \ps@check@tipcolor - stroke grestore - } def - 0 \psk@arrowlength \psk@arrowsize \tx@Rhook -} -% New parameter "arrowfill", with default as "true" -\define@boolkey[psset]{pst-arrow}[ps]{ArrowFill}[true]{} -% -% Modification of the PostScript macro Arrow to choose to fill or not the arrow -% (it require to restore the current linewidth, despite of the scaling) -\pst@def{Arrow}<{% - CLW mul add dup 2 div - /w ED mul dup - /h ED mul - /a ED { 0 h T 1 -1 scale } if - gsave - \ifpsArrowFill\else\pst@number\pslinewidth \pst@arrowscale\space div SLW \fi - \ps@check@tipcolor - w neg h moveto - 0 0 L w h L w neg a neg rlineto - \ifpsArrowFill gsave - \tx@setStrokeTransparency - fill - grestore \else gsave closepath - \ps@check@tipcolor - stroke grestore \fi - grestore - 0 h a sub moveto -}> -% -\define@key[psset]{pst-arrow}{nArrowsA}[2]{\def\psk@nArrowsA{#1}} -\define@key[psset]{pst-arrow}{nArrowsB}[2]{\def\psk@nArrowsB{#1}} -\define@key[psset]{pst-arrow}{nArrows}[2]{\def\psk@nArrowsA{#1}\def\psk@nArrowsB{#1}} -\psset{nArrows=2} -% -\@namedef{psas@>>}{% - \psk@nArrowsA\space 1 sub { - false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow - 0 h a sub T - } repeat - gsave - newpath - false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow - CP - grestore - moveto -} -% -\@namedef{psas@<<}{% - true \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow - 0 h neg a add T - \psk@nArrowsB\space 2 sub { - false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow - 0 h neg a add T - } repeat - false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow - 0 h a 5 mul 2 div sub moveto -} -% -% DG addition begin - Dec. 18/19, 1997 and Oct. 11, 2002 -% Adapted from \psset@arrows -\define@key[psset]{pst-arrow}{ArrowInside}{% - \def\pst@tempArrow{#1}% - \ifx\pst@tempArrow\@empty \def\psk@ArrowInside{} % - \else% - \begingroup% - \pst@activearrows% - \xdef\pst@tempg{<#1}% - \endgroup% - \expandafter\psset@@ArrowInside\pst@tempg\@empty-\@empty\@nil% - \if@pst\else\@pstrickserr{Bad intermediate arrow specification: #1}\@ehpa\fi% - \fi% -} -% Adapted from \psset@@arrows -\def\psset@@ArrowInside#1-#2\@empty#3\@nil{% - \@psttrue - \def\next##1,#1-##2,##3\@nil{\def\pst@tempg{##2}}% - \expandafter\next\pst@arrowtable,#1-#1,\@nil - \@ifundefined{psas@#2}% - {\@pstfalse\def\psk@ArrowInside{}}% - {\def\psk@ArrowInside{#2}}% -} -% Default value empty -\psset{ArrowInside={}} -% Modified version of \pst@addarrowdef -\def\pst@addarrowdef{% - \addto@pscode{% - /ArrowA { - \ifx\psk@arrowA\@empty - \pst@oplineto - \else - \pst@arrowdef{A} - moveto - \fi - } def - /ArrowB { \ifx\psk@arrowB\@empty \else \pst@arrowdef{B} \fi } def -% DG addition - /ArrowInside { - \ifx\psk@ArrowInside\@empty \else \pst@arrowdefA{Inside} \fi - } def - }% -} -% Adapted from \pst@arrowdef -\def\pst@arrowdefA#1{% - \ifnum\pst@repeatarrowsflag>\z@ /Arrow#1c [ 6 2 roll ] cvx def Arrow#1c\fi - \tx@BeginArrow - \psk@arrowscale - \@nameuse{psas@\@nameuse{psk@Arrow#1}} - \tx@EndArrow% -} -% ArrowInsidePos parameter (default value 0.5) -\define@key[psset]{pst-arrow}{ArrowInsidePos}[0.5]{\pst@checknum{#1}\psk@ArrowInsidePos}% -%\psset{ArrowInsidePos=0.5} -% -% -% Redefinition of the PostScript /Line macro to print the intermediate -% arrow on each segment of the line -% -\define@key[psset]{pst-arrow}{ArrowInsideNo}[1]{\pst@checknum{#1}\psk@ArrowInsideNo}% hv 20031001 -\define@key[psset]{pst-arrow}{ArrowInsideOffset}[0]{\pst@checknum{#1}\psk@ArrowInsideOffset}% hv 20031001 -%\psset{ArrowInsideNo=1,ArrowInsideOffset=0} -% -\def\arrowType@H{H} +%% +%% Reqrite most of the existing macros +%% \pst@def{Line}< NArray n 0 eq not { n 1 eq { 0 0 /n 2 def } if (\psk@ArrowInside) length 0 gt { @@ -421,6 +118,7 @@ }{ ArrowA /n n 2 sub def n { Lineto } repeat } ifelse CP 4 2 roll ArrowB L pop pop } if > % + % Redefinition of the PostScript /Polygon macro to print the intermediate % arrow on each segment of the line \pst@def{Polygon}<{% @@ -678,18 +376,6 @@ /VPutPos { { VPutLines } HPutCurve } def }> % - -\def\resetArrowOptions{% - \def\pst@linetype{0}% - \psset[pst-arrow]{% - hooklength=3mm, hookwidth=1mm, - ArrowFill=true, - ArrowInside={}, ArrowInsidePos=0.5, - ArrowInsideNo=1, ArrowInsideOffset=0, -}} -% -\resetArrowOptions -% \catcode`\@=\PstAtCode\relax % %% END: pst-arrow.tex |