summaryrefslogtreecommitdiff
path: root/info/examples/lgc2/5-10-11.ltx
blob: 69b9b90f6c9f9e3c57cf31d93640601deffe37f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
%% 
%%  The LaTeX Graphics Companion, 2ed (first printing May 2007)
%% 
%%  Example 5-10-11 on page 265.
%% 
%%  Copyright (C) 2007 Michel Goossens, Frank Mittelbach, Denis Roegel, Sebastian Rahtz, Herbert Vo\ss 
%% 
%%  It may be distributed and/or modified under the conditions
%%  of the LaTeX Project Public License, either version 1.3
%%  of this license or (at your option) any later version.
%% 
%%  See http://www.latex-project.org/lppl.txt for details.
%% 

\documentclass{ttctexa}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{159.83385pt}

\usepackage{pstricks}
\makeatletter
\edef\pst@arrowtable{\pst@arrowtable,B-B} % add to arrow table
\def\tx@ABox{ABox } %              internal PostScript name ABox
\@namedef{psas@B}{%                internal macro name
  /ABox { %                        PostScript procedure
    CLW mul add dup CLW sub 2 div %heed line width
    /x ED mul %                    save x value
    /y ED %                        y as well
    /z CLW 2 div def %             reserve
    x neg y moveto %               starting point
    x neg CLW 2 div L %            lineto
    x CLW 2 div L  %               lineto
    x y L  %                       lineto
    x neg y L  %                   lineto
    closepath %                    close the corner
    stroke 0 y moveto %            draw and go to line end
  } def
  \psk@bracketlength \psk@tbarsize \tx@ABox% width height ABox
}
\newpsfontdot{CircleMultiply}%  % 196
    [2 0.0 0.0 2 -0.78 -0.7]{Symbol}{<C4>}
\newpsfontdot{CirclePlus}%      % 197
    [2 0.0 0.0 2 -0.78 -0.7]{Symbol}{<C5>}
\@namedef{psas@cm}{\psk@dotsize \psds@CircleMultiply 0 0 Dot}
\@namedef{psas@cp}{\psk@dotsize \@nameuse{psds@CirclePlus} 0 0 Dot}
\makeatother

\StartShownPreambleCommands
\usepackage{pstricks}
% cm, and cp arrows as defined in previous example
% B arrow as defined above
\StopShownPreambleCommands
\begin{document}
\begin{pspicture}[showgrid=true](4,4)
  \psset{arrowscale=3,arrows=B-cp}
  \psline[bracketlength=2](1,1)(4,4)
  \psarc[linecolor=red](0,0){2}{0}{90}
  \psarc[arrowsize=2mm,linecolor=blue]
     {cm-cp}(1,1){2}{20}{70}
\end{pspicture}

\end{document}