Debian Codegraph @

texmf-dist/tex/generic/tex4ht/pstricks.4ht

raw
1 % pstricks.4ht (2019-01-23-14:26), generated from tex4ht-4ht.tex
2 % Copyright 1997-2009 Eitan M. Gurari
3 %
4 % This work may be distributed and/or modified under the
5 % conditions of the LaTeX Project Public License, either
6 % version 1.3c of this license or (at your option) any
7 % later version. The latest version of this license is in
8 % http://www.latex-project.org/lppl.txt
9 % and version 1.3c or later is part of all distributions
10 % of LaTeX version 2005/12/01 or later.
11 %
12 % This work has the LPPL maintenance status "maintained".
13 %
14 % The Current Maintainer of this work
15 % is the TeX4ht Project <http://tug.org/tex4ht>.
16 %
17 % If you modify this program, changing the
18 % version identification would be appreciated.
19 \immediate\write-1{version 2019-01-23-14:26}
20
21 \pend:def\pst@picture{\global\let\pst:EndPicture\EndPicture
22 \let\EndPicture=\empty}
23 \expand:after{\let\fi@star}\csname fi\endcsname
24 \NewConfigure{pspicture}{2}
25 \HAssign\ps:level=0
26
27 \def\rput@iv(#1){\pst@killglue \gHAdvance\ps:level by 1
28 \pst@makebox{\gHAdvance\ps:level by -1 \rput@v{#1}}}
29 \def\rput@v#1{\begingroup
30 \use@par
31 \if@star\pst@starbox\fi
32 \pst@makesmall\pst@hbox
33 \pst@rotate\psk@rot\pst@hbox
34 \ifnum \ps:level=0
35 \expandafter\ifx \csname pspicture:dim\endcsname\relax
36 \ht:everypar{}\psput@{#1}\pst@hbox
37 \else
38 \def\psput@cartesian##1{%
39 \hbox to \pst@dimg{{\vbox to \pst@dimh{\vss\box##1}\hss}}}%
40 \global\let\pspicture:dim=\:UnDef
41 \let\sv:leavevmode=\leavevmode
42 \def\leavevmode{%
43 \let\leavevmode=\sv:leavevmode
44 %
45 \let\EndPicture\pst:EndPicture
46 \global\let\pst:EndPicture=\:UnDef
47 \a:pspicture \leavevmode}%
48 \psput@{#1}\pst@hbox\b:pspicture
49 %
50 \fi
51 \else
52 \psput@{#1}\pst@hbox
53 \fi
54 \endgroup \ignorespaces}
55
56 \pend:def\psframebox@ii{\a:pspicture}
57 \append:def\psframebox@ii{\b:pspicture}
58
59 \ifx\psset@linecap\:UnDef
60 \def\endpspicture{%
61 \pst@killglue
62 \endgroup
63 \egroup
64 \ifdim\wd\pst@hbox=\z@\else
65 \:warning{Hidden \string\@pstrickserr
66 {Extraneous space in the pspicture environment}}%
67 \fi
68 \ht\pst@hbox=\pst@dimd
69 \dp\pst@hbox=-\pst@dimb
70 \setbox\pst@hbox=\hbox{%
71 \kern-\pst@dima
72 \ifx\pst@tempa\@undefined\else
73 \advance\pst@dimd-\pst@dimb
74 \pst@dimd=\pst@tempa\pst@dimd
75 \advance\pst@dimd\pst@dimb
76 \lower\pst@dimd
77 \fi
78 \box\pst@hbox
79 \kern\pst@dimc}%
80 \if@star\setbox\pst@hbox=\hbox{\clipbox@@\z@}\fi@star
81 \ifnum \ps:level=0
82 \let\EndPicture\pst:EndPicture
83 \global\let\pst:EndPicture=\:UnDef
84 \a:pspicture\box\pst@hbox\b:pspicture
85 \else
86 \xdef\pspicture:dim{\the\wd\pst@hbox,
87 \the\ht\pst@hbox, \the\ht\pst@hbox}%
88 \box\pst@hbox
89 \fi
90 %
91 \endgroup}
92
93 \else
94
95 \ifx \pst@LaTeX@Setup\:UnDef
96 \def\endpspicture{%
97 \pst@killglue
98 % \global\pst@shift=\psk@shift% in fact of the following endgroup
99 \endgroup
100 \egroup
101 \ifdim\wd\pst@hbox=\z@\else
102 \:warning{Hidden \string\@pstrickserr
103 {Extraneous space in the pspicture environment}}%
104 \fi
105 \ht\pst@hbox=\pst@dimd
106 \dp\pst@hbox=-\pst@dimb
107 \setbox\pst@hbox=\hbox{%
108 \kern-\pst@dima
109 \pst@dimd-\pst@shift
110 \advance\pst@dimd\pst@dimb
111 \lower\pst@dimd%
112 \box\pst@hbox%
113 \kern\pst@dimc}%
114 \if@star\setbox\pst@hbox=\hbox{\clipbox@@\z@}\fi@star
115 \ifnum \ps:level=0
116 \let\EndPicture\pst:EndPicture
117 \global\let\pst:EndPicture=\:UnDef
118 \a:pspicture\box\pst@hbox\b:pspicture
119 \else
120 \xdef\pspicture:dim{\the\wd\pst@hbox,
121 \the\ht\pst@hbox, \the\ht\pst@hbox}%
122 \box\pst@hbox
123 \fi
124 %
125 \endgroup%
126 \psset@shift{0}% reset value
127 % \global\psk@shift\z@% restore value
128 }
129
130 \else
131 \def\endpspicture{%
132 \pst@killglue
133 \global\pst@shift=\psk@shift% in fact of the following endgroup
134 \endgroup
135 \egroup
136 \ifdim\wd\pst@hbox=\z@\else
137 \:warning{Hidden \string\@pstrickserr
138 {Extraneous space in the pspicture environment}}%
139 \fi
140 \ht\pst@hbox=\pst@dimd
141 \dp\pst@hbox=-\pst@dimb
142 \setbox\pst@hbox=\hbox{%
143 \kern-\pst@dima
144 \pst@dimd-\pst@shift
145 \advance\pst@dimd\pst@dimb
146 \lower\pst@dimd%
147 \box\pst@hbox%
148 \kern\pst@dimc}%
149 \if@star\setbox\pst@hbox=\hbox{\clipbox@@\z@}\fi@star
150 \ifnum \ps:level=0
151 \let\EndPicture\pst:EndPicture
152 \global\let\pst:EndPicture=\:UnDef
153 \a:pspicture\box\pst@hbox\b:pspicture
154 \else
155 \xdef\pspicture:dim{\the\wd\pst@hbox,
156 \the\ht\pst@hbox, \the\ht\pst@hbox}%
157 \box\pst@hbox
158 \fi
159 %
160 \endgroup%
161 \global\psk@shift\z@% restore value
162 }
163
164 \fi
165 \fi
166 \Hinput{pstricks}
167 \endinput
168