summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/tex4ht/pstricks.4ht
blob: 9ac1d040b5a447b1724c4fbfc55e5e8a327ce738 (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% pstricks.4ht                          2008-02-28-20:51 %
% Copyright (C) 1997--2008       Eitan M. Gurari         %
%                                                        %
% This work may be distributed and/or modified under the %
% conditions of the LaTeX Project Public License, either %
% version 1.3c of this license or (at your option) any   %
% later version. The latest version of this license is   %
% in                                                     %
%   http://www.latex-project.org/lppl.txt                %
% and version 1.3c or later is part of all distributions %
% of LaTeX version 2005/12/01 or later.                  %
%                                                        %
% This work has the LPPL maintenance status "maintained".%
%                                                        %
% This Current Maintainer of this work                   %
% is Eitan M. Gurari.                                    %
%                                                        %
% If you modify this program your changing its signature %
% with a directive of the following form will be         %
% appreciated.                                           %
%            \message{signature}                         %
%                                                        %
%                             gurari@cse.ohio-state.edu  %
%                 http://www.cse.ohio-state.edu/~gurari  %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\immediate\write-1{version 2008-02-28-20:51}

\pend:def\pst@picture{\global\let\pst:EndPicture\EndPicture
    \let\EndPicture=\empty}
\expand:after{\let\fi@star}\csname fi\endcsname
\NewConfigure{pspicture}{2}
\HAssign\ps:level=0

\def\rput@iv(#1){\pst@killglue \gHAdvance\ps:level by 1
     \pst@makebox{\gHAdvance\ps:level by -1 \rput@v{#1}}}
\def\rput@v#1{\begingroup
   \use@par
   \if@star\pst@starbox\fi
   \pst@makesmall\pst@hbox
   \pst@rotate\psk@rot\pst@hbox
   \ifnum \ps:level=0
      \expandafter\ifx \csname pspicture:dim\endcsname\relax
         \ht:everypar{}\psput@{#1}\pst@hbox
      \else
         \def\psput@cartesian##1{%
   \hbox to \pst@dimg{{\vbox to \pst@dimh{\vss\box##1}\hss}}}%
\global\let\pspicture:dim=\:UnDef
\let\sv:leavevmode=\leavevmode
\def\leavevmode{%
   \let\leavevmode=\sv:leavevmode
   %
   \let\EndPicture\pst:EndPicture
   \global\let\pst:EndPicture=\:UnDef
   \a:pspicture \leavevmode}%
\psput@{#1}\pst@hbox\b:pspicture
%
      \fi
   \else
      \psput@{#1}\pst@hbox
   \fi
\endgroup \ignorespaces}

\pend:def\psframebox@ii{\a:pspicture}
\append:def\psframebox@ii{\b:pspicture}

\ifx\psset@linecap\:UnDef
   \def\endpspicture{%
\pst@killglue
\endgroup
\egroup
\ifdim\wd\pst@hbox=\z@\else
   \:warning{Hidden \string\@pstrickserr
        {Extraneous space in the pspicture environment}}%
\fi
\ht\pst@hbox=\pst@dimd
\dp\pst@hbox=-\pst@dimb
\setbox\pst@hbox=\hbox{%
\kern-\pst@dima
\ifx\pst@tempa\@empty\else
\advance\pst@dimd-\pst@dimb
\pst@dimd=\pst@tempa\pst@dimd
\advance\pst@dimd\pst@dimb
\lower\pst@dimd
\fi
\box\pst@hbox
\kern\pst@dimc}%
\if@star\setbox\pst@hbox=\hbox{\clipbox@@\z@}\fi@star
\ifnum \ps:level=0
   \let\EndPicture\pst:EndPicture
   \global\let\pst:EndPicture=\:UnDef
   \a:pspicture\box\pst@hbox\b:pspicture
\else
   \xdef\pspicture:dim{\the\wd\pst@hbox,
         \the\ht\pst@hbox, \the\ht\pst@hbox}%
   \box\pst@hbox
\fi
%
\endgroup}

\else
   \def\endpspicture{%
  \pst@killglue
  \global\pst@shift=\psk@shift% in fact of the following endgroup
  \endgroup
  \egroup
  \ifdim\wd\pst@hbox=\z@\else
     \:warning{Hidden \string\@pstrickserr
        {Extraneous space in the pspicture environment}}%
  \fi
  \ht\pst@hbox=\pst@dimd
  \dp\pst@hbox=-\pst@dimb
  \setbox\pst@hbox=\hbox{%
    \kern-\pst@dima
    \pst@dimd-\pst@shift
    \advance\pst@dimd\pst@dimb
    \lower\pst@dimd%
    \box\pst@hbox%
    \kern\pst@dimc}%
  \if@star\setbox\pst@hbox=\hbox{\clipbox@@\z@}\fi@star
  \ifnum \ps:level=0
   \let\EndPicture\pst:EndPicture
   \global\let\pst:EndPicture=\:UnDef
   \a:pspicture\box\pst@hbox\b:pspicture
\else
   \xdef\pspicture:dim{\the\wd\pst@hbox,
         \the\ht\pst@hbox, \the\ht\pst@hbox}%
   \box\pst@hbox
\fi
%
  \endgroup%
  \global\psk@shift\z@% restore value
}

\fi
\Hinput{pstricks}
\endinput