summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/tex4ht/pstricks.4ht
blob: ac2a4fc090a0e1abf690132f5e697a1665cb78bc (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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
% pstricks.4ht (2019-01-23-14:26), generated from tex4ht-4ht.tex
% Copyright 1997-2009 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".
%
% The Current Maintainer of this work
% is the TeX4ht Project <http://tug.org/tex4ht>.
%
% If you modify this program, changing the
% version identification would be appreciated.
\immediate\write-1{version 2019-01-23-14:26}

\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\@undefined\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
   
   \ifx \pst@LaTeX@Setup\:UnDef
      \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%
  \psset@shift{0}% reset value
%  \global\psk@shift\z@% restore value
}

   \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
\fi
\Hinput{pstricks}
\endinput