summaryrefslogtreecommitdiff
path: root/graphics/pictex/postpictex.tex
blob: b70bc1cdafe9ff7753e793adfc3ac7f224c4c6dd (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
% This is postpictex.tex
%    Version 1.1 9/10/87.
%            See section 10 of the PiCTeX manual.
%    Version 1.1b 2021-06-08 extended LaTeX support for picture environment
%            LaTeX Project (with Michael Wichura's permission for the update)
%            add \put and \multiput to the list of commands restored for LaTeX.

% To use the PiCTeX macros under LaTeX, you first need to \input the
% file prepictex.tex, then the main corpus of PiCTeX macros (pictex.tex), 
% and finally this file.  Do not \input the file latexpicobjs.tex.
 
\catcode`@=11 \catcode`!=11
  
% Save meanings of PiCTeX keywords that duplicate LaTeX keywords
\let\!pictexendpicture=\endpicture 
\let\!pictexframe=\frame
\let\!pictexlinethickness=\linethickness
\let\!pictexmultiput=\multiput
\let\!pictexput=\put

% Redefine the PiCTeX \beginpicture macro
\def\beginpicture{%
  \setbox\!picbox=\hbox\bgroup%
  \let\endpicture=\!pictexendpicture
  \let\frame=\!pictexframe
  \let\linethickness=\!pictexlinethickness
  \let\multiput=\!pictexmultiput
  \let\put=\!pictexput
  \let\input=\@@input   % \@@input is LaTeX's saved version of TeX's primitive
  \!xleft=\maxdimen  
  \!xright=-\maxdimen
  \!ybot=\maxdimen
  \!ytop=-\maxdimen}

% Reestablish LaTeX's meaning of \frame. This makes
% PiCTeX's meaning of \frame available only inside a PiCture.
\let\frame=\!latexframe

% Make PiCTeX's meaning of \frame available everywhere in the
% guise of \pictexframe
\let\pictexframe=\!pictexframe

% Now do the same for \linethickness
\let\linethickness=\!latexlinethickness
\let\pictexlinethickness=\!pictexlinethickness

% 2021-06-08 and same for \put and \multiput
\let\put=\!latexput
\let\pictexput=\!pictexput
\let\multiput=\!latexmultiput
\let\pictexmultiput=\!pictexmultiput


% Reset LaTeX's default meaning of \\
\let\\=\@normalcr
\catcode`@=12 \catcode`!=12