rpms/tetex-tex4ht/devel AlDraTex.sty, NONE, 1.1 AlProTex.sty, NONE, 1.1 DraTex.sty, NONE, 1.1 ProTex.sty, NONE, 1.1 tetex-tex4ht-1.0-prev.patch, NONE, 1.1 tetex-tex4ht-1.0.2006_10_24_0142-nohome.patch, NONE, 1.1 texmf.cnf.patch, NONE, 1.1 .cvsignore, 1.7, 1.8 sources, 1.8, 1.9 tetex-tex4ht.spec, 1.8, 1.9 tex4ht-env.patch, 1.1, NONE
Patrice Dumas (pertusus)
fedora-extras-commits at redhat.com
Fri Nov 3 00:41:57 UTC 2006
Author: pertusus
Update of /cvs/extras/rpms/tetex-tex4ht/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15834
Modified Files:
.cvsignore sources tetex-tex4ht.spec
Added Files:
AlDraTex.sty AlProTex.sty DraTex.sty ProTex.sty
tetex-tex4ht-1.0-prev.patch
tetex-tex4ht-1.0.2006_10_24_0142-nohome.patch texmf.cnf.patch
Removed Files:
tex4ht-env.patch
Log Message:
* Fri Nov 3 2006 Patrice Dumas <pertusus at free.fr> 1.0.2006_10_28_1705-1
- update
- use debian patchset
- remove the patch modifying paths in tex4ht.env, it is unneeded with
kpathsee
--- NEW FILE AlDraTex.sty ---
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% v 1.7
% AlDraTex %
% Copyright (C) 1992 Eitan M. Gurari %
% %
% This program can redistributed and/or modified under %
% the terms of the LaTeX Project Public License %
% Distributed from CTAN archives in directory %
% macros/latex/base/lppl.txt; either version 1 of the %
% License, or (at your option) any later version. %
% %
% However, you are allowed to modify this program %
% without changing its name, if you modify its %
% signature. Changes to the signature can be introduced %
% with a directive of the form %
% \message{signature} %
% %
% gurari at cse.ohio-state.edu %
% http://http://www.cse.ohio-state.edu/~gurari/ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\expandafter\edef\csname :RestoreCatcodes\endcsname{%
\catcode`\noexpand\noexpand\noexpand \^=\the\catcode`\^%
}
\catcode`\^=7
\expandafter\edef\csname :RestoreCatcodes\endcsname{%
\csname :RestoreCatcodes\endcsname
\catcode`\noexpand \_=\the\catcode`\_%
\catcode`\noexpand :=\the\catcode`:%
\catcode`\noexpand &=\the\catcode`&%
\catcode`\noexpand \#=\the\catcode`\#%
\catcode`\noexpand \^^M=\the\catcode`\^^M%
\let\expandafter\noexpand
\csname:RestoreCatcodes\endcsname=\noexpand\undefined}
\catcode`\:=11
\ifx \AlDraTex\:undefined \def\AlDraTex{chart,diagram} \fi
\newif\if:circle
\newif\if:option
\def\:CheckOption#1{ \def\:temp{#1}
\:optionfalse
\expandafter\:GetOptions\AlDraTex,,// }
\def\:GetOptions#1,#2//{ \def\:next{#1}
\ifx \:next\empty
\else \ifx \:temp\:next \:optiontrue \let\:next=\relax
\else \def\:next{\:GetOptions#2//}
\fi \fi \:next }
\def\:DefineExt#1{%
\Define#1{\begingroup \:DraCatCodes
\csname .:\string#1\endcsname}%
\expandafter\Define\csname .:\string#1\endcsname}
\IntVar\:C \IntVar\:Ca
\IntVar\:Cb \IntVar\:Cc \newtoks\:tk
\DecVar\Va \DecVar\Vb
\DecVar\:Vc \DecVar\:Vd \DecVar\:Ve
\Define\:GetX(2){\Va=#1;}
\Define\:GetY(2){\Vb=#2;}
\Define\:GetXY(2){\Va=#1;\Vb=#2;}\Define\:GetExit(2){
\:Vc=#1; \IF \LtDec(\:Vc,0) \THEN \:Vc=-\:Vc; \FI
\:Vd=#2; \IF \LtDec(\:Vd,0) \THEN \:Vd=-\:Vd; \FI
\IF \LtDec(\:Vd,\:Vc) \THEN \:Vd=\:Vc; \FI
\Va=#1; \Vb=#2;
\IF \GtDec(\:Vd,0) \THEN \Va/\:Vd; \Vb/\:Vd; \FI }
\Define\:GetEdgeFront(1){\def\:EdgeFront{#1}}
\Define\:Count(1){\:C+1;}\let\Defend=\noexpand
\def\KeepSpaces{\def\:Spaces{\catcode`\ =10 \relax}}
\def\RemoveSpaces{\let\:Spaces=\relax}
\RemoveSpaces\def\:edef#1#2{\edef\:Temp{\noexpand\Define
\noexpand#1{#2}}\:Temp }
\:CheckOption{chart}\if:option
\edef\AlDraTex{\AlDraTex,pie,bar,xy}
\else \:CheckOption{pie}\if:option
\edef\AlDraTex{\AlDraTex,chart}
\else \:CheckOption{xy}\if:option
\edef\AlDraTex{\AlDraTex,chart}
\else \:CheckOption{bar}\if:option
\edef\AlDraTex{\AlDraTex,chart}
\fi\fi\fi\fi
\:CheckOption{chart}\if:option
\def\Compute#1(#2){\def\NextDefine{\::Comp#1(#2)}\Define\:Comp(#2)}
\def\::Comp#1(#2){\Define\:Temp(#2){}\ifx \:Temp\:Comp
\let\:Compute=\empty
\else \Define\:Compute(1){\:Comp(##1)\:Return#1}\fi}
\Compute\I(1){}\Define\:ChooseColor(1){
\IF \EqDec(#1,1) \THEN \SetBrush(0,0){}
\ELSE\IF \EqDec(#1,2) \THEN
\SetBrush(2pt\du,1pt\du){ \PenSize(0.2pt)
\Units(1pt,1pt) \Move(0,-0.37) \Line(0,0.75)}
\ELSE\IF \EqDec(#1,3) \THEN
\SetBrush(1pt\du,2pt\du){ \PenSize(0.2pt)
\Units(1pt,1pt) \Move(-0.37,0) \Line(0.75,0)}
\ELSE\IF \EqDec(#1,4) \THEN
\SetBrush(2pt\du,2pt\du){ \PenSize(0.2pt)
\Units(1pt,1pt){\Move(-1,0)\Line(2,0)}
\Move(0,-1)\Line(0,2)}
\ELSE\IF \EqDec(#1,5) \THEN
\SetBrush(5pt\du,2pt\du){ \PenSize(0.2pt)
\Units(1pt,1pt) \Move(0,-0.37) \Line(0,0.75)}
\ELSE\IF \EqDec(#1,6) \THEN
\SetBrush(2pt\du,5pt\du){ \PenSize(0.2pt)
\Units(1pt,1pt) \Move(-0.37,0) \Line(0.75,0)}
\ELSE
\SetBrush(#1pt\du,#1pt\du){
\Units(1pt,1pt)\PaintRect(0.37,0.37)}
\FI\FI\FI\FI\FI\FI}
\fi
\:CheckOption{pie}\if:option
\Define\PieChart{\begingroup \:Spaces \:PieChart}
\Define\:PieChart(1){\endgroup
\Table\:Temp{#1}
\:Ve=0; \:Temp(0,99){\:total}
\MarkLoc(o:) \MoveF(\:PieR) \MarkLoc(b:)
\DSeg\:Vd(o:,b:) \MoveToLoc(o:)
\:C=0; \:Temp(0,99){\:InsertSlice} } \Define\PieChartSpec(1){
\IF \EqText(,#1) \THEN\ELSE \:PieSpec(#1)
\FI \:PieCol}
\Define\:PieSpec(3){
\:edef\:PieR{#2} \:edef\:LblDist{#3}
\IF \EqInt(1,#1) \THEN
\def\:ReturnComp##1{\:slice(\Val##1,\Val##1)}
\Define\:total(1){
\ifx \:Compute\empty \:Ve+##1;
\else \let\:Return=\:ReturnAdd \:Compute(##1)\fi}
\Define\:InsertSlice(1){
\ifx \:Compute\empty \:slice(##1,##1)
\else \let\:Return=\:ReturnComp\:Compute(##1) \fi}
\ELSE
\def\:ReturnComp##1{\edef\:tempa{\Val##1}}
\Define\:total(2){
\ifx \:Compute\empty \:Ve+##1;
\else \let\:Return=\:ReturnAdd \:Compute(##1)\fi}
\Define\:InsertSlice(2){
\ifx \:Compute\empty \:slice(##1,##2)
\else \let\:Return=\:ReturnComp\:Compute(##1)
\:slice(\:tempa,##2) \fi}
\FI }
\def\:ReturnAdd#1{\:Ve+#1;}\Define\:slice(2){ \:C+1; \Va=#1; \Va/\:Ve;
\Va*360; {
\Va/2; \Rotate(\Val\Va) \:DetachSlice
\MarkLoc(o:)
\MoveF(1pt\du) \MarkLoc(x:) \CSeg\:SetEnEx(x:,o:)
\MoveToLoc(o:) \MoveF(\:LblDist) \:AdjChatLbl(0,99){\:MvLbl}
\SliceText(--#2--) \MoveToLoc(o:)
\Vb=\:Vd; \Vb+\Va; \Vb+\Va;
\DrawOvalArc(\:PieR,\:PieR)(\Val\:Vd,\Val\Vb)
\:Ca=0; \:PieColors(0,99){\:Ca+1;\:PaintPie}
{\RotateTo(\Val\:Vd) \LineF(\:PieR)}
\RotateTo(\Val\Vb) \LineF(\:PieR)
} \Rotate(\Val\Va) \:Vd+\Va; }
\Define\:SetEnEx(2){\:Vc=#1; \Vb=#2; \EntryExit(\Val\:Vc,\Val\Vb,0,0)}
\Define\DetachSlices(2){
\IF \EqInt(#2,0) \THEN
\Define\:DetachSlice{}
\ELSE\IF \EqText(,#1) \THEN
\def\:DetachSlice{ \MoveF(#2) }
\ELSE
\Table\:DSlice{#1}
\Define\:OptDSlice(1){
\IF \EqInt(\:C,##1) \THEN
\MoveF(#2)
\FI}
\Define\:DetachSlice{ \:DSlice(0,99){\:OptDSlice} }
\FI \FI } \Define\MovePieLabels(1){
\IF \EqText(,#1) \THEN
\Table\:AdjChatLbl{0,0,0}
\ELSE \Table\:AdjChatLbl{0,0,0} \FI}
\Define\:MvLbl(3){
\IF \EqInt(\:C,#1) \THEN \Move(#2,#3) \FI }
\:DefineExt\:PieCol(1){\endgroup
\IF \EqText(,#1) \THEN
\ELSE \Table\:PieColors{#1} \FI}
\Define\:PaintPie(1){{
\IF \EqInt(\:C,\:Ca) \THEN
\IF \GtDec(#1,0) \THEN
\:ChooseColor(#1)
\:Ve=\:PieR;
\IF \GtDec(\Va,90) \THEN
\Va=\:Vd; \Va+181;
\PaintOvalArc(\Val\:Ve,\Val\:Ve)(\Val\:Vd,\Val\Va)
\Va-1; \:Vd=\Va; \FI
\PaintOvalArc(\Val\:Ve,\Val\:Ve)(\Val\:Vd,\Val\Vb)
\RotateTo(\Val\Vb) \MoveF(\:PieR) \MarkLoc(a:)
\MoveToLoc(o:) \RotateTo(\Val\:Vd) \MoveF(\:PieR)
\MarkLoc(b:) \PaintQuad(o:,o:,a:,b:)
\MoveF(-0.5pt\du) \MarkLoc(b:) \MoveToLoc(o:)
\Rotate(1) \MoveF(\:PieR) \MarkLoc(b':)
\MoveToLoc(o:) \RotateTo(\Val\Vb) \MoveF(\:PieR)
\MoveF(-0.5pt\du) \MarkLoc(a:) \MoveToLoc(o:)
\Rotate(-1) \MoveF(\:PieR) \MarkLoc(a':)
\PaintQuad(a:,a':,b':,b:)
\FI \FI }}\Define\Legend(1){ \AlignGrid(-1,\:LgEn)
\PictNode(2){ \EntryExit(-1,\:LgEn,0,0)
\DrawRect(\:LgSzX,\:LgSzY)
[...1863 lines suppressed...]
\MarkLoc(a:) \MarkXLoc(IN:)
\MarkXLoc(INc:)
\MoveToLoc(o:) \CSeg\:MoveHV(o:,b:)
\MarkXLoc(OUT:) \MarkLoc(b:)
\MoveToLoc(o:) \CSeg\:MoveHV(o:,-12:) \MarkLoc(-12:)
\MoveToLoc(a:) \CSeg\:DistH(a:,-12:)
\IF \LtDec(\Va,0) \THEN
\ifx H\:TreeDir
\else \Move(\Val\Va,0) \fi
\ELSE
\ifx H\:TreeDir \Move(0,\Val\Va)
\else \fi
\FI
\MarkXLoc(INx:)
\MoveToLoc(o:) \CSeg\:MoveHV(o:,OUTx:) \MarkLoc(OUTx:)
\MoveToLoc(b:) \CSeg\:DistH(b:,OUTx:)
\IF \GtDec(\Va,0) \THEN
\ifx H\:TreeDir
\else \Move(\Val\Va,0) \fi
\ELSE
\ifx H\:TreeDir \Move(0,\Val\Va)
\else \fi
\FI
\MarkXLoc(OUTx:) }
\Define\:Clnd(2){
\MarkLoc(o:) \:TreeEnEx \:C=#1; \:LeafNode(#1..\Val\:Ca,#2)
\ifx H\:TreeDir
\MoveToNode(#1..\Val\:Ca,0,1) \MarkLoc(IN:)
\MoveToNode(#1..\Val\:Ca,0,-1)
\else
\MoveToNode(#1..\Val\:Ca,-1,0) \MarkLoc(IN:)
\MoveToNode(#1..\Val\:Ca,1,0) \fi
\MarkLoc(OUT:) \MoveToLoc(o:) \CSeg\:MoveHV(o:,IN:)
\MarkXLoc(IN:) \MarkXLoc(INc:) \MarkXLoc(INx:)
\MoveToLoc(o:) \CSeg\:MoveHV(o:,OUT:)
\MarkXLoc(OUT:) \MarkXLoc(OUTx:) }
\Define\TreeAlign(3){ \let\:TreeDir=#1
\def\:EntryX{#2} \def\:EntryY{#3} \:AlignTree}
\Define\:AlignTree(3){
\def\:AlignA{#1} \def\:AlignB{#2} \def\:AlignC{#3}}
\TreeAlign(V,0,0)(0,0,0)
\Define\:trcTree{\:TrcDiag{\immediate\write16{\space
\:parmB..\Val\:Ca,\Val\:Cc..\Val\:Cb}}}
\Define\:ChildLoc(2){
\IF \LtDec(#1,0) \THEN \Va=-#1;
\ELSE \Va= #1; \FI
\IF \LtDec(\Va,100) \THEN
\::ChildLoc(#1,#2)
\ELSE \Va/100; \:C[\Va]; \Vb=#1;
\IF \GtDec(#1,0) \THEN \Vb-\:C 00;
\ELSE \Vb+\:C 00; \FI
\edef\:Temp{\noexpand\::ChildLoc
(\Val\Vb,-\Val\:C2:,-\Val\:C1:,\Val\:C1:,\Val\:C2:)}\:Temp
\FI } \Define\::ChildLoc(5){
\IF \LtDec(#1,-2) \THEN
\MoveToLoc(#2) \:MoveH(#1,#1)
\ELSE \IF \GtDec(#1,2) \THEN
\MoveToLoc(#4) \:MoveH(#1,#1)
\ELSE \IF \LtDec(#1,-1) \THEN
\MoveToLoc(#3) \Va=#1; \Va+1;
\CSeg[\Val\Va]\Move(#2,#3)
\ELSE \IF \GtDec(#1,1) \THEN
\MoveToLoc(#4) \Va=#1; \Va-1;
\CSeg[\Val\Va]\Move(#4,#5)
\ELSE \MoveToLoc(#3)
\CSeg[0.5]\Move(#3,#4) \:MoveH(#1,#1)
\FI \FI \FI \FI}\def\:GetIx#1..#2//{\:Ca=#1;\:Cb=#2;}
\Define\::MoveToInv(3){
\Indirect{\let\:temp=}<#1.mvto>
\expandafter\ifx\:temp\MoveToInv
\:GetIx#1// \ifx H\:TreeDir \:Cb-#3; \else \:Cb-#2; \fi
\edef\:Temp{\noexpand\MoveToInv(\Val\:Ca..\Val\:Cb,
\ifx H\:TreeDir 0,#3 \else -#2,0 \fi)}
\expandafter\:Temp
\ELSE
\ifx H\:TreeDir \Indirect<#1.mvto>(#1,0,#3)
\else \Indirect<#1.mvto>(#1,-#2,0) \fi
\FI }
\def\MoveToInv{\:MoveToInv}
\let\:MoveToInv=\MoveToRect \Define\::MergTree{
\edef\:Temp{\DoReg=\the\DoReg\relax}
\Table\:tempa{\:frL}
\Table\:tempb{\:frR}
\:tempa(0,0){\:left}
\:tempb(0,0){\:right}
\IF \GtInt(\:dpR,\:dpL) \THEN
\:both(\:dpL) \:DoReg=\:dpL \advance\:DoReg by 1\relax
\:tempb(\:DoReg,\:dpR){\:copy}
\let\:dpL=\:dpR
\ELSE
\:both(\:dpR)
\IF \GtInt(\:dpL,\:dpR) \THEN
\:DoReg=\:dpR \advance\:DoReg by 1\relax
\:tempa(\:DoReg,\:dpL){\:copy}
\FI
\FI \:Temp } \Define\:copt(3){\::copt(#3,)}
\Define\::copt(2){
\IF \EqText(#1,C) \THEN
\let\:MergTree=\::MergTree \FI }
\Define\:MeasureRow(3){
\:TrcDiag{{ \:tk={#1,#2,#3}
\immediate\write16{\Val\:C..\Val\:Ca\space\space\the\:tk}}}
\IF \EqInt(#2,0) \THEN
\FigSize\Va\Vb{\:LeafNode(x,#3)}
\ELSE \FigSize\Va\Vb{\:TreeNode(x,#3)} \FI
\expandafter\expandafter\expandafter\:tempb
\expandafter{\:tempa &}
\edef\:tempa{\the\:tk #2,\Val\Va,\Val\Vb}
\IF \LtDec(\:Vc,\:tempc) \THEN \:Vc=\:tempc; \FI }
\Define\:AddVerTreeSp(1){
\:Ca+1; \Indirect<y.\Val\:Ca>+#1;
\Va=#1; \Va*\:TreeEdgeSpec; \Indirect<x.\Val\:Ca>+\Va; }
\:DefineExt\TreeSpace(3){\endgroup
\IF \EqText(D,#1) \THEN
\def\:OutOutx{OUT:} \def\:InInx{IN:} \FI
\IF \EqText(C,#1) \THEN
\def\:OutOutx{OUT:} \def\:InInx{INc:}
\let\:Cspace=\:InInx \FI
\IF \EqText(S,#1) \THEN
\def\:OutOutx{OUTx:} \def\:InInx{INx:} \FI
\:edef\:HorTreeSp{#2}
\:edef\:VerTreeSp{#3} }
\TreeSpace(S,10,20)\:DefineExt\AdjTree(1){\endgroup
\IF \EqText(#1,) \THEN \Table\:TrSp{,,}
\ELSE \Table\:TrSp{#1} \FI }
\AdjTree()\Define\:unl(3){
\IF \EqText(#1,L) \THEN
\IF \EqInt(\:Cc,#2) \THEN \TreeSpace(#3,0) \FI
\ELSE \IF \EqText(#1,N) \THEN
\:edef\:Temp{\noexpand\EqText(\Val\:Cc..\Val\:Ca,#2)}
\IF \:Temp \THEN \TreeSpace(#3,0) \FI
\FI \FI}\Define\:spbn(3){
\IF \EqText(#1,B) \THEN
\:edef\:Temp{\noexpand\EqText(\Val\:Cc..\Val\:Cb,#2)}
\IF \:Temp \THEN \:MoveH(#3,#3)
\FI\FI}\Define\:lcalg(3){
\IF \EqText(#1,A) \THEN
\:edef\:Temp{\noexpand\EqText(\Val\:C..\Val\:Ca,#2)}
\IF \:Temp \THEN
\:xalg(#3)
\FI\FI}
\Define\:xalg(2){ \def\:EntryX{#1} \:AlignTree(#2) }
\Define\:mvpr(3){
\IF \EqText(#1,M) \THEN
\:edef\:Temp{\noexpand\EqText(\Val\:C..\Val\:Ca,#2)}
\IF \:Temp \THEN \:MoveH(#3,-#3)
\FI\FI}\Define\TreeEdgeSpec(1){\:edef\:TreeEdgeSpec{#1}}
\TreeEdgeSpec(0.5) \def\:ChkInv{\MoveToInv}
\Define\:Temp{
\def\:MvToDivider##1..##2..{
\ifx H\:TreeDir \Indirect{\Move(\Val}<x.##1>,0)
\else \Indirect{\Move(0,-\Val}<x.##1>) \fi }
}\:Temp \Define\TreeEdge(2){
\ifx H\:TreeDir \HHEdge(#1,#2,EdgeGuide)
\else \VVEdge(#1,#2,EdgeGuide) \fi }
\Define\:AddNodesAddr(1){
\Define\:temp{\gdef\:GetNodesAddr}
\expandafter\expandafter\expandafter
\:temp\expandafter{\:GetNodesAddr & #1 }}
\Define\:SubTreeAddrs{
\Table\:AddrPoly{ \:GetNodesAddr}
\:AddrPoly(\Val\:AddrCount,999){\:AddrCount+1;\:RecordAddr} }
\Define\:RecordAddr(1){\MoveToLoc(#1) \MarkXLoc(#1)
\MoveToLoc(#1;:11) \MarkXLoc(#1;:11)}
\IntVar\:AddrCount\TreeSpec(\Node)()(\TreeEdge)
\fi
\let\if:option=\:undefined
\let\:CheckOption=\:undefined
\let\:GetOptions=\:undefined
\let\AlDraTex=\:undefined
\def\:aldwarn#1#2{\immediate
\write16{---AlDraTeX warning--- \ifcase #1
insufficient space for arrow head %0
\or \string\Tree(too many values)(...) %1
\or edge from node #2 to itself %2
\or #2 not a grid point %3
\or too many entries in (#2) %4
\or too many rows: \Val\:C %5
\or row \Val\:C\space has too many columns: \Val\:Ca %6
\or \Val\:C\space(>5) entries in \string\BarChartSpec %7
\or more than one bar in \string\BarChartSpec(\the\:tk) %8
\or no font for \string\NewCIRCNode, trying `\string
\font\string\CIRC=lcircle10 scaled\string\magstep5' %9
\or \string\PutNode(#2)? %10
\or \string\GridDiagram(#2)? less than 2 rows/columns %11
\fi}}
\:RestoreCatcodes \endinput
--- NEW FILE AlProTex.sty ---
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% AlProTex.sty 2004-06-18-18:54 %
% Copyright (C) 1992--2004 by Eitan M. Gurari %
% %
% This program can redistributed and/or modified under %
% the terms of the LaTeX Project Public License %
% Distributed from CTAN archives in directory %
% macros/latex/base/lppl.txt; either version 1 of the %
% License, or (at your option) any later version. %
% %
% However, you are allowed to modify this program %
% without changing its name, if you modify its %
% signature. Changes to the signature can be introduced %
% with a directive of the form %
% \message{signature} %
% %
% gurari at cse.ohio-state.edu %
% http://www.cse.ohio-state.edu/~gurari %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\immediate\write-1{version 2004-06-18-18:54}
\expandafter\edef\csname :RestoreCatcodes\endcsname{%
\catcode`\noexpand\noexpand\noexpand \^=\the\catcode`\^%
\catcode`\noexpand\noexpand\noexpand \_=\the\catcode`\_%
}
\catcode`\^=7 \catcode`\_=8
\expandafter\edef\csname :RestoreCatcodes\endcsname{%
\csname :RestoreCatcodes\endcsname
\csname du:cc\endcsname
\catcode`\noexpand "=\the\catcode`\"%
\catcode`\noexpand |=\the\catcode`\|%
\catcode`\noexpand :=\the\catcode`:%
\catcode`\noexpand @=\the\catcode`@%
\catcode`\noexpand -=\the\catcode`-%
\catcode`\noexpand +=\the\catcode`+%
\catcode`\noexpand /=\the\catcode`/%
\catcode`\noexpand .=\the\catcode`.%
\catcode`\noexpand \^^M=\the\catcode`\^^M%
\catcode`\noexpand \^^I=\the\catcode`\^^I%
\catcode`\noexpand \%=\the\catcode`\%%
\let\expandafter\noexpand
\csname:RestoreCatcodes\endcsname=\noexpand\undefined}
\catcode`\@=11 \catcode`\:=11 \catcode`\"=12 \catcode`\|=12
\def\TagLine[#1]{} \def\ResetLineCount{}
\def\RefLine[#1]{} \def\ShowLineCount{}
\def\HideLineCount{} \def\PauseLineCount{}
\def\ContLineCount{} \def\:InitAlProTex#1,#2//{
\def\:InitAlProTex{#1}%
\let\:ModifyOutputCodeO=\ModifyOutputCode
\def\ModifyOutputCode{\def\Extension{#1}\:ModifyOutputCodeO}
\ifx \html:addr\:UnDeF \def\AlProTex{#2}\else
\ifx \html:addr\empty \def\AlProTex{#2}\else
\def\AlProTex{html,#2}\fi \fi}
\expandafter\:InitAlProTex\AlProTex,//
\def\:temp{\csname newif\endcsname}
\expandafter\ifx \csname :Optionfalse\endcsname\relax
\expandafter\:temp \csname if:Option\endcsname
\fi
\def\:CheckOption#1{ \def\:temp{#1}
\:Optionfalse
\expandafter\:GetOptions\AlProTex,,// }
\def\:GetOptions#1,#2//{ \def\:next{#1}
\ifx \:next\empty
\else \ifx \:temp\:next \:Optiontrue \let\:next=\relax
\else \def\:next{\:GetOptions#2//}
\fi \fi \:next }
\def\:CntrlChar{`\\}
\catcode`\|=0 |catcode`|\=12
|def|:notex{\}
|catcode`|\=0 |catcode`||=12
\def\:temp{ \catcode`\@=12
\def\:temp##1{\catcode`\@=11
\:CheckOption{##1}} \:temp}
\:temp{@}
\if:Option \def\:CntrlChar{`\@}
\catcode`\@=12
\def\:notex{@}
\catcode`\@=11
\let\:ModifyAppendCodeII=\ModifyAppendCode
\let\:ModifyShowCodeII=\ModifyShowCode
\let\:ModifyOutputCodeII=\ModifyOutputCode
\def\ModifyAppendCode{\catcode`\@=0 \catcode`\\=12
\:ModifyAppendCodeII}
\def\ModifyOutputCode{\def\@{@}\:ModifyOutputCodeII}
\def\ModifyShowCode#1{\:ModifyShowCodeII{#1}\def\@{\char64 }}
\else \ifx \:ModifyAppendCodeII\:undefined
\:CheckOption{|} \if:Option
\def\:CntrlChar{`\|}
\def\:notex{|}
\let\:ModifyAppendCodeII=\ModifyAppendCode
\let\:ModifyShowCodeII=\ModifyShowCode
\let\:ModifyOutputCodeII=\ModifyOutputCode
\def\ModifyAppendCode{\catcode`\|=0 \catcode`\\=12
\:ModifyAppendCodeII}
\def\ModifyOutputCode{\def\|{|}\:ModifyOutputCodeII}
\def\ModifyShowCode#1{\:ModifyShowCodeII{#1}\def\|{\char124 }}
\else \ifx \:ModifyAppendCodeII\:undefined
\:CheckOption{`} \if:Option
\def\:CntrlChar{`\`}
\def\:notex{`}
\let\:ModifyAppendCodeII=\ModifyAppendCode
\let\:ModifyShowCodeII=\ModifyShowCode
\let\:ModifyOutputCodeII=\ModifyOutputCode
\def\ModifyAppendCode{\catcode`\`=0 \catcode`\\=12
\:ModifyAppendCodeII}
\def\ModifyOutputCode{\def\`{`}\:ModifyOutputCodeII}
\def\ModifyShowCode#1{\:ModifyShowCodeII{#1}\def\`{\char96 }}
\else \ifx \:ModifyAppendCodeII\:undefined
\:CheckOption{?} \if:Option
\def\:CntrlChar{`\?}
\def\:notex{?}
\let\:ModifyAppendCodeII=\ModifyAppendCode
\let\:ModifyShowCodeII=\ModifyShowCode
\let\:ModifyOutputCodeII=\ModifyOutputCode
\def\ModifyAppendCode{\catcode`\?=0 \catcode`\\=12
\:ModifyAppendCodeII}
\def\ModifyOutputCode{\def\?{?}\:ModifyOutputCodeII}
\def\ModifyShowCode#1{\:ModifyShowCodeII{#1}\def\?{\char63 }}
\fi \fi \fi \fi \fi \fi \fi\:CheckOption{xref} \if:Option
\csname newread\endcsname\sdx:file
\immediate\openin\sdx:file=\jobname.sdx
\csname newwrite\endcsname\cdx:file
\immediate\openout\cdx:file=\jobname.cpg
\let\xref:OutputCode=\OutputCode
\def\OutputCode#1{%
{\Comment{ startcodefragment}{//}%
\let\ProTexMssg=\:gobble
\let\xref:ModifyOutputCode=\ModifyOutputCode
\def\wrt:index##115{\immediate\write\cdx:file }%
\def\ModifyOutputCode##1{\xref:ModifyOutputCode{##1}\bgroup
\def\relax####115####215{\egroup
\expandafter\wrt:index\:WriteCode
}}%
\xref:OutputCode#1}%
\xref:OutputCode#1}
\expandafter\ifx \csname tmp:cnt\endcsname\relax
\csname newcount\endcsname\tmp:cnt
\fi
\def\change:cats#1#2#3{%
\tmp:cnt#1
\def\no::catcodes{%
\catcode\tmp:cnt#3
\ifnum\tmp:cnt<#2
\advance\tmp:cnt 1 \expandafter\no::catcodes
\fi }%
\no::catcodes }
\def\scan:token{\futurelet\:next\check:ch}
\def\check:ch{\ifx \:next\par \expandafter\end
\else \expandafter\scan:ch\fi}
\def\scan:ch#1{\relax
\ifx #1\egroup \index:tok \expandafter\egroup\else
\ifcat #1a%
\ifx \index:tok\empty
\change:cats{48}{57}{11}% 0--9
\fi
\edef\index:tok{\index:tok#1}%
\ifx \index:tok\start:comment
\let\index:tok=\empty \let~=\scan:comment
\change:cats{48}{57}{12}% 0--9
\fi
\else
\change:cats{48}{57}{12}% 0--9
\if \index:tok\empty \else
\write:index{1
\sp:id\index:id \space1 \l:idel\index:tok\r:idel }%
\write:index{2
\l:idel\index:tok\r:idel \space \sp:id\index:id }%
\fi
\let\index:tok=\empty
\fi \expandafter~\fi}
\def\sp:id#1{%
\ifnum #1<10000 \space\fi
\ifnum #1<1000 \space\fi
\ifnum #1<100 \space\fi
\ifnum #1<10 \space\fi
#1}
\catcode`\@=0 \catcode`\\=12 @relax
@:CheckOption{html} @if:Option
@def at scan:comment#1\<#2\>{%
@def at index:tok{#2}%
@afterassignment at exit:comment at tmp:cnt=}
@else
@def at scan:comment#1\<#2\>.{%
@def at index:tok{#2}%
@afterassignment at exit:comment at tmp:cnt=}
@fi
@catcode`@\=0 \catcode`\@=11
\def\start:comment{startcodefragment}
\def\exit:comment#1//{\def\:temp{#1}%
\ifx \:temp\open:comment
\index:push
\edef\index:level{I\index:level}%
\ifx \prev:comment\index:tok \else
\code:index{}%
\fi
\expandafter\edef\csname L \index:level\endcsname{%
\expandafter\ifx \csname L \index:level\endcsname\relax \else
\csname L \index:level\endcsname,
\fi \the\tmp:cnt
}%
\let\prev:dir=u%
\let\prev:comment=\index:tok%
\else
\code:index{I}%
\edef\index:level{\expandafter\:gobble\index:level}%
\let\prev:dir=d%
\index:pop\index:pop\index:push
\fi
\let\index:tok=\empty \edef\index:id{\the\tmp:cnt}%
\let~=\scan:token ~}
\def\open:comment{...}
\def\index:id{0}
\def\index:level{}
\let\prev:dir=f
\def\:gobble#1{}
\def\index:push{\edef\pd:mem{\the\tmp:cnt,\pd:mem}}
\def\index:pop{\expandafter\do:pop\pd:mem//}
\def\do:pop#1,#2//{%
\if !#1!\tmp:cnt=-1 \else \tmp:cnt=#1\def\pd:mem{#2}\fi}
\def\pd:mem{,}
\def\code:index#1{%
\if d\prev:dir
\bgroup
\edef\index:tok{\l:idel\prev:comment\r:idel\space /\the\tmp:cnt/%
\expandafter\ifx \csname L #1\index:level\endcsname\relax \else
, \csname L #1\index:level\endcsname
\fi}%
\write:index{3 \index:tok }%
\expandafter\ifx \csname L #1\index:level\endcsname\relax \else
\edef\:tmp{\noexpand\derive:index \space
\csname L #1\index:level\endcsname,,}\:tmp
\fi
\egroup
\expandafter\let\csname L #1\index:level\endcsname=\:UnDe
\fi
}
\def\derive:index#1,{%
\if !#1!\else
\write:index{1\sp:id{#1} 2
\index:tok}\expandafter\derive:index\fi}
\def\write:index{\immediate\write\cdx:file }
\def\l:idel{<}
\def\r:idel{>}
\def\CodeIndex{%
\immediate\closeout\cdx:file \def\read:sdx{%
\ifeof\sdx:file \else
\immediate\read\sdx:file to\sdx:in \sdx:in
\expandafter\read:sdx
\fi
}\noindent\vrule\vbox{\tt
\hsize=0.8\hsize
\rightskip=3em plus 4em
\leftskip=3em
\parindent=0pt
\ifnum \index:typ<4
\sdx:in \fi
\read:sdx
}%
\immediate\closein\sdx:file
%
\immediate\openout\cdx:file=\jobname.cdx
\bgroup
\change:cats{0}{255}{12}%
\change:cats{97}{122}{11}% a--z
\change:cats{65}{90}{11}% A--Z
\change:cats{95}{95}{11}% _
\let\index:tok=\empty \let~=\scan:token
\expandafter~\input \jobname.cpg \egroup
\immediate\write16{-- Have \jobname.cdx processed
into \jobname.sdx --}%
}%
\let\xref:ModifyShowCode=\ModifyShowCode
\def\ModifyShowCode#1{%
\xref:ModifyShowCode{#1}%
\let\xref:ModifyShowLastCode=\ModifyShowLastCode
\def\ModifyShowLastCode{\xref:ModifyShowLastCode{#1}%
\def\:BackTitle{\noindent\vrule\vtop{%
\tt
\hsize=0.8\hsize
\rightskip=3em plus 4em
\leftskip=3em
\parindent=0pt
--\the\:CodeNumber--: \small:index
}}}}
\def\small:index{%
\ifnum \:CodeNumber<\index:num \else
\sdx:in
\ifeof\sdx:file
\def\index:num{1000000}\gdef\index:typ{4}%
\else
\immediate\read\sdx:file to\sdx:in
\expandafter\get:typ \sdx:in //%
\fi
\expandafter\small:index
\fi}
\def\get:typ#1 {%
\gdef\index:typ{#1}%
\ifnum #1>1 \def\index:num{1000000}\expandafter\id:gobble
\else \expandafter\get:nm\fi}
\def\id:gobble#1//{}
\def\get:nm#1 #2//{\def\index:num{#1}}
\def\index:num{0}
\let\sdx:in=\empty
\fi
\:CheckOption{basic} \if:Option
\def\AlProTex{[[]],<<<>>>,list,title,ClearCode}
\def\:temp{\catcode`\`=12}
\catcode`\;=0 \catcode`\\=12
;expandafter;catcode ;:CntrlChar=13
;ifnum 92=;:CntrlChar
;edef;:notex{;noexpand;::notex;noexpand\;:notex}
;fi
;ifnum 124=;:CntrlChar
;edef;:notex{;noexpand;::notex;noexpand|;:notex}
;fi
;ifnum 64=;:CntrlChar
;edef;:notex{;noexpand;::notex;noexpand@;:notex}
;fi
;ifnum 96=;:CntrlChar
;edef;:notex{;noexpand;::notex;noexpand`;:notex}
;fi
;:temp ;catcode`;\=0 ;catcode`;;=12
\def\::notex#1#2{\let\:notex=\:undefined
\let\::notex=\:undefined
%
\ifx \documentstyle\:undefined \errmessage{LaTeX is missing}\fi
\documentstyle{book} \let\cleardoublepage=\clearpage
\textwidth=469.75499pt \textheight=643.20255pt
\topmargin=-0.5in \oddsidemargin=0pt \evensidemargin=0pt
\begin{document}
\hbadness=10000 \vbadness=10000 \hfuzz=99in \vfuzz=\hfuzz
\tableofcontents \begingroup
%
\def\:amp{#2}
\def#1{\begingroup
\catcode`\ =12 \catcode`\^^M=12 \catcode`\^^I=12
\expandafter\catcode\:CntrlChar=12 \:doAmp }
%
\def\:doAmp##1{\endgroup
\if ##1< \def\:next####1#1>{\<####1\>}%
\else \def\:next{##1}%
\ifx \:next\:amp
\else\if ##1c \def\:next{\:sect\chapter}%
\else\if ##1s \def\:next{ \vfil\:sect\section}%
\else\if ##1u \def\:next{ \vfil\:sect\subsection}%
\else\if ##1v \def\:next{\expandafter\def\csname\string
@xverbatim\endcsname########1#2{%
########1\end{verbatim}\egroup}%
\bgroup\expandafter\catcode\:CntrlChar=12
\begin{verbatim}}%
\else\if ##1o \def\:next####1#1<####2#1>{\OutputCode####1\<####2\>}%
\else\if ##1n \def\:next{\ClearCode}%
\else\if ##1e \def\:next{\endgroup\end{document}}%
\else \edef\:next{\noexpand\errmessage{\:amp##1?}}%
\fi\fi \fi\fi \fi\fi \fi\fi \fi
\:next }
%
\:NoSpecials{12}{0}{255}
\catcode`\ =10 \catcode`\^^M=5 \catcode`\^^I=10
\escapechar=\:CntrlChar
\expandafter\catcode\:CntrlChar=13 }
\def\:specialactive{\catcode`\_=13
\catcode`\~=13 \catcode`\\=13 \catcode`\#=13
\catcode`\$=13 \catcode`\%=13 \catcode`\^=13
\catcode`\&=13 \catcode`\{=13 \catcode`\}=13 }
\def\:sect{\begingroup \:specialactive \::sect}
\catcode`\/=0 \catcode`\[=1 \catcode`\]=2
\catcode`\@=6 \catcode`\*=14 \:specialactive
/def/::sect at 1@2/par[/endgroup/begingroup
/def~[/bgroup/tt/char126/egroup]*
/def\[/bgroup/tt/char92/egroup]*
/def#[/bgroup/tt/char35/egroup]*
/def$[/bgroup/tt/char36/egroup]*
/def%[/bgroup/tt/char37/egroup]*
/def^[/bgroup/tt/char94/egroup]*
/def_[/bgroup/tt/char95/egroup]*
/def&[/bgroup/tt/char38/egroup]*
/def{[/bgroup/tt/char123/egroup]*
/def}[/bgroup/tt/char125/egroup]*
/escapechar=92 @1[@2]/endgroup]
/catcode`/\=0 \catcode`\#=6 \catcode`\$=3 \catcode`\%=14
\catcode`\^=7 \catcode`\&=4 \catcode`\{=1 \catcode`\}=2
\catcode`\_=8 \catcode`\/=12 \catcode`\[=12 \catcode`\]=12
\catcode`\@=11 \catcode`\*=12
\else
\let\:CntrlChar=\:undefined
\def\:notex{\let\:notex=\:undefined}
\fi
\:CheckOption{<<<>>>} \if:Option
\def\:OpenCode#1#2{\def\:OpenCode{#1}\def\:CloseCode{#2}}
\edef\:CloseCode{\noexpand\:OpenCode
\ifx \CodeDel\:UnDefined{<<<}{>>>}\else \CodeDel\fi } \:CloseCode
\let\:ModifyAppendCodeI=\ModifyAppendCode
\catcode`\^^M=13
\edef\ModifyAppendCode{%
\catcode`\noexpand\{=12 \catcode`\noexpand\}=12 %
\let\noexpand\::ScanAppend=\noexpand\:ScanAppend %
\def\noexpand\:ScanAppend\:OpenCode##1^^M##2\:CloseCode{%
\noexpand\::ScanAppend{##2}}%
\noexpand\:ModifyAppendCodeI}%
\catcode`\^^M=5
\fi \:CheckOption{[]}
\if:Option \else \:CheckOption{[[]]}\fi
\def\:temp{}
\if:Option
\def\:temp{\csname newdimen\endcsname\:BoxDepth}
\def\WindowTitle#1{{\leavevmode
\leftskip=0em \rightskip=0em
\parindent=0em \:BoxDepth=0.4pt
\setbox0=\hbox{#1}%
\advance\:BoxDepth by \dp0
\advance\:BoxDepth by 0.4mm \raise -\:BoxDepth
\hbox{\vrule
\vbox{\hrule \vskip 0.4mm
\hbox{\hskip 0.4mm\relax #1\hskip 0.4mm}%
\vskip 0.4mm \hrule}%
\vrule}}}
\let\:ModifyShowCodeIII=\ModifyShowCode
\def\ModifyShowCode#1{\:ModifyShowCodeIII{#1}%
\def\PortTitle##1{\WindowTitle{\WindowTitle{##1}}}%
\def\:BackTitle{\hbox{---}}}
\fi \:temp \:CheckOption{[[]]}
\def\:temp{}
\if:Option
\let\:ShowCodeI=\:ShowCode
\def\:ShowCode#1{\par\:FrameCode{\:ShowCodeI{#1}}}
\def\:FrameCode#1{\vtop{%
\advance\hsize by -\leftskip
\noindent\vrule
\vtop{\leftskip=0pt \advance\hsize by -0.8pt
\hrule#1\hrule}\vrule}\vskip3pt minus1pt\relax}
\let\:ModifyShowCodeV=\ModifyShowCode
\def\ModifyShowCode#1{\:ModifyShowCodeV{#1}%
\let\PortTitle=\:PortTitleI
\def\:BottomTitle{}}
\def\:PortTitleI#1{{\parindent=0pt
\leftskip=0pt plus 0.5\hsize
\rightskip=\leftskip #1\par \vskip-1ex
\noindent\dotfill\null}}
\let\:ModifyShowLastCodeI=\ModifyShowLastCode
\def\ModifyShowLastCode#1{\:ModifyShowLastCodeI{#1}%
\advance\leftskip by -2em }
\fi \:temp \:CheckOption{list} \if:Option
\def\:show{%
\ifx \:title\empty \def\:show{\ShowCode-}%
\else \def\:show{\ShowCode}%
\fi \:show}
\fi
\catcode`\-=13 \catcode`\+=13 \if:Option
\def\AfterCode#1{{%
\def-##1##2{\def\:title{##1}}%
\let+=\:ignoreII
#1\relax
\:show #1}}
\def\:ignoreII#1#2{}
\fi
\catcode`\-=12 \catcode`\+=12
\:CheckOption{enumerate} \def\:temp{} \if:Option
\def\:temp{\csname newcount\endcsname\:LineCount}
\let\:ModifyShowLastCode=\ModifyShowLastCode
\def\ModifyShowLastCode{\everypar={\:CountLines
{\it \:ShowLineCount \quad}}%
\let\:BottomTitleX=\:BottomTitle
\def\:BottomTitle{\everypar={}\:BottomTitleX}%
\:ModifyShowLastCode}
\def\ResetLineCount{ \global\:LineCount=0 }
\def\ShowLineCount{\def\:ShowLineCount{\ifnum\:LineCount<100 0\fi
\ifnum\:LineCount<10 0\fi
\the\:LineCount}}
\def\HideLineCount{\def\:ShowLineCount{}}
\def\ContLineCount{\def\:CountLines{\global\advance\:LineCount by 1 }}
\def\PauseLineCount{\def\:CountLines{}}
\ShowLineCount \ContLineCount
\def\TagLine[#1]{%
\edef\:temp{\noexpand\Tag\noexpand{C #1\noexpand}\noexpand{%
\the\:LineCount\noexpand}}\:temp}
\def\RefLine[#1]{\Ref{C #1}}
\let\:ModifyOutputCodeZ=\ModifyOutputCode
\def\ModifyOutputCode{\def\RefLine[##1]{}%
\def\TagLine[##1]{}\:ModifyOutputCodeZ}
\fi
\:temp \:CheckOption{ClearCode}
\if:Option
\gdef\:EraseCode{}
\def\ModifyCode#1{%
\let\clearcode:id=\clearcode::id
\def\:temp{\gdef\:EraseCode}%
\expandafter\expandafter\expandafter
\:temp\expandafter{\:EraseCode~#1}}
\def\ClearCode{{%
\def~##1{\global\let##1=\:undefined}%
\:EraseCode \:CodeNumber=\clearcode::id
\advance\:CodeNumber by 1
\xdef\clearcode::id{\the\:CodeNumber }
}%
\gdef\:EraseCode{}}
\let\:ModifyShowCodeVI=\ModifyShowCode
\let\:AfterCodeI=\AfterCode
\let\:RefLineI=\RefLine
\let\:TagLineI=\TagLine
\def\ModifyShowCode#1{\:ModifyShowCodeVI{#1}%
\def\RefLine[##1]{{\def\clearcode:id{0}\:RefLineI[##1]}}%
\def\TagLine[##1]{{\def\clearcode:id{0}\:TagLineI[##1]}}%
\let\clearcode:id=\clearcode::id}
\def\AfterCode#1{\:AfterCodeI{#1}\def\clearcode:id{0}}
\ifx\clearcode:id\:UnDef
\gdef\clearcode:id{0} \gdef\clearcode::id{0}
\fi
\fi\:CheckOption{LibCode}
\if:Option
\def\LibCode{\bgroup \catcode`\ =9 \catcode`\^^M=9 \catcode`\^^I=9
\catcode`\,=13 \:LibCode}
\def\:LibCode[#1]{\catcode`\,=12 \:LibC[#1]}
\catcode`\,=13 \catcode`\^^M=13
\def\:LibC[#1]#2(){\egroup %
\def,{ \noexpand\input\space}%
\edef\:LibFiles{\noexpand\:checkoption , #1 }%
\def\:next{\let\:xparms=\:parms %
\begingroup %
\let\LibCall=\:LibCall %
\def\AddLibCall####1{}%
\def\AddNestedLibCall####1{}%
\def\ifLibEnd{\csname ifx\endcsname\:parms\empty}%
\csname :LibFiles\endcsname \Comment{}{}%
\FreeCode\<\:TempFileName\>
\<\:TempFileName\><<<
\<lib code\> >>> %
\edef\:temp{\noexpand\OutputCodE
\noexpand\<\:TempFileName\noexpand\>}%
\:temp \input \:TempFileName %
\endgroup %
\::LibC }%
\def\:parms{#2}%
\let\:xparms=\empty \::LibC %
\let\:parms=\:UnDef \let\:xparms=\:UnDef}%
\def\LibTempFileName#1{\def\:TempFileName{#1}}
\LibTempFileName{lib.lib}
\catcode`\,=12 \catcode`\^^M=9
\def\::LibC{%
\ifx \:parms\empty \let\:next=\relax
\else\ifx \:parms\:xparms \let\:next=\relax
\:warn{No code for \string\LibCode\space\:parms}
\fi\fi \:next}
\def\LibShow#1{{\tt\par--- Include library component #1}}
\def\:LibShow#1{%
\AddLibCall{#1}%
\LibShow{#1}}
\def\:LibCall(#1,#2,#3){%
\xdef\:parms{%
(#1,#2,#3)%
\:parms}%
\def\temp{\global\let}%
\expandafter\temp\csname#2 \endcsname=\:LibShow
\gdef\:LibShow##1{%
\AddNestedLibCall{(#1,#2,#3)}%
\def\temp{\global\let\:LibShow=}%
\expandafter\temp\csname#2 \endcsname
}%
}
\def\:checkoption{%
\def\:ShowCode##1{}%
\def\ProTexMssg##1{}%
%
\def\ifoption##1{%
\let\:rparms=\:parms
\def\parms{}%
\def\:lparms{}%
\def\:cond{##1}%
\def\:type{}%
\let\:next=\:ifoption \:next
\xdef\:parms{\:lparms\parms\:rparms}%
\csname ifx\endcsname \:type\:cond
\xdef\:parms{\:lparms\:rparms}%
\edef\:next{\noexpand\:LibShow{\parms}}%
\:next
}%
%
\def\:ifoption{%
\expandafter\:getoption\:rparms()%
\ifx \:type\:cond \let\:next=\relax \fi
\:next }%
%
\def\:getoption##1(){%
\def\:temp{##1}%
\ifx \:temp\empty \let\:next=\relax
\else \::getoption##1()\fi }%
%
\def\::getoption(##1,##2,##3)##4(){%
\edef\:lparms{\:lparms\parms}%
\def\parms{(##1,##2,##3)}%
\def\:rparms{##4}%
\def\:type{##2}}%
}
\fi\def\TextIndex#1{} \def\SecIndex#1{}
\def\ShowIndex{\:warn{\string\ShowIndex?}}
\:CheckOption{ShowIndex}
\def\:temp{}
\catcode`\-=13 \catcode`\+=13
\if:Option
\def\:temp{\csname newcount\endcsname \:IdxCount}
\def\:GetTrc{%
\immediate\read15 to \:x
\ifx \:PAR\:x \let\:GetTrc=\relax
\else \expandafter\:AddEntry\:x \fi
\:GetTrc} \def\:PAR{\par}
\def\:AddEntry#1{\def\:cs{#1}\futurelet\:p\:RemoveField}
\def\:RemoveField{\ifx .\:p \def\:next##1 {\:AppendEntry}
\else \let\:next=\:AppendEntry \fi \:next}
\def\:AppendEntry#1#2#3{\def\:y{#1}%
\ifx \:y\:NS \AppendCode\:idx{\endgroup
\:Section{#2}{#3}\begingroup}%
\expandafter\let\csname :idx\the\:IdxCount\endcsname=\:idx
\def\:temp{\Code\:idx{}}%
\expandafter\expandafter\expandafter\:temp\expandafter
{\csname :idx\the\:IdxCount\endcsname}%
\advance\:IdxCount by 1
\else\ifx \:y\:V
\expandafter\ifx \csname :\:Title #2;;:\endcsname\relax
\expandafter\Code\csname :\:Title #2;;:\endcsname{}{\?{#2}}%
\fi
\expandafter\AppendCode\csname :\:Title #2;;:\endcsname{ #3}%
\:AddIdx{\csname :\:Title #2;;:\endcsname}%
\else
\edef\:cs{\expandafter\string\:cs.:}
\edef\:cs{\expandafter\noexpand\csname\:cs\endcsname}
\ifx \:y\:DT \expandafter\Code\:cs{}{\tr{#2}}%
\else\ifx \:y\:ST \expandafter\AppendCode\:cs{ \underbar{#3}}%
\:AddIdx{\:cs}%
\else\ifx \:y\:SC \expandafter\AppendCode\:cs{ #3}%
\:AddIdx{\:cs}%
\fi\fi\fi\fi\fi}\def\:AddIdx{%
\def\:y{\AppendCode\:idx}%
\expandafter\expandafter\expandafter\:y\expandafter}
\def\SecIndex#1{{\let\:refout=\:trcfile \def\:TagCs{.}%
\Tag{section}{{#1};;}}}
\def\TextIndex#1{{\let\:refout=\:trcfile \def\:TagCs{.}%
\Tag{user}{#1;;}}}
\let\i:ModifyShowCode=\ModifyShowCode
\let\i:ModifyOutputCode=\ModifyOutputCode
\def\ModifyOutputCode{%
\ifx \:OpenCode\:UnDef \def\TextIndex##1{}%
\else \let\TextIndex=\Text:Index \fi
\i:ModifyOutputCode}
\def\ModifyShowCode{%
\ifx \:OpenCode\:UnDef \else \let\TextIndex=\::TextIndex \fi
\i:ModifyShowCode }
\let\:TextIndex=\TextIndex
\catcode`\[=1 \catcode`\{=12 \catcode`\]=2 \catcode`\}=12
\def\::TextIndex{#1}[\:TextIndex[#1]]
\def\Text:Index{#1}[]
\catcode`\[=12 \catcode`\{=1 \catcode`\]=12 \catcode`\}=2
\def\:V{user}
\def\:DT{DefineTitle} \def\:ST{ShowTitle} \def\:SC{ShowCode}
\def\:NS{section}
\def\:Title#1;;#2;;{#1}
\def\:TitleA#1;;#2;;{$\triangleleft\triangleleft$ #1
$\triangleright\triangleright$}
\def\:Index{\vfil\eject \Comment{}{}%
\immediate\closeout\:trcfile
\def\ModifyShowCode##1{}%
\def\ModifyAppendCode##1{}%
\def\ModifyFrontTitle##1{}%
\def\ModifyShowLastCode##1{##1}%
\def\AfterCode##1{}%
\def\:WriteTrc##1{}%
\let\:TraceDef=\:ignoreII
\def\:warn##1{}%
\def\:gobble##1{}%
\let\CodeId=\:ignoreII
\def\ModifyOutputCode##1{\def\:FileName{\jobname.xidx}}%
\Code\:idx{}{\BeforeIndex\begingroup}%
\:PauseIndex \immediate\openin15=\:jobname
\:GetTrc \AppendCode\:idx{\endgroup}%
{\def\?##1{\par\noindent{\tt\:Title ##1;;}\hfill}%
\def\tr##1{\par\noindent{\tt\:TitleA ##1;;}\hfill}%
\def\:Section##1##2{{\bf\smallskip\noindent{\:Title ##1;;}\hfill
##2\smallskip}}%
\def\ModifyShowLastCode##1{%
\leftskip=0pt \rightskip=0pt
\def\:LastCode{\:idx}%
\:SetShowIndex}%
\let\:FrameCode=\empty
\expandafter \ShowCode\:minus\:idx }}
\def\:ignoreII#1#2{}
\def\:SetShowIndex{\def-##1##2{\expandafter\def\csname
\expandafter\:gobble##2\endcsname{}}%
\def+##1##2{##1}}
\def\BeforeIndex{}
\def\:PauseIndex{}
\def\PauseIndex{\def\PauseIndex{\immediate\read16 to \PressReturn}}
\def\ShowIndex{{%
\let\:SvCode=\Code
\def\Code##1{\ModifyCode{##1}\:SvCode##1}%
\ifx \::AddEntry\:undefined
\else \let\:AddEntry=\::AddEntry \fi
\:Index \global\let\:idx=\:undefined }%
\xdef\:jobname{\jobname.trc\the\pageno}%
\immediate\openout\:trcfile=\:jobname \relax }
\xdef\:jobname{\jobname.trc}
\fi \catcode`\-=12 \catcode`\+=12 \:temp
\:CheckOption{title+} \if:Option
\def\:temp{\def\AlProTex}
\def\temp:{title,}
\expandafter\expandafter\expandafter\expandafter\expandafter
\expandafter\expandafter\:temp\expandafter\expandafter
\expandafter{\expandafter \temp:\AlProTex}
\fi
\:CheckOption{title} \if:Option
\def\:Name#1{<#1\string\>\endcsname}
\def\:DoName#1{\expandafter#1\csname\:Name}
\def\getTitle:env{\catcode`\_=11 }%
\def\<{\bgroup \getTitle:env \cont:title}%
\def\cont:title#1\>{\egroup\edef\CodeInputLineNo{\the\inputlineno}%
\:DoName\ifx{#1}\relax
\edef\:temp{\noexpand\Code\:DoName
\noexpand{#1}\noexpand{#1\noexpand}}%
\:DoName\let{#1}=\:undefined
\else \def\:temp{\:DoName\AppendCode{#1}}\fi\:temp}
\catcode`\.=10 \catcode`\ =13
\let\:ModifyShowCodeIV=\ModifyShowCode%
\def\ModifyShowCode{%
..\def\:gobble##1{}%
..\def\<##1\>{{\def {\space}%
...\:DoName\ifx{##1}\relax%
.....\let\AppendCode=\:gobble%
.....\:DoName\Code{##1}{##1}{}\fi%
..\csname\:Name{##1}}}\:ModifyShowCodeIV}%
\def\:OutputCodeI#1\<#2\>{%
...\let\:SaveSp= \def {}%
...\def\:temp{#2}%
...\ifx\:temp\empty.\def\:temp{ProTexOutput}%
...\else.\let\:temp=\empty.\fi%
...\expandafter\ifx.\csname.\:temp#2\endcsname\relax%
...\else.\immediate\write16{---.AlProTex. warning.---.%
......\string\OutputCode#1%
......\string\<#2\string\>\space.temporarily\space.%
......redefines.\:backslash#2}\fi%
...\edef\:FileName{\:temp#2}%
...\let =\:SaveSp%
...\expandafter\def\csname\:FileName\endcsname{\csname\:Name{#2}}%
...\def\:tempa{\:OutputCodeIV#1}%
...\expandafter\:tempa\csname\:FileName\endcsname%
..\endgroup}%
\catcode`\ =10\catcode`\.=12
\let\:OutputCodeIV=\OutputCode
\def\OutputCode{%
\begingroup
\def\<##1\>{\csname\:Name{##1}}%
\let\:WriteTrcI=\:WriteTrc \def\:gobble##1{}%
\def\:WriteTrc{\edef\:TagCs{\string\<\expandafter\expandafter
\expandafter\:gobble \:TagCs\string\>}%
\:WriteTrcI}
\catcode` =13 \:OutputCodeI}
\def\OutputCodE\<#1.#2\>{{
\:DoName\def{#1}{\<#1.#2\>}
\OutputCode[#2]\<#1\>}}
\def\FreeCode\<#1\>{{%
\def\temp##1{\global\let##1=\:UnDefined}%
\:DoName\temp{#1}}}
\def\ShowCode#1{%
\def\:test{#1}%
\ifx \:test\:minus \def\:next{\:iname\:ShowCode}\else
\def\:next{\:iname\:ShowCode#1}\fi
\:next}
\def\:iname#1#2{\def\:next{#2}\def\:temp{\<}%
\ifx \:next\:temp
\def\:next##1\>{\expandafter#1\csname\:Name{##1}}\else
\def\:next{#1#2}\fi \:next}
\def\::AddEntry#1{%
\ifx #1\< \let\:Next=\:AddEntryA
\else \def\:Next{\def\:cs{#1}\:AddEntryB}\fi
\:Next }
\def\:AddEntryA#1\>{%
\edef\:cs{\expandafter\noexpand
\csname#1:.\endcsname}\:AddEntryB}
\def\:AddEntryB{%
\futurelet\:p\:RemoveField}%
\def\:RemoveField{\ifx .\:p \def\:next##1 {\:AppendEntry}%
\else \let\:next=\:AppendEntry \fi \:next}
\let\id:WriteTrc=\:WriteTrc
\def\:WriteTrc#1{%
\def\:temp{#1}\def\:tempa{ShowTitle}\ifx\:temp\:tempa
\expandafter\def\expandafter\:TagCs\expandafter
{\:TagCs.\the\:CodeNumber}%
\fi
\id:WriteTrc{#1}}
\:CheckOption{macro} \if:Option
\let\:saveMusp=\>
\def\>{\ifmmode \expandafter\:saveMusp \else \expandafter\:CodeMacro \fi }
\def\:CodeMacro(#1)#2\<{%
\begingroup
\:getcodeprms(\string\1,\string\2,\string\3,\string\4,%
\string\5,\string\6,\string\7,\string\8,\string\9)%
\xdef\:temp{()#2}%
\endgroup
\def\:next{#1}%
\ifx\:next\empty
\expandafter\ifx\csname\:temp\space :<\endcsname\relax
\ifx\:EraseCode\:UnDef\else
\expandafter\:adderase \csname\:temp\space :<\endcsname
\fi
\else
\:warn{Redefine \string\>\:temp\string\<}%
\fi
\def\:next{\expandafter\:getpseducode
\csname\:temp\space :<\endcsname{#2}}%
\else
\begingroup
\:getcodeprms(#1,,,,,,,,,)%
\:protectcommands \ModifyIndirectCode{(#1)#2}%
\xdef\:next{\csname\:temp\space :<\endcsname}%
\endgroup
\fi
\:next}
\def\:adderase#1{%
\def\:next{\gdef\:EraseCode}%
\expandafter\expandafter\expandafter\:next\expandafter{\:EraseCode~#1}%
}
\def\:getpseducode#1#2{\begingroup
\:defaultcats
\ModifyAppendCode{}%
\:getpseducodeI#1{#2}}
\def\:getpseducodeI#1#2#3{\endgroup
\def#1{\<#2\>{#3}}%
}%
\def\:getpseducodeII{%
\ifx \:OpenCode\:UndDef
\else
\edef\:getpseducodeI{%
\def\noexpand
\:getpseducodeI####1####2####3\:OpenCode####4\:CloseCode{%
\endgroup
\def\noexpand\:temp{####3}%
\noexpand\ifx\noexpand\:temp\noexpand\empty
\def####1{\noexpand\<####2\noexpand
\>\:OpenCode####4\:CloseCode}%
\noexpand\else
\errmessage{\string\>()...\string
\<...?...\:OpenCode...\:CloseCode}
\let####1=\noexpand\:UnDef
\noexpand\fi
}%
}%
\:getpseducodeI
\fi
\let\:getpseducodeII=\:UndDef
}
\catcode`\ =13 \catcode`\^^M=13 \catcode`\^^I=13
\catcode`\#=14 \catcode`\%=12
\def\:protectcommands{#
\let\<=\relax#
\let\>=\relax#
\let\%=\csname#
\expandafter\let\%NL%\endcsname=\relax#
\let\%=\relax#
\let\ =\relax#
\let^^M=\relax#
\let^^I=\relax#
\ifx\TagLine\:UnDef\else\let\TagLine=\relax\fi#
\ifx\RefLine\:UnDef\else\let\RefLine=\relax\fi#
}
\catcode`\#=6 \catcode`\%=14
\catcode`\ =10 \catcode`\^^M=9 \catcode`\^^I=10
\def\ModifyIndirectCode#1{}
\def\:getcodeprms(#1,#2,#3,#4,#5,#6,#7,#8,#9){%
\def\1{#1}%
\def\2{#2}%
\def\3{#3}%
\def\4{#4}%
\def\5{#5}%
\def\6{#6}%
\def\7{#7}%
\def\8{#8}%
\def\9##1,##2){\def\9{##1}}%
\9#9,)} \fi
\:CheckOption{title}\if:Option \def\TitleAlias#1#2{%
\expandafter\let\csname C\string#1\endcsname=\<%
\expandafter\let\csname O\string#1\endcsname=\OutputCode
\def\<##1\>{\def\:temp{##1}\def\:tempa{#2}%
\ifx \:temp\:tempa
\def\:temp{\csname C\string#1\endcsname#1\>}\else
\def\:temp{\csname C\string#1\endcsname##1\>}\fi \:temp}
\def\OutputCode##1\<##2\>{\def\:temp{##2}\def\:tempa{#2}%
\ifx \:temp\:tempa
\def\:temp{\csname O\string#1\endcsname##1\<#1\>}%
\else \def\:temp{\csname O\string#1\endcsname##1\<##2\>}\fi
\:temp}}
\fi
\fi
\:CheckOption{eline}
\catcode`\%=12
\if:Option
\let\:ModifyOutputCodeJ=\ModifyOutputCode
\def\ModifyOutputCode{\def\:Ln{ %^^J}\:ModifyOutputCodeJ}
\fi \catcode`\%=14
\:CheckOption{ShowFile}
\if:Option
\catcode`\^^I=13\catcode`\ =13\catcode`\^^M=13%
\def\:ObeyIn{\CodeFont\parindent=0pt%
\parskip=0pt\everypar{}%
\:NoSpecials{12}{0}{255}\catcode`\ =13%
\catcode`\^^M=13\catcode`\^^I=13%
\def^^M{\leavevmode\par}\def^^I{ }%
\def {\leavevmode\:Sp}}%
\catcode`\^^M=5\catcode`\ =10\catcode`\^^I=10
\expandafter\ifx \csname :Sp\endcsname\relax
\expandafter\def\csname :Sp\endcsname{ }
\fi
\def\ShowFile#1{{\:ObeyIn \openin15=#1
\ifeof15 \:warn{\string\ShowFile{#1}?}\else
\input #1 \fi \closein15 }}
\else \def\ShowFile#1{\:warn{\string\ShowFile?}}
\fi\let\Note=\empty \let\EndNote=\empty
\:CheckOption{NoShow} \if:Option
\let\:svShowCode=\:ShowCode
\def\ShowOn{\let\Note=\empty
\let\:ShowCode=\:svShowCode}
\def\ShowOff{\let\Note=\:NoShow
\def\:ShowCode##1{}}
\def\:NoShow{\begingroup
\:NoSpecials{11}{0}{255}\:EndNoShow}
\catcode`\/=0 \catcode`\\=11
/def/:EndNoShow#1\EndNote{/endgroup}
/catcode`/\=0 /catcode`//=12
\fi\:CheckOption{ShowTop}
\catcode`\-=13 \catcode`\+=13
\if:Option
\def\:ShowTop#1{{\par
\def\ModifyFrontTitle##1{\def\:AppendSign{}}%
\def\ModifyShowLastCode##1{\let\:save=-%
\def\:LastCode{#1}%
\def-####1####2{\let-=\:save}%
\def+####1####2{{\ShowSep\let+=\:ignoreII ####1}}}%
\ShowCode#1}}
\def\ShowSep{}
\def\ShowTop{\:iname\:ShowTop}
\def\:ignoreII#1#2{}
\def\:iname#1#2{\def\:next{#2}\def\:temp{\<}%
\ifx \:next\:temp
\def\:next##1\>{\expandafter#1\csname\:Name{##1}}\else
\def\:next{#1#2}\fi \:next}
\fi
\catcode`\-=12 \catcode`\+=12
\def\LinkPort{\:HRefCode{)\clearcode:id P:}}
\def\LinkWindow{\:HRefCode{)\clearcode:id Z:}}
\def\:HRefCode#1\<#2\>{}
\:CheckOption{info} \if:Option
\let\inf:ModifyOutputCode=\ModifyOutputCode
\def\ModifyOutputCode#1{%
\inf:ModifyOutputCode{#1}%
\expandafter\ifx \csname \Extension :cdinfo\endcsname \relax \else
\edef\:FileName{\:FileName}%
\expandafter\expandafter\csname \Extension :cdinfo\endcsname
\:FileName!*?: %
\fi }
\def\CodeInfo{\futurelet\:temp\cd:inf}
\edef\cd:inf{\noexpand\ifx [\noexpand\:temp
\let\noexpand\:temp=\noexpand\cdi:nf
\noexpand\else \def\noexpand\:temp{\noexpand\cdi:nf
[\:InitAlProTex]}\noexpand\fi
\noexpand\:temp}
\def\cdi:nf[#1]{\expandafter\def\csname
#1:cdinfo\endcsname##1.##2!*?: }
\fi
\ifx \HCode\:UnDef \ifx \Htmltrue\:UnDef
\def\:temp{\csname newif\endcsname}
\expandafter\:temp \csname ifHtml\endcsname \Htmlfalse
\fi
\def\EndLink{\ifx \empty:lnk\empty \HCode{</\tag:A>}\fi}
\def\:HRef{\ifx [\:temp \expandafter\::HRef
\else \expandafter\:::HRef \fi }
\def\HT:tag{\ifx -\let:val \expandafter\H:Tag
\else \expandafter\HTa:g\fi }
\def\HTa:g{\H:Tag-}
\def\Link{\let\:attr\empty \futurelet\let:val\HRefT:ag}
\def\HRefT:ag{\ifx -\let:val \expandafter\H:RefTag
\else \expandafter\HRefTa:g\fi }
\def\HRefTa:g{\H:RefTag-}
\def\H:RefTag#1{\futurelet\:temp\:HRefTag}
\def\:HRefTag{\ifx [\:temp \expandafter\::HRefTag
\else \expandafter\:::HRefTag \fi }
\def\HCode#1{}
\def\H:Tag#1#2{}
\def\::HRef[#1]#2{}
\def\:::HRef#1{}
\def\::HRefTag[#1]#2#3{}
\def\:::HRefTag#1#2{}
\def\:TagHTag#1{}
\fi
\:CheckOption{html}
\if:Option \else \:CheckOption{xhtml}\fi
\if:Option
\def\WindowTitle#1{\leavevmode\hbox{%
\disable:
\expandafter\ifx\csname \clearcode:id W-#1\endcsname\relax
\let \:temp=\empty
\else
\edef\:temp{ \HREF:"\expandafter\get:href
\csname \clearcode:id W-#1\endcsname -"}%
\fi
\html:addr
\HCode{<\tag:A\:newlnch \NAME:"\expandafter\get:htag\last:haddr -"\:temp
>}\ttl:del{<.}\HCode{</\tag:A>}%
\expandafter\expandafter\expandafter\global\expandafter\let
\csname \clearcode:id W-#1\endcsname=\last:haddr
%
\expandafter\ifx\csname \clearcode:id :cw:#1\endcsname\relax
\expandafter\expandafter\expandafter\global
\expandafter\def\csname \clearcode:id :cw:#1\endcsname{0}%
\Tag{)\clearcode:id Z:#1}{\last:haddr}%
\fi
\frag:href{)\clearcode:id P:#1}{}#1\HCode{</\tag:A>}%
%
\:nextlink{\clearcode:id :cw:#1}{.>}%
%
}}
\def\disable:{\let\rm=\empty \let\tt=\empty
\let\sl=\empty \let\bf=\empty \let\it=\empty }
\def\frag:href#1#2{%
\HCode{<\tag:A\:newlnch \HREF:"%
\expandafter\ifx \csname cw:#1\endcsname \relax
\expandafter\get:href\last:haddr -%
\else
\expandafter\expandafter\expandafter\get:href\csname
cw:#1\endcsname -%
\fi
"#2>}}
\def\html:PortTitle#1{\hbox{%
\disable:
\bgroup \def\:Sp{\space}%
\html:addr
\ifx\:AppendSign\empty
\HCode{<\tag:A\:newlnch \NAME:"\get:htag\last:haddr-">}%
\expandafter\expandafter\expandafter\global\expandafter\edef
\csname \clearcode:id 9:#1\endcsname{0}%
\else
\HCode{<\tag:A\:newlnch \HREF:"\expandafter\get:href
\csname \space\clearcode:id P:#1\endcsname-"
\NAME:"\get:htag\last:haddr-">}%
\fi
\ttl:del{<..}\HCode{</\tag:A>}%
\expandafter\expandafter\expandafter\global\expandafter\let
\csname \space\clearcode:id P:#1\endcsname=\last:haddr
\egroup
%
\bgroup \def\:Sp{\space}%
\ifx\:AppendSign\empty
\Tag{)\clearcode:id P:#1}{\last:haddr}%
\fi
\frag:href{)\clearcode:id Z:#1}{\ifx \:LastCodeLabel\empty \else
\expandafter\html:codeid\:LastCodeLabel</\tag:A>\fi
%
}%
\egroup
#1\HCode{</\tag:A>}%
%
\:nextlink{\clearcode:id 9:#1}{..}%
%
}}
\def\:HRefCode#1\<#2\>{{%
\let\clearcode:id=\clearcode::id
\expandafter\ifx\csname
cw:#1#2\endcsname\relax
\HCode{<\tag:A>}\else
\HCode{<\tag:A\:newlnch \HREF:"}\expandafter\get:href
\csname cw:#1#2\endcsname
-\HCode{">}%
\fi}}
\def\:nextlink#1#2{%
\bgroup \def\:Sp{\space}%
\def\:lbl{)\the\tmp:cnt :#1}%
\tmp:cnt=\csname #1\endcsname\space
\html:addr
\Tag{\:lbl}{\last:haddr}%
\advance\tmp:cnt by 1\space
\expandafter\xdef\csname #1\endcsname{\the\tmp:cnt}%
\expandafter\ifx\csname cw:\:lbl\endcsname\relax
\HCode{<\tag:A\:newlnch
\NAME:"\expandafter\get:htag\last:haddr-">}%
\else
\HCode{<\tag:A\:newlnch
\NAME:"\expandafter\get:htag\last:haddr-"\space
\HREF:"\expandafter\expandafter\expandafter
\get:href\:LikeRef{\:lbl}-">}%
\fi
\ttl:del{#2>}\HCode{</\tag:A>}%
\egroup
}
\def\:LikeRef#1{\csname cw:#1\endcsname}
\let\html:ShowCode=\ShowCode
\def\ShowCode{\par \html:ShowCode}
\let\html:ModifyShowCode=\ModifyShowCode
\def\ModifyShowCode#1{%
\def\%##1\%{\c:protex##1\d:protex}%
\html:ModifyShowCode{#1}%
\let\PortTitle=\html:PortTitle
\let\:FrontTitle=\frnt:ttl
\def\:BackTitle{\b:protex\par}%
\let\:CodeSkip=\empty
\def\:TopTitle##1{{\:FrontTitle{##1}}}%
\def\:BottomTitle{\:BackTitle}%
\let\html:ModifyShowLastCode=\ModifyShowLastCode
\ifx\:ModifyShowLastCode\:UnDeF \def\:CntLines##1{}\else
\def\:CntLines{\:CountLines}\fi
\def\ModifyShowLastCode##1{%
\ifx \:test\:minus
\def\:CodeSkip{{\par\parindent=0pt\leftskip=0pt
\everypar{}\b:protex\par}%
\global\:removeindenttrue}%
\leavevmode\a:protex\par
\else \global\:removeindenttrue \fi
\html:ModifyShowLastCode{##1}%
\everypar{\e:protex \:CntLines {\it \:ShowLineCount \quad}}%
}%
\f:protex
%
}
\def\frnt:ttl#1{{\htmlprotex:par
{\expandafter\ifx \csname ListCounter\endcsname\relax
\else \:removeindentfalse \fi \leavevmode}%
\PortTitle{#1}\:AppendSign}\a:protex
}%
\def\a:protex{%
% \ifvmode \csname IgnorePar\endcsname
% \else \hfil\break\fi
% \csname EndP\endcsname
\HCode{\ifx \:test\:minus \else <br />\fi
\html:src<span class="ShowCode"
style="font-family:monospace;white-space:nowrap;"
>\html:invisible}%
\nobreak % \hskip\leftskip \hskip\parindent
}
\def\b:protex{\HCode{\html:BackTitle\html:src</span>}}
\def\e:protex{\HCode{<br />\html:invisible}}
\def\c:protex{\HCode{<i>}}
\def\d:protex{\HCode{</i>}}
\def\f:protex{\def\:Sp{\HCode{\string }}}
\long\def\c:ShowCode:#1#2#3#4#5#6{\def\a:protex{#1}%
\def\b:protex{#2}\def\e:protex{#3}\def\c:protex{#4}%
\def\d:protex{#5}\def\f:protex{\def\:Sp{#6}}}
\def\L:Del{<..}
\def\l:Del{<.}
\def\R:Del{..>}
\def\ttl:del#1{\def\:tempa{#1}%
\ifx \:tempa\L:Del \L:del
\else \ifx \:tempa\l:Del \l:del
\else \ifx \:tempa\R:Del \R:del
\else \r:del \fi\fi\fi}
\def\HShowCode#1#2#3#4#5{%
\def\:temp{#1#2}\ifx \:temp\empty \else
\def\L:del{#1}\def\R:del{#2}\fi
\def\:temp{#3#4}\ifx \:temp\empty \else
\def\l:del{#3}\def\r:del{#4}\fi
\def\:temp{#5}\ifx \:temp\empty \else
\def\html:BackTitle{#5}\fi
}
\bgroup
\catcode`\_=12
\gdef\:temp{\HShowCode{<..}{..>}{<.}{.>}{-_-_-}} \aftergroup\:temp
\egroup
\let\html:ProTexMssg=\ProTexMssg
\def\ProTexMssg{%
{\let\:gobble=\empty\def\:TagCs{\:FileName}\:WriteTrc{FileName}}%
\html:ProTexMssg }
\catcode`\^^I=13\catcode`\ =13\catcode`\^^M=13%
\def\:ObeyIn{\CodeFont\parindent=0pt%
\parskip=0pt\everypar{}%
\:NoSpecials{12}{0}{255}\catcode`\ =13%
\catcode`\^^M=13\catcode`\^^I=13%
\def^^M{\leavevmode\e:protex\par}\def^^I{ }%
\def {\leavevmode\:Sp}}%
\catcode`\^^M=5\catcode`\ =10\catcode`\^^I=10
\expandafter\ifx \csname :Sp\endcsname\relax
\expandafter\def\csname :Sp\endcsname{ }
\fi
\def\ShowFile#1{{\:ObeyIn \openin15=#1
\ifeof15 \:warn{\string\ShowFile{#1}?}\else
\a:ShowFile\input #1 \b:ShowFile \fi \closein15 }}
\def\a:ShowFile{\ifvmode \csname IgnorePar\endcsname\fi
\csname EndP\endcsname
\HCode{<div class="ShowFile"
style="font-family:monospace;white-space:nowrap;"
>\html:src\html:invisible}\hfill\break
\f:protex }
\def\b:ShowFile{\HCode{</div>\html:src}}
\long\def\c:ShowFile:#1#2{\def\a:ShowFile{#1}\def\b:ShowFile{#2}}
\def\html:codeid#1Q#2"#3</\tag:A>{ \NAME:
"Q#2"}
\ifx \aXrefFile\:UnDef \let\aXrefFile=\empty \fi
\def\CodeId#1#2{\expandafter\ifx
\csname cw:)F\aXrefFile \file:id
\empty F-\endcsname\relax
\else\:LikeRef{)F\aXrefFile \file:id\empty F-}\fi
\:sharp Q\make:addr{#2}"#1%
\ifx \CodeInputLineNo\:UnDef \the\inputlineno \else \CodeInputLineNo\fi}
\let\showttl:WriteTrc=\:WriteTrc
\def\:WriteTrc#1{%
\def\:temp{#1}\def\:tempa{ShowCode}\ifx\:temp\:tempa
\def\:TagCs{\expandafter\trc:shw\:LastCodeLabel\trc:shw}%
\else \ifx \id:WriteTrc\:Undef
\def\:tempa{ShowTitle}\ifx\:temp\:tempa
\expandafter\def\expandafter\:TagCs\expandafter
{\:TagCs.\the\:CodeNumber}%
\fi \fi \fi
\showttl:WriteTrc{#1}}
\def\trc:shw#1"#2\trc:shw{#2 "#1"}
\ifx \footline\:UnDef \else
\footline={\hfil} \headline={\hfil}
\fi
\def\HREF:{ href=}
\def\tag:A{a}
\def\NAME:{ name=}
\def\make:addr#1{%
\ifnum\clearcode:id>0 \romannumeral\clearcode:id Q\else PrTx\fi
#1}
\ifx\clearcode:id\:UnDef
\def\clearcode::id{0} \def\clearcode:id{0}
\fi
\ifx \html:par\:UnDef \def\html:par{\HCode{<p>}} \fi
\def\html:invisible{<!--x-->\string }
\expandafter\ifx\csname htmlprotex:par\endcsname\relax
\ifx\:removeindenttrue\:UnDef
\def\:removeindenttrue{\let\:Undef=\:Undef}
\fi
\def\htmlprotex:par{{\everypar{}\csname
HtmlPar\endcsname}\HCode{\html:src}}
\fi
\ifx\html:addr\:UnDeF
\immediate\write16{--- needs --- tex4ht \jobname\space ---}%
\ifx\tmp:cnt\:UnDeF \csname newcount\endcsname\tmp:cnt \fi
\def\g:advance#1{\bgroup \def\:temp{#1}%
\tmp:cnt=#1\afterassignment\:gplus \advance\tmp:cnt}
\def\:gplus{\expandafter\xdef\:temp{\the\tmp:cnt}\egroup}
\def\html:lbl{1}
\def\html:addr{\xdef\last:haddr{\file:id-\html:lbl}%
\g:advance\html:lbl by 1\relax }
\ifx \file:id\:UnDef
\gdef\file:id{1}
\global\let\maxfile:id=\file:id
\fi
\hbadness=10000 \vbadness=10000
\:CheckOption{fussy} \if:Option \else
\hfuzz=99in \vfuzz=\hfuzz
\fi
\hyphenpenalty=1000 \exhyphenpenalty=1000
\def\html:rightskip{\rightskip = 0pt plus 0.5\hsize minus0.5\hsize }
\html:rightskip
\ifx \ht:special\:UnDef
\let\ht:special=\special
\fi
\def\HCode#1{\ifx \EndPicture\:UnDef
\ifvmode\leavevmode\fi\ht:special{t4ht=#1}\fi}
\let\:HCode=\HCode
\def\NewLineChar{\bgroup \catcode`\^=7 \:NewLineChar}
\def\:NewLineChar#1{\egroup \def\:newlnch{ #1}}
\NewLineChar{^^J}
\def\::HRef[#1]{\get:attr{#1}\::hRef\:::HRef}
\def\::HRefTag[#1]{\get:attr{#1}\::hRefTag\:::HRefTag}
\def\get:attr#1{\edef\:attr{\noexpand\get:atr #1 !*?: }\:attr}
\def\get:atr#1 #2!*?: #3#4{\def\:attr{\space#2}%
\def\:te:mpa{#1}\ifx \:te:mpa\empty \let\:te:mpa#4\else
\def\:te:mpa{#3[#1]}\fi \:te:mpa}
\def\H:Tag#1#2{\:TagHTag{#2}\HCode{<\tag:A\:newlnch
\NAME:"#2"\empty:lnk>}}
\def\::hRef[#1]#2{%
\HCode{<\tag:A\:newlnch \if\relax#1#2\relax \NOHREF:{}\else
\HREF:"#1\if\relax#1\relax \else\:sharp #2\fi"\fi
\:attr \empty:lnk>}}
\def\:::HRef#1{%
\HCode{<\tag:A\:newlnch \if\relax#1\relax \NOHREF:{}\else
\HREF:"\get:hfile{#1}\:sharp #1"\fi \:attr \empty:lnk>}}
\def\::hRefTag[#1]#2#3{%
\if\relax#3\relax\else\:TagHTag{#3}\fi
\HCode{<\tag:A\:newlnch \if\relax#1#2\relax \NOHREF:{#3}\else
\HREF:"#1\if\relax#2\relax \else\:sharp #2\fi"\fi
\if\relax#3\relax\else\space \NAME:"#3"\fi
\:attr \empty:lnk>}}
\def\:::HRefTag#1#2{%
\if\relax#2\relax\else\:TagHTag{#2}\fi
\HCode{<\tag:A\:newlnch \if\relax#1\relax \NOHREF:{#2}%
\else\HREF:"\get:hfile{#1}\:sharp #1"\fi
\if\relax#2\relax\else\space \NAME:"#2"\fi
\:attr \empty:lnk>}}
\let\empty:lnk=\empty
\def\NOHREF#1{\space}
\def\:TagHTag#1{\ifx -\let:val\else \Tag{)Q\aXrefFile #1}{\file:id}\fi}
\def\get:href{\expandafter\get::href}
\def\get::href#1-#2-{\ifnum #1=\file:id\space \else
\:LikeRef{)F\aXrefFile #1\empty F-}\fi
\:sharp \make:addr{#2}}
\def\get:htag{\expandafter\get::htag}
\def\get::htag#1-#2-{\make:addr{#2}}
\ifx \aXrefFile\:UnDef \let\aXrefFile=\empty \fi
\def\get:hfile#1{%
\expandafter\ifx\csname
cw:)Q\aXrefFile #1\endcsname\relax
\get at hfile{#1}%
\else
\expandafter\expandafter\expandafter\get::hfile
\csname cw:)Q\aXrefFile #1\endcsname,//%
\fi }
\def\get::hfile#1,#2//{%
\ifnum \file:id=0#1 \else
\expandafter\ifx
\csname cw:)F\aXrefFile #1%
\empty F-\endcsname\relax \else
\:LikeRef{)F\aXrefFile #1\empty F-}%
\fi %
\fi }
\ifx\get at hfile\:Undef \let\get at hfile=\:gobble \fi
\let\html:src=\empty
\catcode`\#=12 \def\:sharp{#} \catcode`\#=6
\Htmltrue
\fi
\fi\:CheckOption{_^} \if:Option
\def\du:cc{\catcode`\_=13 \catcode`\^=13 \let\du:cc=\:UnDef}
\let\:sub=_ \let\:sup=^
\catcode`\_=13 \catcode`\^=13
\def_{\ifmmode \:sub \else \string_\fi}
\def^{\ifmmode \:sup \else \string^\fi}
\:CheckOption{html}
\if:Option \else \:CheckOption{xhtml}\fi
\if:Option
\append:def\SUBOn{\def_{\ifmmode \:sub \else \string_\fi}}
\append:def\SUPOn{\def^{\ifmmode \:sup \else \string^\fi}}
\fi
\fi\:CheckOption{pdf}
\if:Option
\ifx \hyper:link\:UnDef \let\:temp=\hyper:target
\else \let\:temp=\:UnDef \fi
\ifx \:temp\:UnDef
\def\hyper:link{\hyperlink}
\def\hyper:target{\hypertarget}
\def\:temp{\ifx\pdfstartlink\:UnDef
\let\pdfstartlink\pdfannotlink
\fi
\ifx \pdfstartlink\:UnDef
\long\def\hyper:target##1##2{\special
{html:<a name="##1">}\special{html:</a>}}%
\long\def\hyper:link##1##2{\special
{html:<a href="##1">}##2\special{html:</a>}}%
\else
\long\def\hyper:target##1##2{\pdfdest name {##1} xyz}%
\long\def\hyper:link##1##2{%
\leavevmode \pdfstartlink goto name {##1}##2\pdfendlink } %
\fi
}
\ifx \hyperlink\:UnDef \:temp
\else \ifx \hypertarget\:UnDef \:temp \fi \fi
\fi
\let\hyper::WindowTitle=\WindowTitle
\def\WindowTitle#1{\bgroup
\def\WindowTitle##1{##1}%
\xdef\:temp{\noexpand\H:WindowTitle{#1}}\egroup \:temp}
\def\H:WindowTitle#1{\leavevmode\hbox{%
\expandafter\ifx\csname \clearcode:id W-#1\endcsname\relax
\ttl:del{<.}%
\else
\hyper:link{\expandafter\get:href
\csname \clearcode:id W-#1\endcsname -}{\ttl:del{<.}}%
\fi
\html:addr
\hyper:target{\expandafter\get:htag\last:haddr -}{}%
\expandafter\expandafter\expandafter\global\expandafter\let
\csname \clearcode:id W-#1\endcsname=\last:haddr
\expandafter\ifx\csname \clearcode:id :cw:#1\endcsname\relax
\expandafter\expandafter\expandafter\global
\expandafter\def\csname \clearcode:id :cw:#1\endcsname{0}%
\Tag{)\clearcode:id Z:#1}{\last:haddr}%
\fi
\def\:temp##1{\leavevmode \hbox{$\triangleleft
\triangleleft$}~##1~\hbox{$\triangleright \triangleright$}}%
\ifx \:temp \hyper::WindowTitle \def\hyper::WindowTitle##1{~##1~}\fi
\hyper::WindowTitle{\frag:href{)\clearcode:id P:#1}{#1}}%
\:nextlink{\clearcode:id :cw:#1}{.>}%
}}
\let\hyper::ModifyShowCode=\ModifyShowCode
\def\ModifyShowCode#1{%
\hyper::ModifyShowCode{#1}%
\let\H:PortTitle=\PortTitle
\let\PortTitle=\hyper::PortTitle
}
\let\hyper::PortTitle=\PortTitle
\def\hyper::PortTitle#1{\hbox{%
\def\:Sp{ }%
\bgroup
\html:addr
\hyper:target{\get:htag\last:haddr-}{}%
\ifx\:AppendSign\empty
\expandafter\expandafter\expandafter\global\expandafter\edef
\csname \clearcode:id 9:#1\endcsname{0}%
\ttl:del{<..}%
\else
\hyper:link{\expandafter\get:href
\csname \space\clearcode:id P:#1\endcsname-}{\ttl:del{<..}}%
\fi
\expandafter\expandafter\expandafter\global\expandafter\let
\csname \space\clearcode:id P:#1\endcsname=\last:haddr
\egroup
\bgroup
\ifx\:AppendSign\empty
\Tag{)\clearcode:id P:#1}{\last:haddr}%
\fi
\def\:temp##1{\leavevmode \hbox{$\triangleright
\triangleright$}~##1~\hbox{$\triangleleft \triangleleft$}}%
\ifx \:temp\H:PortTitle \def\H:PortTitle##1{~##1~}\fi
\H:PortTitle{\frag:href{)\clearcode:id Z:#1}{#1}}%
\egroup
\:nextlink{\clearcode:id 9:#1}{..>}%
}}
\def\frag:href#1#2{%
\hyper:link{%
\expandafter\ifx \csname cw:#1\endcsname \relax
\expandafter\get:href\last:haddr -%
\else
\expandafter\expandafter\expandafter
\get:href\csname cw:#1\endcsname -%
\fi}{#2}}
\def\:nextlink#1#2{%
\bgroup \def\:Sp{\space}%
\def\:lbl{)\the\tmp:cnt :#1}%
\tmp:cnt=\csname #1\endcsname\space
\Tag{\:lbl}{\last:haddr}%
\advance\tmp:cnt by 1\space
\expandafter\xdef\csname #1\endcsname{\the\tmp:cnt}%
\expandafter\ifx\csname cw:\:lbl\endcsname\relax
\ttl:del{#2}%
\else
\hyper:link{\expandafter\expandafter\expandafter
\get:href\:LikeRef{\:lbl}-}{\ttl:del{#2}}%
\fi
\egroup
}
\let\:sharp=\empty \def\clearcode::id{0} \def\clearcode:id{0}
\def\file:id{1}
\def\get:href{\expandafter\get::href}
\def\get::href#1-#2-{\ifnum #1=\file:id\space \else
\:LikeRef{)F\aXrefFile#1\empty F-}\fi
\:sharp \make:addr{#2}}
\def\get:htag{\expandafter\get::htag}
\def\get::htag#1-#2-{\make:addr{#2}}
\def\get:hfile#1{%
\expandafter\ifx\csname
cw:)Q\aXrefFile#1\endcsname\relax
\get at hfile{#1}%
\else
\expandafter\expandafter\expandafter\get::hfile
\csname cw:)Q\aXrefFile#1\endcsname,//%
\fi }
\ifx \aXrefFile\:UnDef \let\aXrefFile=\empty \fi
\def\get::hfile#1,#2//{%
\ifnum \file:id=0#1 \else
\expandafter\ifx
\csname cw:)F\aXrefFile#1%
\empty F-\endcsname\relax \else
\:LikeRef{)F\aXrefFile#1\empty F-}%
\fi %
\fi }
\ifx\get at hfile\:Undef \let\get at hfile=\:gobble \fi
\def\L:Del{<..}
\def\l:Del{<.}
\def\R:Del{..>}
\def\ttl:del#1{\def\:tempa{#1}%
\ifx \:tempa\L:Del \L:del
\else \ifx \:tempa\l:Del \l:del
\else \ifx \:tempa\R:Del \R:del
\else \r:del \fi\fi\fi}
\def\HShowCode#1#2#3#4#5{%
\def\:temp{#1#2}\ifx \:temp\empty \else
\def\L:del{#1}\def\R:del{#2}\fi
\def\:temp{#3#4}\ifx \:temp\empty \else
\def\l:del{#3}\def\r:del{#4}\fi
\def\:temp{#5}\ifx \:temp\empty \else
\def\html:BackTitle{#5}\fi
}
\HShowCode{$\triangleleft\triangleleft$}
{$\triangleright\triangleright$}
{$\triangleright\triangleright$}
{$\triangleleft\triangleleft$} {}
\ifx\tmp:cnt\:UnDeF \csname newcount\endcsname\tmp:cnt \fi
\def\g:advance#1{\bgroup \def\:temp{#1}%
\tmp:cnt=#1\afterassignment\:gplus \advance\tmp:cnt}
\def\:gplus{\expandafter\xdef\:temp{\the\tmp:cnt}\egroup}
\def\html:lbl{1}
\def\html:addr{\xdef\last:haddr{\file:id-\html:lbl}%
\g:advance\html:lbl by 1\relax }
\def\make:addr#1{%
\ifnum\clearcode:id>0 \romannumeral\clearcode:id Q\else PrTx\fi
#1}
\def\:LikeRef#1{\csname cw:#1\endcsname}
\fi \def\AlProTex{\:warn{AlProTex already loaded}}
\let\:InitAlProTex=\:undefined
\let\:CheckOption=\:undefined
\let\:GetOptions=\:undefined
\def\:temp{ \let\:temp=\:undefined
\csname :notex\endcsname \csname :getpseducodeII\endcsname
\endinput}
\:RestoreCatcodes
\csname :temp\endcsname
--- NEW FILE DraTex.sty ---
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% v 1.6
% DraTex %
% Copyright (C) 1992 by Eitan M. Gurari %
% %
% This program can redistributed and/or modified under %
% the terms of the LaTeX Project Public License %
% Distributed from CTAN archives in directory %
% macros/latex/base/lppl.txt; either version 1 of the %
% License, or (at your option) any later version. %
% %
% However, you are allowed to modify this program %
% without changing its name, if you modify its %
% signature. Changes to the signature can be introduced %
% with a directive of the form %
% \message{signature} %
% %
% gurari at cse.ohio-state.edu %
% http://www.cse.ohio-state.edu/~gurari %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\expandafter\edef\csname :RestoreCatcodes\endcsname{%
\catcode`\noexpand\noexpand\noexpand \^=\the\catcode`\^%
}
\catcode`\^=7
\expandafter\edef\csname :RestoreCatcodes\endcsname{%
\csname :RestoreCatcodes\endcsname
\catcode`\noexpand \_=\the\catcode`\_%
\catcode`\noexpand :=\the\catcode`:%
\catcode`\noexpand @=\the\catcode`@%
\catcode`\noexpand /=\the\catcode`/%
\catcode`\noexpand &=\the\catcode`&%
\catcode`\noexpand \^^M=\the\catcode`\^^M%
\catcode`\noexpand \^^I=\the\catcode`\^^I%
\let\expandafter\noexpand
\csname:RestoreCatcodes\endcsname=\noexpand\undefined}
\catcode`\:11 \catcode`\@11
\let\:wlog\wlog \def\wlog#1{}
\def\:wrn#1#2{\immediate\write\sixt@@n{--DraTeX warning--
\ifcase #1
DraTex.sty already loaded
\or \string\Draw\space within \string\Draw
\or Changing definition of \string#2
\or No intersection points: #2
\or Improper rotation of axes: #2
\or (#2) in \string\DSeg\space is a point
\fi}}
\def\:err#1#2{\errmessage{--DraTeX error-- \ifcase #1
\string#2\space meaningless in three dimensions
\or \string#2\space meaningless in two dimensions
\or No \string\MarkLoc(#2)
\or \string#2 in three dimensions
\or Too many parameters in definition
\or \string\MoveFToOval(#2)?
\fi}}
\ifx\:Xunits\:undefined \else \:wrn0{} \fi
\catcode`\ 9 \catcode`\^^M9 \catcode`\^^I9
\def\:UBorder{0}
\newdimen\:LBorder \newdimen\:RBorder\chardef\:eight=8
\mathchardef\:cccvx=360
\newdimen\:mp \:mp 0.1\p@
\newdimen\:mmp \:mmp 0.01\p@
\newdimen\:mmmp \:mmmp 0.001\p@
\newdimen\:XC \:XC 90\p@
\newdimen\:CVXXX \:CVXXX180\p@
\newdimen\:CCCVX \:CCCVX\:cccvx\p@ \newdimen\:TeXLoc
\newbox\:box\newif\if:IIID \newdimen\:Z \newdimen\:Zunits
\newdimen\:Ex \newdimen\:Ey \newdimen\:Ez
\def\:AbsVal#1{ \ifdim#1<\z at -\fi #1 }
\def\:abs#1{\ifdim #1<\z@ #1-#1 \fi}
\def\:AbsDif#1#2#3{ #1#2 \advance#1 -#3
\ifdim #1<\z@ #1-#1 \fi}
\def\:diff#1#2#3{ #1#2 \advance#1 -#3 }
\def\:average#1#2#3{
#1#2 \advance#1 #3 \divide#1 \tw@}\def\:Opt#1#2#3#4{
\def\:temp{
\ifx \:next\ifnum \def\:next{#3#1#4#2}
\else\ifx \:next#1 \def\:next{#3}
\else \def\:next{#3#1#4#2}\fi\fi \:next}
\futurelet\:next\:temp}\def\Define#1{\:multid#1
\:Opt(){\:Define#1}0}
\def\:DraCatCodes{\catcode`\ 9 \catcode`\^^M9
\expandafter\ifx \csname ;catcode\endcsname\relax %
\expandafter\edef \csname ;catcode\endcsname{%
\catcode`;\the\catcode`\;}%
\fi %
\catcode`;12 %
%
\catcode`\^^I9 \catcode`\&13 \catcode`\~13 }
\def\:Define#1(#2){\begingroup \:DraCatCodes \::Define#1(#2)}
\def\::Define#1(#2)#3{\endgroup
\let\:NextDefine\NextDefine
\let\NextDefine\relax
\ifcase#2\relax
\def#1{#3}\or
\:TxtPar\def#1(##1){#3}\or
\:TxtPar\def#1(##1,##2){#3}\or
\:TxtPar\def#1(##1,##2,##3){#3}\or
\:TxtPar\def#1(##1,##2,##3,##4){#3}\or
\:TxtPar\def#1(##1,##2,##3,##4,##5){#3}\or
\:TxtPar\def#1(##1,##2,##3,##4,##5,##6){#3}\or
\:TxtPar\def#1(##1,##2,##3,##4,##5,##6,##7){#3}\or
\:TxtPar\def#1(##1,##2,##3,##4,##5,##6,##7,##8){#3}\or
\:TxtPar\def#1(##1,##2,##3,##4,##5,##6,##7,##8,##9){#3}\or
\:err4{}\fi \let\:TxtPar\relax \:NextDefine}
\let\NextDefine\relax\let\:TxtPar\relax
\def\WarningOn{\def\:multid##1{
\ifx ##1\:undefined \else \:wrn2##1\fi}}
\def\:gobble#1{}
\def\WarningOff{\let\:multid\:gobble} \WarningOff
\Define\Indirect{\futurelet\:next\:Indirect}
\Define\:Indirect{\:theDoReg
\ifx \:next<
\def\:temp{\let\DoReg\:DoReg}
\def\:next<##1>{\expandafter\:temp\csname :<##1>\endcsname}
\else
\def\:next##1<##2>{
\expandafter\ifx \csname :<##2> \endcsname \relax
\def\:next{##1} \fi
\:indrwrn\Define \:indrwrn\Object
\:indrwrn\Table \:indrwrn\IntVar \:indrwrn\DecVar
\def\:temp{\let\DoReg\:DoReg##1}
\expandafter\:temp \csname :<##2> \endcsname}
\fi \:next} \def\:indrwrn#1{ \def\:temp{#1}
\ifx \:next\:temp \def\:wrn##1##2{\let\:wrn\::wrn} \fi}
\let\::wrn\:wrn
\Define\:Hline{
\setbox\:box\hbox{\vrule height0.5\:thickness
depth 0.5\:thickness width\:x}
{\:d\:X \advance\:d \wd\:box
\advance\:X -\:TeXLoc \global\:TeXLoc\:d
\vrule width\:X depth\z@ height\z@
\raise \:Y \box\:box} }\Define\:Vline{
\setbox\:box\hbox{\vrule width\:thickness
\ifdim \:y>\z@ height\:y depth\z@
\else height\z@ depth-\:y \fi}
\advance\:X -0.5\:thickness
{\:d\:X \advance\:d \wd\:box
\advance\:X -\:TeXLoc \global\:TeXLoc\:d
\vrule width\:X depth\z@ height\z@
\raise \:Y \box\:box} }\Define\:MvTo(2){\:X#1\:Xunits \:Y#2\:Yunits}
\Define\:Mv(2){\advance\:X #1\:Xunits
\advance\:Y #2\:Yunits}
\def\:DLn(#1,#2,{\:MvTo(#1,#2) \:LnTo(}\Define\:LnTo(2){
\:x#1\:Xunits \advance\:x -\:X
\:y#2\:Yunits \advance\:y -\:Y
\:Ln(\:x\du,\:y\du) }\Define\:Ln(2){
\:x#1\:Xunits \:y#2\:Yunits
{ \ifdim \:x<\z@
\advance\:X \:x \:x-\:x
\advance\:Y \:y \:y-\:y
\fi
\:yy\:AbsVal\:y
\:dd\:yy \advance\:dd \:x
\ifdim \:dd>\:mmmp
\ifdim \:x>\:yy
{ \ifdim\:X<\:LBorder \global\:LBorder\:X\fi
\advance \:X \:x
\ifdim \:X>\:RBorder \global\:RBorder\:X\fi\advance \:Y 0.5\:thickness
\ifdim \:Y>\:UBorder \xdef\:UBorder{\the\:Y} \fi
\advance \:Y \:y
\ifdim \:Y>\:UBorder \xdef\:UBorder{\the\:Y} \fi }
\let\:Yunitsy\:x \let\:Xunitsx\:y \let\:temp\:Hline
\:dd0.6\:yy \:divide\:dd\:x
\else
{ \advance \:X -0.5\:thickness
\ifdim \:X<\:LBorder \global\:LBorder\:X \fi
\advance \:X \:thickness
\advance \:X \:x
\ifdim \:X>\:RBorder \global\:RBorder\:X\fi
\ifdim \:Y>\:UBorder \xdef\:UBorder{\the\:Y} \fi
\advance \:Y \:y
\ifdim \:Y>\:UBorder \xdef\:UBorder{\the\:Y} \fi }
\let\:Yunitsy\:y \let\:Xunitsx\:x \let\:temp\:Vline
\:dd0.6\:x
\ifdim \:x>\:mmp \:divide\:dd\:yy \fi
\fi
\advance\:dd 0.4\p@
\:ragged\:Cons\:dd\:ragged
\:HVLn
\fi }
\advance\:X \:x \advance\:Y \:y}\Define\:HVLn{
\:xx\:AbsVal\:Xunitsx \:divide\:xx\:ragged
\advance\:xx 0.99\p@ \:K\:InCons\:xx \relax
\ifnum \:K>\z@
\divide\:Xunitsx \:K \advance\:K \@ne
\divide\:Yunitsy \:K
\else \:K\@ne \fi \:NextLn}
\Define\:NextLn{
\ifnum\:K=\z@ \let\:NextLn\relax
\else { \:temp } \advance\:K \m at ne
\advance\:X \:x \advance\:Y \:y
\fi \:NextLn}\newdimen\:ragged
\Define\Ragged(1){ \:ragged#1\p@ \:ragged0.1\:ragged }
\Ragged(7.5)
\Define\PaintUnderCurve(4){{
\:Z\:Y \def\:next{\Curve(#1,#2,#3,#4)}
\MoveToLoc(#1) \:d\:X \MoveToLoc(#4)
\advance\:d -\:X
\ifdim \:AbsVal\:d<\:mmp \def\:next{}
\else
\def\:CrvLnTo(##1,##2){
\:x \:X \:y \:Y \:X\:DJ \:Y\:yyyy
\:xx\:X \:dddd \:Y \:X\:x \:Y\:y
{ \advance\:Y \:dddd \divide\:Y \tw@
\advance\:Z -\:Y
\advance\:Y 0.5\:Z
\:dddd \:AbsVal \:Z \:d\z@
\def\:CrvLnTo{\:LnTo}
\:yy\:Y \:dd\:dddd \:ddd\:dddd
\::paint }}
\fi \:next }}
\Define\DoCurve(1){ \let\:StopCurve\:SlowCurve
\def\:CMv(##1){ \:x\:X \:y\:Y \:MvTo(##1)
\advance\:x -\:X \advance\:y -\:Y
\:xxx \:x \:yyy\:y}
\:DoCurve{\Curve(#1)}
\let\:StopCurve\:FastCurve}
\def\:DoCurve#1(#2)#3{{\XSaveUnits
\def\:next{#1} \:MvTo(#2,#2)
\:x\:AbsVal\:X \:y\:Y \:ddd\z@ \:length
\:Z\:d \:divide\:Z{1.41421\p@}
\edef\:tempa{\the\:DoDist} \global\:DoDist\z@
\def\:CrvLnTo(##1){ \MarkLoc(1^) \:CMv(##1)
{ \MarkLoc(2^) \:ddd\z@ \:length
\:dd \:DoDist \global\advance\:DoDist \:d
\:ddd \:DoDist \:divide\:ddd\:Z
\DoReg\:InCons\:ddd \:Z\DoReg\:Z
\ifdim \:Z>\:dd
\advance\:Z -\:DoDist
\advance\:dd -\:DoDist
\:divide\:Z\:dd
\advance\:X \:Cons\:Z\:xxx
\advance\:Y \:Cons\:Z\:yyy \:DoRot
\def\:CrvLnTo{\:LnTo}
\def\:OvalLn{\:Ln} \XRecallUnits #3 \fi}}
\:next \xdef\:DoDim{\:Cons\:DoDist}
\global\:DoDist\:tempa }
\let\DoDim\:DoDim}
\newdimen\:DoDist\def\:DoRot{ \DSeg\RotateTo(1^,2^) }
\def\DoLine(#1,#2)(#3)#4{
\MarkLoc($1) \Move(#1,#2)
\def\:next{ { \MarkLoc($2)
\DSeg\RotateTo($1,$2) \let\:DoRot\relax
\edef\:RecallRagged{\the\:ragged} \MoveTo(#3,#3)
\:x\:AbsVal\:X \:y\:Y \:ddd\z@ \:length
\:ragged\:d \divide\:ragged \tw@
\DoCurve($1,$1,$2,$2)(#3)
{\:ragged\:RecallRagged #4} }
\let\DoDim\:DoDim} \:next }
\def\Table#1{\begingroup \:DraCatCodes \:multid#1
\:DefineData#1}
\def\:DefineData#1#2{\endgroup
\let\:temp~ \def~{\noexpand~}
\edef#1{\noexpand\:DoPoly\expandafter\noexpand\csname
:\string#1\endcsname}
\expandafter\edef \csname :\string#1\endcsname
##1{\noexpand\ifcase##1(#2)\noexpand\fi}
\let~\:temp \:DoNextPoly \:DoNextPoly}
\def\:OR{\let\:or\or} \:OR \catcode`\&13 \def&{)\noexpand\:or(}
\def\TableData{\begingroup \:DraCatCodes \:TableData}
\def\:TableData#1#2#3{\endgroup \Table\:temp{#3}
\:K\z@ \:J\z@ \def\:tempa(##1){\advance\:J \@ne }
\:temp(0,999){\:tempa} \let\:tempa& \def\:temp{\def#1}
\def&##1&{
\ifnum \:K<\:J
\advance\:K \@ne
\ifnum \:K=\@ne \def#1{#2(##1)}
\else
\:IIIexpandafter\:temp\expandafter{
#1 & #2(##1) }
\fi
\else \let\:next\relax \fi
\:next}
\let\:next& && \let&\:tempa }
\catcode`\&4 \def\:DoPoly#1(#2,#3)#4{
\expandafter\let \csname :Back\the\:level\endcsname\:or
\expandafter\edef\csname :DoVars\the\:level\endcsname{
\:DoB\the\:DoB}
\advance\:level \@ne
\:DoB#3 \advance\:DoB -#2
\def\:PolyOr(##1){
\ifnum \:DoB=\z@ \:OR
\else #4(##1) \advance\:DoB \m at ne \fi}
\:OR
\def\:temp{\let\:or\:PolyOr #4}
\:IIIexpandafter\:temp#1{#2}
\advance\:level \m at ne
\csname :DoVars\the\:level\endcsname
\def\:temp{\let\:or}
\expandafter\:temp\csname :Back\the\:level\endcsname }
\Define\PaintRect(2){\def\:next{{ \MarkLoc(^)
\MoveToLoc(^) \Move( #1,0) \MarkLoc(^1) \Move(0,#2)
\MarkLoc(^2) \Move(-#1,0) \MarkLoc(^3)
\PaintQuad(^,^1,^2,^3) }}\:next}
\Define\PaintRectAt(4){\def\:next{{ \MoveTo(#1,#2)
\:Ex#3\p@ \advance\:Ex -#1\p@
\:Ey#4\p@ \advance\:Ey -#2\p@
\PaintRect(\:Cons\:Ex,\:Cons\:Ey)}}
\:next}\def\::paint{
\ifdim \:d<\:ragged \advance\:xx -\:X
\:yyy\:Y \:xxx\:dddd
\advance\:Y \:yy \divide\:Y \tw@
\:average\:dddd\:dd\:ddd
\def\:next{\:brush(\:xx,\z@)\:Y\:yyy\:dddd\:xxx}
\else \divide\:d \tw@
\:average\:x\:X\:xx
\:average\:y\:Y\:yy
\:average\:dddd\:dd\:ddd
\fi \:next}\Define\:paint{{ \:AbsDif\:d\:xx\:x
\ifdim \:d<\:mmp \let\::paint\relax
\else
\ifdim \:y >\:yyy \:dd\:y \:y \:yyy \:yyy \:dd \fi
\ifdim \:yy>\:yyyy \:dd\:yy \:yy\:yyyy \:yyyy\:dd \fi
\:AbsDif\:dd\:yyyy\:yyy \:AbsDif\:ddd\:yy\:y
\ifdim \:dd<\:ddd \:dd\:ddd \fi
\ifdim \:d >\:dd \:d\:dd \fi
\advance\:d \:d \:diff\:dd\:y\:yyy
\:diff\:ddd\:yy\:yyyy
\advance\:y -0.5\:dd \:abs\:dd
\advance\:yy -0.5\:ddd \:abs\:ddd
\:X\:x \:Y\:y
\:average\:dddd\:dd\:ddd
\def\:next{ \:lpaint \:rpaint }
\fi
\::paint }}
\Define\:lpaint{ { \:xx\:x \:yy \:y \:ddd\:dddd \::paint} }
\Define\:rpaint{ { \:X \:x \:Y \:y \:dd \:dddd \::paint} }
\Define\PaintQuad(4){\def\:next{{\Units(1pt,1pt)
\MoveToLoc(#1) \:x \:X \:y \:Y
\MoveToLoc(#2) \:xx \:X \:yy \:Y
\MoveToLoc(#3) \:xxx\:X \:yyy\:Y
\MoveToLoc(#4) \:xxxx \:X \:yyyy \:Y
\:paintQuad }}\:next}
\def\:paintQuad{{
\:SetVal\:a\:x\:y\:xx\:yy\:xxxx\:yyyy
\:SetVal\:b\:xx\:yy\:xxx\:yyy\:x\:y
\:SetVal\:c\:xxx\:yyy\:xx\:yy\:xxxx\:yyyy
\:SetVal\:cc\:xxxx\:yyyy\:xxx\:yyy\:x\:y
\def\:A{\:a} \def\:B{\:b} \def\:C{\:c} \def\:D{\:cc}
\:sort\:B\:A
\:sort\:C\:B \:sort\:B\:A
\:sort\:D\:C \:sort\:C\:B \:sort\:B\:A
\let\:temp\relax
\:IsTriang\:A\:B
\:IsTriang\:B\:C
\:IsTriang\:C\:D
\:temp
\:Quad\:A\:temp> \:xxxx\:xx \:yyyy\:yy \:Z\:d
\:Quad\:D\:next<
\:PrePaint(\:xx,\:yy,\:d,\:xxxx,\:yyyy,\:Z)
\:temp \:next }}
\Define\:PrePaint(6){
\:x#1 \:y#2 \:yyy#3 \:xx#4 \:yy#5 \:yyyy#6
\:paint }\def\:Quad#1#2#3{
\:GetVal#1\:x\:y0
\:GetVal#1\:xx\:yy1
\:GetVal#1\:xxx\:yyy2
\ifdim \:xx#3\:xxx
\:ddd\:xx \:xx\:xxx \:xxx\:ddd
\:ddd\:yy \:yy\:yyy \:yyy\:ddd
\fi
\def#2{}
\:diff\:dd\:xxx\:xx
\ifdim \ifdim\:AbsVal\:dd<\:mp \:yy=\:yyy \else \z@>\z@ \fi
\:d\:yy
\else
\ifdim \:AbsVal\:dd>\:mp
\:diff\:dd\:xxx\:x \:diff\:ddd\:yyy\:y
\:divide\:ddd\:dd \:diff\:dd\:xx\:xxx
\:ddd\:Cons\:ddd\:dd \advance\:ddd \:yyy
\:d\:ddd
\else \:d\:yyy \fi
\edef#2{ \noexpand\:PrePaint
(\the\:x ,\the\:y ,\the\:y,
\the\:xx,\the\:yy,\the\:d) }
\fi}\def\:SetVal#1#2#3#4#5#6#7{
\edef#1{(\the#2,\the#3,\the#4,\the#5,\the#6,\the#7)}}
\def\:sort#1#2{
\ifdim \:IIIexpandafter\:field#1 <
\:IIIexpandafter\:field#2
\let\:temp#1 \let#1#2 \let#2\:temp
\fi }
\Define\:field(6){#1}
\def\:GetVal#1#2#3{
\:IIIexpandafter\::GetVal #1#2#3}
\def\::GetVal(#1,#2,#3,#4,#5,#6)#7#8#9{
\ifcase #9 #7#1 #8#2\or #7#3 #8#4\or #7#5 #8#6 \fi}
\def\:IsTriang#1#2{
\ifdim \:IIIexpandafter\:field#1 =
\:IIIexpandafter\:field#2
\ifdim \:IIIexpandafter\:fieldB#1 =
\:IIIexpandafter\:fieldB#2
\def\:temp{ \:FixTria }
\fi \fi }
\def\:FixTria{
\edef\:temp{\:IIIexpandafter\:FrsII\:B}
\ifdim \:IIIexpandafter\:field\:A =
\:IIIexpandafter\:field\:B
\ifdim \:IIIexpandafter\:fieldB\:A =
\:IIIexpandafter\:fieldB\:B
\edef\:temp{\:IIIexpandafter\:FrsII\:C}
\fi\fi
\edef\:A{\:IIIexpandafter\:FrsII\:A}
\edef\:D{\:IIIexpandafter\:FrsII\:D}
\edef\:temp{
\def\noexpand\:a{(\:A,\:temp,\:D)}
\def\noexpand\:b{(\:temp,\:A,\:D)}
\def\noexpand\:c{\noexpand\:b}
\def\noexpand\:cc{(\:D,\:A,\:temp)}}
\:temp
\def\:A{\:a} \def\:B{\:b} \def\:C{\:c} \def\:D{\:cc} }
\Define\:fieldB(6){#2}
\Define\:FrsII(6){#1,#2}
\def\:IIIexpandafter{\expandafter\expandafter\expandafter}
\Define\DrawRect(2){ \Line( #1,0) \Line(0, #2)
\Line(-#1,0) \Line(0,-#2)}
\Define\DrawRectAt(4){{
\MoveTo(#1,#2) \LineTo(#3,#2) \LineTo(#3,#4)
\LineTo(#1,#4) \LineTo(#1,#2)}}
\def\du#1{ \ifx#1\:Xunits \else\ifx#1\:Yunits
\else\ifx#1\:Zunits \else #1
\fi \fi \fi}
\let\:svdu=\du
\Define\XSaveUnits{
\expandafter\edef\csname XRecallUnits\the\:level\endcsname{
\:StoreUnits}
\advance\:level \@ne}
\Define\XRecallUnits{
\advance\:level \m at ne
\csname XRecallUnits\the\:level \endcsname}
\Define\SaveUnits{
\edef\RecallUnits{ \:StoreUnits } }
\Define\:StoreUnits{ \:Xunits \the\:Xunits
\:Yunits \the\:Yunits \:Zunits \the\:Zunits
\:Xunitsx\the\:Xunitsx \:Xunitsy\the\:Xunitsy
\:Yunitsx\the\:Yunitsx \:Yunitsy\the\:Yunitsy }
\Define\:SearchDir{
\ifdim \:x<\z@ \:x-\:x \:y-\:y
\edef\:tempA{\advance\:ddd \ifdim \:y<\z@ - \fi\:CVXXX}
\else \def\:tempA{} \fi
\ifdim \:y<\z@
\edef\:tempA{\:ddd-\:ddd \advance\:ddd \:CCCVX \:tempA}
\:y-\:y
\fi
\ifdim \:y>\:x
\:ddd\:y \:y\:x \:x\:ddd
\edef\:tempA{\advance\:ddd -\:XC \:ddd-\:ddd \:tempA}
\fi
\:divide\:y\:x \:d57.29578\:y
\:ddd\:d \:sqr\:y \:K \@ne
\Do(1,30){\advance\:K \tw@
\:d-\:Cons\:y\:d \:dd\:d \divide\:dd \:K
\advance\:ddd \:dd }
\advance\:ddd -0.49182\:dd
\:tempA }\Define\Curve(4){\def\:next{{ \XSaveUnits \Units(1pt,1pt)
\MoveToLoc(#1) \:DI \:X \:DK \:Y
\MoveToLoc(#2) \:ddd \:X \:Ez \:Y
\MoveToLoc(#3) \:dd\:X \:Ey\:Y
\MoveToLoc(#4) \:DJ\:X \:yyyy\:Y \:Curve }}\:next}
\Define\:FastCurve{ \:AbsDif\:d\:DI\:ddd \:AbsDif\:dddd\:DK\:Ez
\advance\:d \:dddd
\ifnum \:d<\:ragged
\:AbsDif\:d\:DJ\:dd \:AbsDif\:dddd\:yyyy\:Ey
\advance\:d \:dddd \fi}
\let\:StopCurve\:FastCurve
\Define\:SlowCurve{
\:AbsDif\:d\:DI\:DJ \:AbsDif\:dddd\:DK\:yyyy
\advance\:d \:dddd }
\Define\:Curve{ \:StopCurve
\ifnum \:d<\:ragged \:X\:DI \:Y\:DK
\:CrvLnTo(\:Cons\:DJ,\:Cons\:yyyy)
\def\:SubCurves{} \fi
\:SubCurves}
\def\:CrvLnTo{\:LnTo}\Define\:SubCurves{
\:average\:yy\:DI\:ddd \:average\:Ex\:DK\:Ez
\:average\:ddd\:ddd\:dd \:average\:Ez\:Ez\:Ey
\:average\:dd\:dd\:DJ \:average\:Ey\:Ey\:yyyy
\:average\:Zunits\:yy\:ddd \:average\:Vdirection\:Ex\:Ez
\:average\:ddd\:ddd\:dd \:average\:Ez\:Ez\:Ey
\:average\:DL\:Zunits\:ddd \:average\:xxxx\:Vdirection\:Ez
{ \:ddd \:yy \:Ez \:Ex \:dd\:Zunits
\:Ey\:Vdirection \:DJ\:DL \:yyyy\:xxxx \:Curve }
\:DI \:DL \:DK \:xxxx \:Curve }
\def\MoveToCurve[#1]{
\Define\:BiSect(3){\MoveToLoc(##1)
\CSeg[#1]\Move(##1,##2)
\MarkLoc(##3) }\:MvToCrv}
\Define\:MvToCrv(4){ \:BiSect(#1,#2,:a) \:BiSect(#2,#3,:b)
\:BiSect(#3,#4,:c) \:BiSect(:a,:b,:A) \:BiSect(:b,:c,:B)
\:BiSect(:A,:B,:Q)}
\Define\:OvalDir(3){ \:CosSin{#3\p@}
\:Zunits\p@ \:d#2\:Zunits \:x\:Cons\:d\:x
\:Zunits\p@ \:d#1\:Zunits \:y\:Cons\:d\:y
\:SearchDir }\Define\DrawOval (2){ \DrawOvalArc(#1,#2)(0,\:cccvx) }
\Define\PaintOval (2){ \PaintOvalArc(#1,#2)(0,\:cccvx) }
\Define\DrawCircle (1){ \DrawOval(#1,#1) }
\Define\PaintCircle(1){ \PaintOval(#1,#1) }
\def\DrawOvalArc(#1,#2)(#3,#4){{
\:xxxx#4\p@ \advance\:xxxx -#3\p@
\ifdim \:xxxx=\z@ \else
\let\:SinOne\:SinB \:OvalDir(#1,#2,#3) \:DJ\:ddd
\:OvalDir(#1,#2,#4) \:diff\:DI\:ddd\:DJ
\ifdim\:DI<\z@ \advance\:DI \:CCCVX \fi
\ifdim \:xxxx<\:CCCVX \else \:DI\:CCCVX \fi
\:InitOval(#1,#2) \:CosSin\:DJ
\:xxxx\:x \:yyyy\:y \:xx\:X \:yy\:Y
\advance\:X \:Xx\:x \advance\:X \:Yx\:y
\advance\:Y \:Xy\:x \advance\:Y \:Yy\:y
\let\:Xunits\empty \let\:Yunits\empty
\Do(1,\:InCons\:DI){
\:dd\:X \:ddd\:Y \:X\:xx \:Y\:yy
\:AdvOv\:xxx\:yyy\:xxxx\:yyyy
\:X\:dd \:Y\:ddd
\advance\:xxx -\:X \advance\:yyy -\:Y
\:d\:AbsVal\:xxx
\advance\:d \:AbsVal\:yyy
\ifdim \:d>\:ragged
\:OvalLn(\:xxx,\:yyy) \fi }
\:OvalDir(#1,#2,#4) \:CosSin\:ddd
\advance\:xx \:Xx\:x \advance\:xx \:Yx\:y
\advance\:yy \:Xy\:x \advance\:yy \:Yy\:y
\advance\:xx -\:X \advance\:yy -\:Y
\:OvalLn(\:xx,\:yy) \fi }}
\def\:OvalLn{\:Ln}\def\DoOvalArc(#1)(#2){ \:xx\:X \:yy\:Y
\def\:CMv(##1){ \:Mv(\:xxx,\:yyy)
\:x\:xxx \:y\:yyy}
\:DoCurve{ \:X\:xx \:Y\:yy
\def\:DoRot{ \let\:Xunits\:XunitsReg
\let\:Yunits\:YunitsReg
\DSeg\RotateTo(1^,2^) }
\let\::OvalLn\:CrvLnTo
\Define\:OvalLn(2){ \:dd\:AbsVal####1
\advance\:dd \:AbsVal####2 \:divide\:dd\:ragged
\:J\:InCons\:dd \advance\:J \@ne
\divide####1 \:J \divide####2 \:J
\Do(1,\:J){\::OvalLn(####1,####2)}}
\DrawOvalArc(#1)(#2)}}
\def\NextTable{\begingroup \:DraCatCodes \:NextTable}
\def\:NextTable#1{\endgroup
\def\:DoNextPoly{#1\NextTable{}}}
\NextTable{}\def\:AdvOv#1#2#3#4{
\:d\:CosOne#3 \advance\:d -\:SinOne#4
#4\:CosOne#4 \advance#4 \:SinOne#3 #3\:d
\divide#3 \:eight \divide#4 \:eight
#1\:X #2\:Y
\:d\:Xx#3 \advance\:d \:Yx#4 \advance#1 \:d
\:d\:Xy#3 \advance\:d \:Yy#4 \advance#2 \:d }
\def\:CosOne{7.99878} \def\:SinB{0.13962}
\def\PaintOvalArc(#1,#2)(#3,#4){{ \ifdim #3\p@=#4\p@
\let\:next\relax \else
\:d\:AbsVal{#1\:Xunits} \advance\:d \:AbsVal{#2\:Yunits}
\ifdim \:d<3\:ragged \divide \:d \tw@ \PenSize(\:d)
\:Mv(-0.5\:d\du,0) \:Ln(\:d\du,0)
\else \:InitOval(#1,#2)
\MarkLoc(o$) \RotateTo(#3) \MoveFToOval(#1,#2)
\:Ex\:X \:Ey\:Y \edef\:FirstOvDir{\:Cons\:ddd\p@}
\MoveToLoc(o$) \RotateTo(#4) \MoveFToOval(#1,#2)
\:Ez \:X \:Vdirection \:Y \edef\:LastOvDir{\:Cons\:ddd\p@}
\MoveToLoc(o$)
\if:rotated
\:Zunits\p@ \:Zunits#1\:Zunits
\:xx\:Cons\:Zunits\:Xunitsx
\:Zunits\p@ \:Zunits#2\:Zunits
\:yy\:Cons\:Zunits\:Yunitsx
\:x\:xx \:y\:yy \:ddd\z@ \:length
\:ddd\:d \:divide\:xx\:ddd \:divide\:yy\:ddd
\else \:xx\p@ \:yy\z@ \fi
\:AbsDif\:d{#3\p@}{#4\p@}
\ifdim \:d>359\p@ \:Ez-\:Xx\:xx \advance\:Ez -\:Yx\:yy
\:Vdirection-\:Xy\:xx \advance\:Vdirection -\:Yy\:yy
\advance\:Ez \:X \advance\:Vdirection \:Y
\:setpaint\:PaintOvOv<>
\else
\:x\:xx \:y\:yy \:SearchDir
\:xxx\:FirstOvDir \advance\:xxx -\:ddd
\ifdim \:xxx<\z@ \advance\:xxx \:CCCVX \fi
\:yyy\:LastOvDir \advance\:yyy -\:ddd
\ifdim \:yyy<\z@ \advance\:yyy \:CCCVX \fi
\:J\z@
\ifdim \:xxx<\:yyy \ifdim \:yyy<\:CVXXX
\:Pntovln\:FirstOvDir\:FirstOvDir\:LastOvDir
\else \ifdim \:xxx>\:CVXXX
\:Pntovln\:FirstOvDir\:FirstOvDir\:LastOvDir
\else \:yyy-\:yyy \advance\:yyy \:CCCVX
\ifdim \:xxx<\:yyy
\:setpaint\:PntLeftOvOv>< \:PntMovln\:FirstOvDir\:xx
\else \:FxLx \:setpaint\:PntLeftOvOv>< \:Pntmovln\:LastOvDir
\fi \fi \fi
\else \ifdim \:xxx<\:CVXXX
{ \:setpaint\:PaintOvOv<> } \:FxLx \:setpaint\:PntLeftOvOv><
\:Usrch \:PaintMidOvLn\:LastOvDir\:FirstOvDir
\else \ifdim \:yyy>\:CVXXX
{ \:FxLx \:setpaint\:PaintOvOv<> } \:setpaint\:PntLeftOvOv><
\:Dsrch \:PaintMidOvLn\:LastOvDir\:FirstOvDir
\else \:xxx-\:xxx \advance\:xxx \:CCCVX
\ifdim \:yyy<\:xxx
\:setpaint\:PaintOvOv<> \:PntMovln\:FirstOvDir\:xx
\else
\:FxLx \:setpaint\:PaintOvOv<> \:Pntmovln\:LastOvDir
\fi \fi \fi \fi
\fi \fi \fi}}\def\:setpaint#1#2#3{{\aftergroup#1
\:d\:Xx\:xx \advance\:d \:Yx\:yy
\ifdim \:d<\z@ \aftergroup#3
\else \aftergroup#2 \fi}}
\def\:FxLx{\:d\:Ex \:Ex\:Ez \:Ez\:d}
\def\:Pntovln#1{
\let\:SinOne\:SinB \:CosSin#1
\:xxxx\:Ex \:yyyy\:Ey \:Z\z@
\:PaintOvLn}
\def\:PntMovln{
\:Dsrch \:FxLx \:xx\:ddd \:PaintOvLn}
\def\:Pntmovln{
\:Usrch \:FxLx \:xx\:ddd \:PaintOvLn\:xx}
\def\:PaintMidOvLn#1#2{
\:FxLx \:xx\:ddd \:PaintOvLn#1#2
\:xxx\:Ez \:yyy\:Vdirection
\:ddd\:Xy\:x \advance\:ddd \:Yy\:y \advance\:ddd \:Y
\:PaintSlice}
\def\:PntLeftOvOv{
\:xx-\:xx \:yy-\:yy \:PaintOvOv}
\def\:Dsrch{ \def\:SinOne{-\:SinB}
\:xx\:x \:yy\:y \:SearchDir
\:x\:xx \:y\:yy
\:d\:Ey \:Ey\:Vdirection \:Vdirection\:d }
\def\:Usrch{
\let\:SinOne\:SinB
\:x\:xx \:y\:yy \:SearchDir
\:x\:xx \:y\:yy}\def\:PaintOvLn#1#2{
\:diff\:dd\:Ey\:Vdirection \:diff\:ddd\:Ex\:Ez
\ifdim \:AbsVal\:ddd>\:mp
\:divide\:dd\:ddd \:d#2
\advance\:d -#1
\ifnum \:d<\z@ \advance\:d \:CCCVX \fi
\:DoB\:InCons\:d \let\:next\:PntDo \:next
\fi}
\def\:PntDo{
\ifnum\:DoB=\z@ \let\:next\relax
\else
\::AdvOv\:x\:y
\ifdim \:d>\:ragged
\:ddd\:xxx \advance\:ddd -\:Ez
\:ddd\:Cons\:dd\:ddd
\advance\:ddd \:Vdirection \:PaintSlice
\fi
\advance\:DoB \m at ne
\fi \:next}\Define\:PaintSlice{ \:AbsDif\:dddd\:yyy\:ddd
\advance\:yyy \:ddd \divide\:yyy \tw@
{ \advance\:dddd \:Z \divide\:dddd \tw@
\:X\:xxxx \:Y\:yyy
\:xx\:xxx \advance\:xxx -\:xxxx
\:d\z@
\:yy\:Y \:dd\:dddd \:ddd\:dddd
\::paint }
\:xxxx\:xxx \:yyyy\:yyy \:Z\:dddd \:J\z@}
\def\::AdvOv#1#2{ \:AdvOv\:xxx\:yyy#1#2
\:AbsDif\:d\:xxxx\:xxx \advance\:J \@ne
\ifnum \:J=\sixt@@n \multiply\:d \@cclvi
\fi }\def\:PaintOvOv#1{ \def\:hdir{#1}
\:xxx\:Xx\:xx \advance\:xxx \:Yx\:yy
\:yyy\:Xy\:xx \advance\:yyy \:Yy\:yy
\advance\:xxx \:X \advance\:yyy \:Y
\:Z\z@ \:xxxx\:xxx \:yyyy\:yyy
\:x\:xx \:y\:yy \:DoB\z@ \:J\z@
\let\:next\:scanOvOv \:next }
\Define\:scanOvOv{ \advance\:DoB \@ne
\advance\:J \@ne
\:AbsDif\:d\:xxx\:Ez
\ifdim \ifdim \:xxx\:hdir\:Ez -
\else\ifdim \thr@@\:d<\:ragged -
\else\ifnum \:DoB>358 -
\fi \fi \fi \p@<\z@
\:ddd\:yyyy \advance\:ddd -0.5\:dddd
\:yyy\:yyyy \advance\:yyy 0.5\:dddd
\:xxx\:Ez \:PaintSlice
\let\:next\relax
\else
\:d\:xx \advance\:d -\:x
\:xxx\:yy \advance\:xxx -\:y
\ifdim -\:Xx\:d\:hdir\:Yx\:xxx
\let\:SinOne\:SinB
\::AdvOv\:xx\:yy
\ifdim \ifdim \:d >\:ragged -
\else \ifnum \:J>\sixt@@n -
\fi\fi \p@<\z@
\:J\z@ \def\:SinOne{-\:SinB}
\:AdvOv\:dd\:ddd\:x\:y \:PaintSlice \fi
\else
\def\:SinOne{-\:SinB}
\::AdvOv\:x\:y
\ifdim \ifdim \:d >\:ragged -
\else \ifnum \:J>\sixt@@n -
\fi\fi \p@<\z@
\:J\z@ \let\:SinOne\:SinB
\:AdvOv\:dd\:ddd\:xx\:yy \:PaintSlice \fi
\fi \fi
\:next}\Define\SetBrush{\:Opt[]\:SetBrush{}}
\def\:SetBrush[#1](#2,#3)#4{ \def\:temp{#4}
\ifx \:temp\empty
\def\:brush{ \let\:Xunits\empty \let\:Yunits\empty
\:thickness\:dddd \:Ln }
\else \def\:BruShape{#4}
\:dd#2\:Xunits \:ddd#3\:Yunits
\edef\:Grd{ \:dd\the\:dd \:ddd\the\:ddd }
\MarkLoc($$) \def\:temp{#1}
\ifx \:temp\empty \:X\z@ \:Y\z@
\else \MoveTo(#1) \fi
\edef\:BrOrg{ \:x\the\:X \:y\the\:Y }
\MoveToLoc($$)
\def\:brush(##1,##2){ \::brush } \fi }
\SetBrush(,){}\def\::brush{{ \SetBrush(,){}
\let\:Xunits\:XunitsReg \let\:Yunits\:YunitsReg
\advance\:Y -0.5\:dddd \:yy\:Y
\advance\:yy \:dddd
\:BrOrg \:Grd \advance\:xx \:X
\ifdim \:xx<\:X \:d\:X \:X\:xx \:xx\:d \fi
\:GridPt\:X\:x\:dd
\:GridPt\:Y\:y\:ddd \:x\:X
\:DoBrush }}\Define\:DoBrush{
\ifdim \:Y>\:yy \let\:DoBrush\relax
\else \ifdim \:X>\:xx \advance\:Y \:ddd \:X\:x
\else { \:BruShape } \advance\:X \:dd
\fi \fi \:DoBrush }\def\:GridPt#1#2#3{ \:xxxx#1
\advance#1 -#2 \:divide#1#3
#1\:InCons#1#3 \advance#1 #2
\ifdim #1=\:xxxx
\else \ifdim \:xxxx>#2 \advance#1 #3 \fi \fi }
\newcount\:IntId \edef\:IntCount{0\space}
\newcount\:DecId \edef\:DecCount{0\space}
\Define\:NewCount{\alloc@ 0\count \countdef \insc at unt }
\Define\:NewDimen{\alloc@ 1\dimen \dimendef \insc at unt }
\def\:NewVar#1#2#3#4#5{ \:multid#1
\def\:temp{ \csname \string#4\the#4\endcsname\z@
\edef#1{\noexpand#3 \csname \string#4\the#4\endcsname}}
\def\:next{ \xdef#5{\the#4\space} #2#1 \def\:next{\global\let}
\expandafter\:next \csname \string#4\the#4\endcsname#1 \:temp }
\advance#4 \@ne
\ifnum #4 > #5 \expandafter\:next \else \expandafter\:temp \fi }
\def\IntVar#1{\:NewVar#1\:NewCount\:IntOp\:IntId\:IntCount}
\def\DecVar#1{\:NewVar#1\:NewDimen\:DecOp\:DecId\:DecCount}
\DecVar\Q \DecVar\R \DecVar\T
\IntVar\I \IntVar\J \IntVar\K
\def\WriteVal#1{\immediate\write\sixt@@n{...\string#1=#1;}}
\newdimen\:X \newdimen\:Y
\newdimen\:x \newdimen\:y \newdimen\:d
\newdimen\:xx \newdimen\:yy \newdimen\:dd
\newdimen\:xxx \newdimen\:yyy \newdimen\:ddd
\newdimen\:xxxx\newdimen\:yyyy\newdimen\:dddd
\newcount\:J \newcount\:K
\newdimen\:DI \newdimen\:DJ
\newdimen\:DK \newdimen\:DL \newtoks\:t
\def\:IntFromPt#1#2{
\:d#2\relax
\advance\:d \ifdim\:d<-0.5\p at -\fi 0.5\p@
#1\:d \divide#1 65536\relax}
\def\:temp{\catcode`\p12 \catcode`\t12}
\def\:Cons{\catcode`\p11 \catcode`\t11}
\:temp \def\:Frac#1pt{#1}
\def\:rnd#1.#2pt{#1} \:Cons
\def\:Cons#1{\expandafter\:Frac\the#1}
\def\:sqr#1{#1\expandafter\:Frac\the#1#1}
\def\:InCons#1{\expandafter\:rnd\the#1}\def\:Val#1{#1;}
\let\Val\:Val\def\:IntOp#1#2{\csname :Op#2\endcsname#1}
\let\:SvIntOp\:IntOp
\def\:PreIntOp{\let\:IntOp\empty
\let\Val\empty}
\def\:PostIntOp{\let\:IntOp\:SvIntOp
\let\Val\:Val}
\expandafter\def\csname :Op;\endcsname#1{ \the#1}
\expandafter\def\csname :Op=\endcsname#1#2;{
\:PreIntOp#1#2\:PostIntOp}
\expandafter\def\csname :Op+\endcsname#1#2;{
\:PreIntOp\advance #1 #2\:PostIntOp}
\expandafter\def\csname :Op-\endcsname#1#2;{
\:PreIntOp\advance #1 -#2\:PostIntOp}
\expandafter\def\csname :Op/\endcsname#1#2;{
\:PreIntOp\divide#1 #2\:PostIntOp}
\expandafter\def\csname :Op*\endcsname#1#2;{
\:PreIntOp\multiply#1 #2\:PostIntOp}
\def\:DecOp#1#2{ \csname :xOp#2\endcsname#1}
\let\:SvDecOp\:DecOp
\def\:PreDecOp{\let\:IntOp\the \def\:DecOp{\:Cons}
\let\Val\empty \let\:du\empty}
\def\:PostDecOp{\let\:IntOp\:SvIntOp \let\Val\:Val
\let\:DecOp\:SvDecOp \let\:du\::du }
\def\::du#1{\p@
\ifx#1\p@ \let\:temp\relax
\else \def\:temp{\du{#1}}
\fi\:temp} \:PostDecOp
\expandafter\def\csname :xOp;\endcsname#1{ \:Cons#1}
\expandafter\def\csname :Op[\endcsname#1#2];{
\:PreDecOp \:dd#2\p@ \:IntFromPt#1\:dd
\:PostDecOp }
\expandafter\def\csname :xOp=\endcsname#1#2;{
\:PreDecOp#1#2\p@\:PostDecOp }
\expandafter\def\csname :xOp(\endcsname#1#2){
\:PreDecOp#1#2\p@\:PostDecOp }
\expandafter\def\csname :xOp+\endcsname#1#2;{
\:PreDecOp\advance #1 #2\p@\:PostDecOp }
\expandafter\def\csname :xOp-\endcsname#1#2;{
\:PreDecOp\advance #1 -#2\p@\:PostDecOp }
\expandafter\def\csname :xOp*\endcsname#1#2;{
\:PreDecOp#1 #2#1\:PostDecOp }
\expandafter\def\csname :xOp/\endcsname#1#2;{
\:PreDecOp \:divide#1{#2\p@} \:PostDecOp }
\let\IF\ifnum \let\THEN\relax
\let\ELSE\else \let\FI\fi
\def\EqText(#1,#2){
\z@=\z@ \fi \def\:temp{#1}
\def\:next{#2} \ifx \:temp\:next }
\def\:IfInt#1(#2,#3){ \z@=\z@ \fi
\:IntOp\:K=#2; \:IntOp\:J=#3; \ifnum \:K#1\:J }
\def\:IfDim#1(#2,#3){ \z@=\z@ \fi
\:DecOp\:d=#2; \:DecOp\:dd=#3; \ifdim \:d#1\:dd }
\def\EqInt{ \:IfInt= } \def\LtInt{ \:IfInt< }
\def\GtInt{ \:IfInt> }
\def\EqDec{ \:IfDim= } \def\LtDec{ \:IfDim< }
\def\GtDec{ \:IfDim> } \def\Do(#1,#2)#3{
\expandafter\let
\csname :Back\the\:level\endcsname\:Do
\expandafter\edef\csname :DoVars\the\:level\endcsname{
\DoReg\the\DoReg \:DoB\the\:DoB}
\advance\:level \@ne
\DoReg#1 \:DoB#2 \relax
\ifnum \DoReg<\:DoB
\def\:Do{\ifnum \DoReg>\:DoB
\let\:Do\relax
\else #3\advance\DoReg \@ne \fi
\:Do}
\else
\def\:Do{\ifnum \DoReg<\:DoB
\let\:Do\relax
\else #3\advance\DoReg \m at ne \fi
\:Do}
\fi \def\:nextdo{ \:Do \advance\:level \m at ne
\csname :DoVars\the\:level\endcsname
\def\:temp{\let\:Do}
\expandafter\:temp\csname
:Back\the\:level\endcsname } \:nextdo}
\let\:Do\relax
\newcount\DoReg \let\:DoReg\DoReg \newcount\:DoB
\newcount\:level\def\::divide#1{ \:DI\:DK \:dddd\:DL
\advance\:DI -\:Cons\:dddd#1
\:IntFromPt\:J\:dddd \advance\:dddd -\:J\p@
\multiply\:J \@M \:IntFromPt\:K{\@M\:dddd}
\advance\:J \:K \:dddd\@M\p@
\divide\:dddd \:J \advance#1 \:Cons\:DI\:dddd }
\def\:divide#1#2{ \:DK#1 \:DL#2 #1\z@
\::divide#1 \::divide#1 \::divide#1
\::divide#1 \::divide#1 }
\def\:Sqrt#1{ \ifdim #1<\:mmp #1\z@ \else
\:dd#1 \divide\:dd \tw@
\def\::Sqrt{ \:ddd#1
\:divide\:ddd\:dd \:AbsDif\:d\:dd\:ddd
\advance\:dd \:ddd \divide\:dd \tw@
\ifdim \:d < \:mmmp
\let\::Sqrt\relax \fi
\::Sqrt}
\::Sqrt #1\:dd \fi }\Define\:length{
\:dd \:AbsVal \:ddd
\:abs\:x \:abs\:y
\ifdim \:dd<\:x \:dd\:x \fi
\ifdim \:dd<\:y \:dd\:y \fi
\ifdim \:dd>\:mp
\:divide\:x\:dd \:sqr\:x
\:divide\:y\:dd \:sqr\:y
\:divide\:ddd\:dd \:sqr\:ddd
\advance\:x \:y \advance\:x \:ddd
\:y\:dd \:Sqrt\:x \:d\:Cons\:x\:y
\else \:d\:dd \fi}\Define\:distance(2){\MarkLoc(@^)
\MoveToLoc(#1) \:x \:X \:y \:Y \:ddd\:Z
\MoveToLoc(#2)
\advance\:x -\:X \advance\:y -\:Y
\advance\:ddd -\if:IIID \:Z \else \:ddd \fi
\:length \MoveToLoc(@^)}\def\:NormalizeDeg#1{
\:DL#1 \:K\:InCons\:DL
\divide\:K \:cccvx \multiply\:K \:cccvx
\advance #1 -\:K\p@
\ifdim #1<\z@ \advance #1 \:CCCVX \fi
\ifdim #1=\z@
\ifdim\:DL=\z@ \else
\advance #1 \:CCCVX \fi \fi }\def\:CosSin#1{ \:DK#1
\:NormalizeDeg\:DK \def\:tempA{}
\ifdim \:CVXXX<\:DK
\def\:tempA{\:y-\:y}
\advance\:DK -\:CCCVX \:DK-\:DK \fi
\ifdim \:XC<\:DK
\edef\:tempA{\:x-\:x \:tempA}
\advance\:DK -\:CVXXX \:DK-\:DK \fi
\ifdim 45\p@<\:DK
\edef\:tempA{\:d\:x \:x\:y \:y\:d \:tempA}
\advance\:DK -\:XC \:DK-\:DK \fi
\:x\p@ \:y0.01745\:DK \:d\:y \:K\@ne
\edef\:next{\advance\:K \@ne
\:sqr\:d \divide\:d \:K \advance}
\:next \:x -\:d \:next \:y -\:d
\:next \:x \:d \:next \:y \:d
\:next \:x -\:d \:next \:y -\:d
\:next \:x \:d \:next \:y \:d
\:tempA } \Define\:rInitOval(2){
\XSaveUnits \let\du=\:rdu
\:Zunits\p@ \:dd#1\:Zunits
\:d\:Cons\:dd\:Xunitsx \edef\:Xx{\:Cons\:d}
\:d\:Cons\:dd\:Xunitsy \edef\:Xy{\:Cons\:d}
\:dd#2\:Zunits
\:d\:Cons\:dd\:Yunitsx \edef\:Yx{\:Cons\:d}
\:d\:Cons\:dd\:Yunitsy \edef\:Yy{\:Cons\:d}
\XRecallUnits \let\du=\:svdu
}
\Define\:xyInitOval(2){
\:d#1\:Xunits \edef\:Xx{\:Cons\:d} \def\:Xy{0}
\:d#2\:Yunits \edef\:Yy{\:Cons\:d} \def\:Yx{0} }
\def\:FigSize#1#2#3{
\:x\:LBorder \:y\:RBorder \:d\:TeXLoc
{\Object\:temp{#3}
\setbox\:box\hbox{ \:temp
\multiply\:x by \tw@ \multiply\:y by \tw@
\xdef\:FSize{ \noexpand#1=\:Cons\:x;
\noexpand#2=\:Cons\:y;}}}
\global\:LBorder\:x \global\:RBorder\:y
\global\:TeXLoc \:d
\:FSize}
\expandafter\let \csname 0:Ln \endcsname\:Ln
\expandafter\def\csname 1:Ln \endcsname{
\advance\:x -\:X \advance\:y -\:Y
\csname 0:Ln \endcsname(\:x,\:y) }
\newcount\:ClipLevel \:ClipLevel\@ne
\Define\Clip{\futurelet\:next\:Clip}
\Define\:Clip{
\ifx \:next[ \expandafter\:DefClipOut
\else \expandafter\:DefClip \fi }
\def\:DefClipOut[#1]{ \:DefClip(#1) }
\Define\:DefClip(1){ \def\:temp{#1}
\ifx \:temp\empty
\:ClipLevel\@ne \def\:next{\let\:Ln}
\expandafter\:next\csname 0:Ln \endcsname
\else \def\:temp{\::DefClip(#1)} \fi \:temp }
\Define\::DefClip(1){ \MarkLoc(^)
\:x\:X \:y \:Y \Move(#1)
\ifdim\:x>\:X \:dd\:X \:X\:x \:x\:dd \fi
\ifdim\:y>\:Y \:dd\:Y \:Y\:y \:y\:dd \fi
\advance\:ClipLevel \@ne
\expandafter\edef\csname \the
\:ClipLevel :Ln \endcsname{
\:xxx \the\:x \:yyy \the\:y
\:xxxx\the\:X \:yyyy\the\:Y
\ifx \:next[ \noexpand\:ClipOut
\else \noexpand\:ClipIn \fi }
\let\:Ln\:ClipLn \MoveToLoc(^) }\def\:ClipLn(#1,#2){
\:x#1\:Xunits \:y#2\:Yunits
{ \let\:Xunits\empty \let\:Yunits\empty
\advance\:x \:X \advance\:y \:Y
\ifdim \:x<\:X \:dd\:X \:X\:x \:x\:dd
\:dd\:Y \:Y\:y \:y\:dd \fi
\:diff\:dd\:X\:x \:diff\:ddd\:Y\:y
\:Z \:AbsVal \:dd
\advance\:Z \:AbsVal\:ddd
\ifdim \:Z>\sixt@@n\p@
\divide\:dd 128
\divide\:ddd 128 \fi
\:Z\:Cons\:y\:dd
\advance\:Z -\:Cons\:x\:ddd
\ifdim \:dd<\z@
\:dd-\:dd \:ddd-\:ddd \:Z-\:Z
\fi
\csname \the \:ClipLevel :Ln \endcsname }
\advance\:X \:x \advance\:Y \:y }\Define\:ClipIn{
\def\:next{\let\:next}
\expandafter\:next\csname \the
\:ClipLevel :Ln \endcsname
\advance\:ClipLevel \m at ne
{ \:ClipLeft\:xxxx \:ClipDown\:yyy \:ClipUp\:yyyy \:next }
{ \:ClipRight\:xxx \:ClipDown\:yyy \:ClipUp\:yyyy \:next }
{ \:ClipDown\:yyyy \:next }
\:ClipUp\:yyy \:next }
\Define\:ClipOut{
\:ClipLeft\:xxx \:ClipRight\:xxxx
\:ClipUp \:yyyy \:ClipDown \:yyy
\def\:next{\let\:next}
\expandafter\:next
\csname \the\:ClipLevel :Ln \endcsname
\advance\:ClipLevel \m at ne \:next }\def\:ClipLeft#1{
\ifdim \:x<#1 \:KilledLine
\else \ifdim \:X<#1 \:X#1
\ifdim \:dd>\:mmmp
\:Y\:Cons\:ddd\:X \advance\:Y \:Z
\:divide\:Y\:dd
\fi \fi \fi \:CondKilLn }
\def\:ClipRight#1{
\ifdim \:X>#1 \:KilledLine
\else \ifdim \:x>#1 \:x#1
\ifdim \:dd>\:mmmp
\:y\:Cons\:ddd\:x \advance\:y \:Z
\:divide\:y\:dd
\fi \fi \fi \:CondKilLn }
\Define\:CondKilLn{
\:d\:x \advance\:d -\:X
\ifdim \:d<\z@ \:d-\:d \fi
\ifdim \:y<\:Y \advance\:d \:Y \advance\:d -\:y
\else \advance\:d \:y \advance\:d -\:Y \fi
\ifdim \:d<\:mmp \:KilledLine \fi
\ifdim \:thickness=\z@ \:KilledLine \fi}
\Define\:KilledLine{
\let\:ClipLeft\:gobble \let\:ClipRight\:gobble
\let\:ClipUp \:gobble \let\:ClipDown \:gobble
\let\:next\relax
\expandafter\def\csname 1:Ln \endcsname{}}\def\:ClipUp#1{
\:AbsDif\:d\:y\:Y
\ifdim \:d<\:ragged
\advance\:y 0.5\:thickness
\advance\:Y -0.5\:thickness
\ifdim \:Y>#1 \:KilledLine
\else \ifdim \:y>#1
\:thickness#1 \advance\:thickness -\:Y
\advance\:Y 0.5\:thickness \:y\:Y
\else
\advance\:Y 0.5\:thickness
\advance\:y -0.5\:thickness
\fi \fi
\:dd\p@ \:ddd\z@
\def\:temp{ \:Z\:Y } \:temp
\else \let\:temp\relax
\ifdim \ifdim\:Y<\:y\:Y\else\:y\fi >#1 \:KilledLine
\else \ifdim \::ClipUp#1\:X\:Y
\else \ifdim \::ClipUp#1\:x\:y
\fi \fi \fi \fi \:CondKilLn }
\def\::ClipUp#1#2#3{
#3>#1 #3#1
\ifdim \:AbsVal\:ddd>\:mmmp
#2\:Cons\:dd#3 \advance#2 -\:Z
\:divide#2\:ddd
\fi }\def\:ClipDown#1{ \:Ex2#1
\:Flip\:y \:Flip\:Y \:ClipUp#1
\:Flip\:y \:Flip\:Y \:temp }
\def\:Flip#1{ #1-#1 \advance#1 \:Ex }
\Define\:SetDrawWidth{
\hsize\:RBorder \advance\hsize -\:LBorder
\leftskip -\:LBorder \rightskip\z@}
\newdimen\:thickness \:thickness0.75\p@
\Define\PenSize(1){\:thickness#1\relax}
\Define\:Draw{ \ifvmode \noindent\hfil\fi
\global\:TeXLoc\z@
\vbox\bgroup
\begingroup
\def\EndDraw{
\endgroup \:SetDrawWidth
\egroup}
\:DraCatCodes \parindent\z@ \everypar{}
\leftskip\z@ \rightskip\z@ \boxmaxdepth\maxdimen
\linepenalty10 \let\FigSize\:FigSize
\def\Draw{\:wrn1{}} \:CommonIID \:InDraw }
\Define\:CommonIID{\def\RotateTo{\:RotateTo}
\def\Rotate{\:Rotate}
\def\MoveF{\:MvF}\def\LineToLoc{\:LnToLoc}}\newdimen\:Xunits \:Xunits\p@
\newdimen\:Yunits \:Yunits\p@
\Define\:InDraw{\:Opt()\::InDraw{\:Xunits,\:Yunits}}
\Define\::InDraw(2){ \:X\z@ \:Y\z@
\:Xunits#1 \relax \:Yunits#2 \:AdjRunits
\global\:LBorder\z@ \global\:RBorder\z@ \gdef\:UBorder{0pt}
\:loadIID \leavevmode }
\Define\:Resize(2){
\:Xunits#1\:Xunits \relax
\:Yunits#2\:Yunits \:AdjRunits }
\Define\:Units(2){
\:Xunits#1 \relax \:Yunits#2 \:AdjRunits }
\Define\:loadIID{
\def\LineAt{\:DLn}
\def\LineTo{\:LnTo}
\def\MoveTo{\:MvTo}
\def\Line{\:Ln}
\def\Move{\:Mv}
\def\MoveF{\:MvF}
\:rotatedfalse\def\:InitOval{\:xyInitOval}
\def\Scale{\:Resize}
\def\Units{\:Units}}\let\SaveAll\begingroup
\let\RecallAll\endgroup
\def\DrawOn{\def\Draw{\:Draw}} \DrawOn
\def\DrawOff{\def\Draw{\begingroup \:J\@cclv
\:NoDrawSpecials \:NoDraw}}
\catcode`\/0 \catcode`\\11
/def/:NoDraw#1\EndDraw{/endgroup}
/catcode`/\0 /catcode`//12
\def\:NoDrawSpecials{\catcode\:J11
\ifnum \:J=\z@
\let \:NoDrawSpecials\relax \fi
\advance\:J \m at ne \:NoDrawSpecials}
\let\:XunitsReg\:Xunits \let\:YunitsReg\:Yunits \Define\EntryExit(4){
\edef\:InOut##1{
\noexpand\ifcase ##1\space
#1\noexpand\or #2\noexpand\or
#3\noexpand\or #4\noexpand\fi}}
\EntryExit(0,0,0,0)\Define\:DrawBox{ \:x0.5\wd\:box
\:y\ht\:box \advance\:y \dp\:box
\divide\:y \tw@
\advance \:X -\:InOut0\:x
\advance \:Y -\:InOut1\:y
{ \advance \:X -\:x
{ \advance \:Y \:y
\ifdim\:Y>\:UBorder \xdef\:UBorder{\the\:Y}\fi
\ifdim\:X<\:LBorder \global\:LBorder\:X\fi
\advance\:X \wd\:box
\ifdim\:X>\:RBorder \global\:RBorder\:X\fi }
\advance \:Y -\:y \advance \:Y \dp\:box
{\:d\:X \advance\:d \wd\:box
\advance\:X -\:TeXLoc \global\:TeXLoc\:d
\vrule width\:X depth\z@ height\z@
\raise \:Y \box\:box} }
\edef\MoveToExit(##1,##2){
\:X\the\:X \:Y\the\:Y
\:x\the\:x \:y\the\:y
\advance\:X ##1\:x
\advance\:Y ##2\:y}
\advance \:X \:InOut2\:x
\advance \:Y \:InOut3\:y }
\Define\ThreeDim{\:Opt[]\:ThreeDim{\p@}}
\def\:ThreeDim[#1](#2){\::ThreeDim[#1](#2,,)}
\def\::ThreeDim[#1](#2,#3,#4,#5){ \bgroup\begingroup
\def\EndThreeDim{ \endgroup\egroup}
\:IIIDtrue \:Zunits#1 \:Z\z@
\def\:temp{#4}
\ifx \:temp\empty \:CosSin{#3\p@} \:divide\:x\:y \:Ey\:x
\:CosSin{#2\p@} \:Ex\:Cons\:Ey\:x \:Ey\:Cons\:Ey\:y
\let\:project\:projectPar
\else \:Ex#2\:Xunits \:Ey#3\:Yunits \:Ez#4\:Zunits
\let\:project\:projectPer
\fi
\def\LineAt{\:tDLn}
\def\LineTo{\:tLnTo}
\def\MoveTo{\:tMvTo}
\def\Line{\:tLn}
\def\Move{\:tMv}
\def\Scale{\:tResize}
\def\Units{\:tUnits}\def\RotateTo{\:tRotateTo}
\def\Rotate{\:tRotate}
\def\MoveF{\:tMvF}
\:Vdirection\z@ \def\LineToLoc{\:tLnToLoc} } \Define\:projectPer{
\:diff\:x\:X\:Ex \:diff\:y\:Y\:Ey
\:diff\:xxxx\:Z\:Ez
\:divide\:x\:xxxx \:divide\:y\:xxxx
\:x-\:Cons\:Ez\:x \:y-\:Cons\:Ez\:y
\advance\:x \:Ex \advance\:y \:Ey}
\Define\:projectPar{
\:x\:Cons\:Ex\:Z \advance\:x \:X
\:y\:Cons\:Ey\:Z \advance\:y \:Y}
\def\:tDLn(#1,#2,#3,{\:tMvTo(#1,#2,#3)
\:tLnTo(}
\Define\:tMvTo(3){ \:X#1\:Xunits
\:Y#2\:Yunits \:Z#3\:Zunits}
\Define\:tMv(3){ \advance\:X #1\:Xunits
\advance\:Y #2\:Yunits
\advance\:Z #3\:Zunits}
\Define\:tResize(3){ \:Xunits#1\:Xunits
\:Yunits#2\:Yunits \:Zunits#3\:Zunits
\:AdjRunits}
\Define\:tUnits(3){ \:Xunits#1 \relax
\:Yunits#2 \relax \:Zunits#3
\:AdjRunits}\Define\:tLnTo(3){
\:project \edef\:temp{\:x\the\:x \:y\the\:y}
\:X#1\:Xunits \:Y#2\:Yunits \:Z#3\:Zunits
\:DLN}
\Define\:tLn(3){
\:project \edef\:temp{\:x\the\:x \:y\the\:y}
\advance\:X #1\:Xunits
\advance\:Y #2\:Yunits
\advance\:Z #3\:Zunits \:DLN}
\Define\:DLN{
\TwoDim \:temp \LineTo(\:x\du,\:y\du)
\EndTwoDim }\Define\TwoDim{\bgroup\begingroup
\def\EndTwoDim{\endgroup\egroup}
\:loadIID
\if:IIID \:IIIDfalse \:project \:X\:x \:Y\:y
\:CommonIID \fi
\Units(\:Xunits,\:Yunits)}
\newif\if:rotated
\Define\RotatedAxes(2){\begingroup
\def\EndRotatedAxes{\endgroup}
\if:IIID \:IIIDfalse
\:project \:X\:x \:Y\:y
\:CommonIID \fi
\:DK#2\p@ \advance\:DK -#1\p@
\advance\:DK -\:CVXXX \:NormalizeDeg\:DK
\ifdim \:DK<\:mmp \:wrn4{(#1,#2)}
\else
\:DK#1\p@ \:NormalizeDeg\:DK \:CosSin\:DK
\:Xunitsx\:x \:Xunitsy\:y
\:DK#2\p@ \advance\:DK -\:XC \:NormalizeDeg\:DK \:CosSin\:DK
\edef\Units(##1,##2){\noexpand\:Units(##1,##2)
\:Xunitsx \:Cons\:Xunitsx\:Xunits
\:Xunitsy \:Cons\:Xunitsy\:Xunits
\:Yunitsx-\:Cons\:y\:Yunits
\:Yunitsy \:Cons\:x\:Yunits } \fi
\def\Scale{\:rResize} \def\MoveTo{\:rMvTo}
\def\Move{\:rMv}
\def\LineTo{\:rLnTo}
\def\Line{\:rLn}
\def\LineAt{\:rDLn}
\def\MoveF{\:rMvF}\def\:InitOval{\:rInitOval}
\MarkLoc(:org) \Units(\:Xunits,\:Yunits) \:rotatedtrue }
\newdimen\:Xunitsx \newdimen\:Xunitsy
\newdimen\:Yunitsx \newdimen\:Yunitsy
\Define\:rResize(2){
\:Xunits #1\:Xunits \:Yunits #2\:Yunits
\:Xunitsx#1\:Xunitsx \:Xunitsy#1\:Xunitsy
\:Yunitsx#2\:Yunitsx \:Yunitsy#2\:Yunitsy }
\def\:rdu#1{%
\ifx #1\:Xunits \units:i\else
\ifx #1\:Yunits \units:i\else
\ifx #1\:Zunits \units:i\else #1\fi \fi \fi }
\def\units:i{\Units(\p@,\p@)}
\Define\:rMvTo{\MoveToLoc(:org) \:rMv}
\Define\:rMv(1){ \:rxy(#1)
\advance\:X \:x \advance\:Y \:y}
\Define\:rLnTo(1){ \MarkLoc(:a) \:rMvTo(#1) {\LineToLoc(:a)} }
\Define\:rLn(1){ \:rxy(#1) \:Ln(\:x\du,\:y\du) }
\def\:rDLn(#1,#2,{\:rMvTo(#1,#2)\:rLnTo(}
\Define\:rxy(2){ \XSaveUnits \let\du=\:rdu
\:Zunits\p@ \:Zunits#1\:Zunits
\:x\:Cons\:Zunits\:Xunitsx
\:y\:Cons\:Zunits\:Xunitsy \XRecallUnits \XSaveUnits
\:Zunits\p@ \:Zunits#2\:Zunits
\advance\:x \:Cons\:Zunits\:Yunitsx
\advance\:y \:Cons\:Zunits\:Yunitsy \XRecallUnits \let\du=\:svdu}
\Define\:rMvF(1){ \:CosSin\:direction \XSaveUnits \let\du=\:rdu
\:Zunits\p@ \:Zunits#1\:Zunits
\:x\:Cons\:Zunits\:x \:y\:Cons\:Zunits\:y
\edef\:temp{(\:Cons\:x,\:Cons\:y)} \expandafter\Move\:temp
\XRecallUnits \let\du=\:svdu}
\Define\:AdjRunits{
\:Xunitsx\:Xunits \:Xunitsy\z@
\:Yunitsx\z@ \:Yunitsy\:Yunits}
\Define\Text{ \setbox\:box
\vtop\bgroup \edef\DoReg{\the\DoReg}
\hyphenpenalty\@M \exhyphenpenalty\@M
\catcode`\ 10 \catcode`\^^M13 \catcode`\^^I10
\catcode`\&4 \let~\space \csname ;catcode\endcsname %
%
\:Text} \catcode`\^^M13 %
\def\:Text(--#1--){%
\:SetLines#1\hbox{}^^M--)^^M %
\egroup %
\if:IIID \TwoDim \:DrawBox \EndTwoDim %
\else \:DrawBox \fi} %
\def\:SetLines#1^^M{ %
\def\:TextLine{#1} %
\ifx \:TextLine\:LastLine \let\:temp\relax %
\else \def\:temp{ %
\:IndirectLines#1\relax~~--)~~\:SetLines}%
\fi \:temp } \catcode`\^^M9
\def\:IndirectLines#1~~{ \def\:TextLine{#1}
\ifx \:TextLine\:LastLine \let\:temp\relax
\else \def\:temp{\:AddLine{#1}\:IndirectLines}
\fi \:temp }
\Define\:LastLine{--)}
\def\:AddLine#1{
\ifvmode \noindent \hsize\z@ \else
\hfil \penalty-500 \hbox{} \fi
\hfil#1
\setbox\:box\hbox{#1}
\ifdim \wd\:box>\hsize \hsize\wd\:box \fi}\def\TextPar#1#2{
\def\:TxtPar##1(##2){##1(--##2--)}
\edef\:temp{\expandafter\noexpand\csname :\string#2\endcsname}
\edef#2{\noexpand\:TextPar\expandafter\noexpand\:temp}
\expandafter\let\:temp\:undefined
\expandafter#1\:temp}
\catcode`\^^M13
\def\:TextPar#1{\begingroup \catcode`\&4 %
\csname ;catcode\endcsname %
%
\catcode`\ 10 \catcode`\^^M13 \catcode`\^^I10 %
\:TPar{#1}} \catcode`\^^M9 %
\def\:TPar#1(--#2--){\endgroup
#1(--#2--) }
\newdimen\:direction \newdimen\:Vdirection
\Define\:Rotate(1){ \advance \:direction #1\p@
\:NormalizeDeg\:direction }
\Define\:RotateTo(1){ \:direction #1\p@
\:NormalizeDeg\:direction }
\Define\:tRotate(2){
\advance\:Vdirection #2\p@
\:NormalizeDeg\:Vdirection \:Rotate(#1)}
\Define\:tRotateTo(2){
\:Vdirection #2\p@
\:NormalizeDeg\:Vdirection \:RotateTo(#1)}
\Define\LineF(1){\MarkLoc(,)\MoveF(#1) {\LineToLoc(,)}}
\Define\:MvF(1){ \:CosSin\:direction
\:d#1\:Xunits \advance\:X \:Cons\:d\:x
\:d#1\:Yunits \advance\:Y \:Cons\:d\:y }
\Define\MoveFToOval(2){
\:NormalizeDeg\:direction \:CosSin\:direction \:Zunits\p@
\:d#2\:Zunits \:x\:Cons\:d\:x
\ifdim \:d=\z@ \:err5{...,\:Cons\:d} \fi
\:d#1\:Zunits \:y\:Cons\:d\:y
\ifdim \:d=\z@ \:err5{\:Cons\:d,...} \fi \:SearchDir
\XSaveUnits
\if:rotated
\:Zunits\p@ \:Zunits#1\:Zunits
\:x\:Cons\:Zunits\:Xunits
\:Zunits\p@ \:Zunits#2\:Zunits
\:y\:Cons\:Zunits\:Yunits
\else
\:x#1\:Xunits \:y#2\:Yunits \fi \relax
\Units(\:x,\:y)
\:Vdirection\:direction \:direction\:ddd
\MoveF(\@ne) \:direction\:Vdirection \XRecallUnits }
\Define\:tMvF(1){ \:CosSin\:Vdirection
\:d #1\:Zunits \advance\:Z \:Cons\:y\:d
\:xx#1\:Xunits \:yy#1\:Yunits
\:xx\:Cons\:x\:xx \:yy\:Cons\:x\:yy
\:CosSin\:direction
\:x\:Cons\:xx\:x \:y\:Cons\:yy\:y
\advance\:X \:x \advance\:Y \:y } \Define\CSeg{\:Opt[]\:CSeg1}
\def\:CSeg[#1]#2(#3,#4){ \MarkLoc($^)
\MoveToLoc(#4) \:x\:X \:y\:Y
\if:IIID \:d\:Z \fi \MoveToLoc(#3)
\advance\:x -\:X \:x#1\:x
\advance\:y -\:Y \:y#1\:y
\if:IIID \advance\:d -\:Z \:d#1\:d \fi
\:t{#2}
\edef\:temp{\the\:t(
\expandafter\:Frac\the\:x\noexpand\:du,
\expandafter\:Frac\the\:y\noexpand\:du \if:IIID ,
\expandafter\:Frac\the\:d\noexpand\:du \fi)}
\MoveToLoc($^) \:temp}\Define\LSeg{\:Opt[]\:LSeg1}
\def\:LSeg[#1]#2(#3,#4){ \:distance(#3,#4)
\:d#1\:d \:t{#2}
\edef\:temp{\the\:t(\expandafter\:Frac\the\:d\noexpand\:du)}
\:temp}\Define\DSeg{\:Opt[]\:DSeg1}
\def\:DSeg[#1]#2(#3,#4){ \MarkLoc(^)
\MoveToLoc(#4) \:xxx\:X \:yyy\:Y \:xxxx\:Z
\MoveToLoc(#3)
\advance\:xxx -\:X \advance\:yyy -\:Y
\ifdim \:AbsVal\:xxx<\:mmmp
\ifdim \:AbsVal\:yyy<\:mmmp \:wrn5{#3,#4}
\fi\fi
\if:IIID
\advance \:xxxx -\:Z
\:divide\:xxx\:Xunitsx
\:divide\:yyy\:Yunitsy
\:divide\:xxxx\:Zunits
\:x\:xxx \:y\:yyy \:ddd\z@ \:length
\:x\:d \:y\:xxxx \:SearchDir
\:yyyy\:ddd
\:x\:xxx \:y\:yyy
\else
\:x \:AbsVal\:Yunitsy
\:y \:AbsVal\:Xunitsy \ifdim \:y>\:x \:x\:y \fi
\:y \:AbsVal\:Yunitsx \ifdim \:y>\:x \:x\:y \fi
\:y \:AbsVal\:Xunitsx \ifdim \:y>\:x \:x\:y \fi
\:K \:InCons\:x \relax
\ifnum \:K<\thr@@ \:K\@ne
\else \ifnum \:K<\sixt@@n \:K4
\else \ifnum \:K<\:XC \:K\sixt@@n
\else \ifnum \:K<\@m \:K\@cclvi
\fi \fi \fi \fi
\divide\:xxx \:K
\divide\:yyy \:K
\:x \:Cons\:Yunitsy\:xxx
\advance\:x -\:Cons\:Yunitsx\:yyy
\:y-\:Cons\:Xunitsy\:xxx
\advance\:y \:Cons\:Xunitsx\:yyy
\fi
\:SearchDir \:ddd#1\:ddd \:t{#2}
\edef\:temp{\the\:t(
\:Cons\:ddd \if:IIID ,\:Cons\:yyyy \fi)}
\MoveToLoc(^) \:temp} \def\:theDoReg{\def\DoReg{\the\:DoReg}}
\Define\MarkLoc{ \:theDoReg
\expandafter\edef \csname \:MarkLoc}
\Define\MarkGLoc{ \:theDoReg
\expandafter\xdef \csname \:MarkLoc}
\Define\:MarkLoc(1){ Loc\space#1:\endcsname{
\:X\the\:X \:Y\the\:Y
\if:IIID \:Z\the\:Z \fi } \let\DoReg\:DoReg }
\Define\MoveToLoc(1){ \:theDoReg \expandafter\ifx
\csname Loc\space#1:\endcsname\relax \:err2{#1}\fi
\csname Loc\space#1:\endcsname \let\DoReg\:DoReg }
\Define\MarkPLoc(1){ \:theDoReg
\if:IIID \:project
\expandafter\edef \csname Loc\space#1:\endcsname{
\:X\the\:x \:Y\the\:y \:Z\z@}
\else \:err1\MarkPLoc \fi \let\DoReg\:DoReg}
\Define\WriteLoc(1){{ \:theDoReg \edef\:temp{#1}
\ifx \:temp\empty \else \MoveToLoc(#1) \fi
\immediate\write\sixt@@n{...
\:temp=(\the\:X,\the\:Y\if:IIID,\the\:Z\fi)}}}
\Define\:LnToLoc(1){
\:x\:X \:y\:Y \MoveToLoc(#1)
{ \:LnTo(\:x\du,\:y\du) }}
\Define\:tLnToLoc(1){
\:xx\:X \:yy\:Y \:dd\:Z \MoveToLoc(#1)
{ \:tLnTo(\:xx\du,\:yy\du,\:dd\du) }}\def\:GetLine#1#2#3#4#5{
\MoveToLoc(#1) \divide\:X \:eight \divide\:Y \:eight
#3\:X #4\:Y
\MoveToLoc(#2) \divide\:X \:eight \divide\:Y \:eight
\advance #3 -\:X \advance #4 -\:Y
#5\:Cons#3\:Y \advance #5 -\:Cons#4\:X
\divide #3 \:eight \divide #4 \:eight \relax }
\def\MoveToLL(#1,#2)(#3,#4){
\:GetLine{#1}{#2}\:x \:y \:xxx
\:GetLine{#3}{#4}\:xx\:yy\:xxxx
\:ddd \:Cons\:x \:yy \advance\:ddd -\:Cons\:xx\:y
\ifdim \:AbsVal\:ddd < \:mmmp
\:X\@cclv\p@ \:Y\:X
\:wrn3{(\string#1,\string#2)(\string#3,\string#4)}
\else
\:divide\:xxx\:ddd \:divide\:xxxx\:ddd
\:X\:Cons\:xxx\:xx \advance\:X -\:Cons\:xxxx\:x
\:Y\:Cons\:xxx\:yy \advance\:Y -\:Cons\:xxxx\:y
\fi }\Define\MoveToCC{\:Opt[]\:MoveToCC{}}
\def\:MoveToCC[#1](#2,#3)(#4,#5){
\:UserUnits(#2,#3)(#4,#5)
\:distance($#2,$#4)
\ifnum \:d<\:mp \MoveToLoc(#3)
\:wrn3{(#1,#2)(#3,#4)}
\else \:xx \:d
\:distance($#2,$#3) \:xxx\:d
\:distance($#5,$#4)
\:yy \:xxx \advance\:yy -\:d
\:yyy\:xxx \advance\:yyy \:d
\:divide\:yy\:xx \:yy\:Cons\:yy\:yyy
\advance\:yy \:xx \divide\:yy \tw@
\:yyy \ifdim \:AbsVal\:xxx>\:AbsVal\:yy \:xxx \else \:yy \fi
\ifdim \:AbsVal\:yyy<\:mp \:yyy\z@ \else
\:divide\:xxx\:yyy \:sqr\:xxx
\:yyyy\:yy \:divide\:yyyy\:yyy \:sqr\:yyyy
\advance\:xxx -\:yyyy \:Sqrt\:xxx
\:yyy\:Cons\:yyy\:xxx
\fi
\MoveToLoc($#4) \:x\:X \:y\:Y \:divide\:yy\:xx
\MoveToLoc($#2)
\advance\:x -\:X \advance\:y -\:Y
\advance\:X \:Cons\:yy\:x
\advance\:Y \:Cons\:yy\:y
\:divide\:yyy\:xx
\advance\:X #1\:Cons\:yyy\:y
\advance\:Y -#1\:Cons\:yyy\:x
\fi \:SysUnits }\def\:UserUnits(#1,#2)(#3,#4){
\:xx\:Xunitsx \:xxx\:Xunitsy
\:yy\:Yunitsx \:yyy\:Yunitsy
\:xxxx\:Cons\:yy\:xxx \advance\:xxxx \:Cons\:yyy\:xx
\ifdim \:AbsVal\:xxxx>\:mmmp
\:divide\:xx\:xxxx \:divide\:xxx{-\:xxxx}
\:divide\:yy{\:xxxx} \:divide\:yyy\:xxxx
\fi
\:UnLoc(#1) \:UnLoc(#2)
\:UnLoc(#3) \:UnLoc(#4)}\Define\:SysUnits{
\MoveTo(\:Cons\:X,\:Cons\:Y)}\Define\:UnLoc(1){
\MoveToLoc(#1) \:d\:Cons\:yyy\:X
\advance\:d \:Cons\:yy\:Y
\:Y\:Cons\:xx\:Y
\advance\:Y \:Cons\:xxx\:X \:X\:d
\MarkLoc($#1)}\def\MoveToLC{\:Opt[]\:MoveToLC{}}
\def\:MoveToLC[#1](#2,#3)(#4,#5){
\:UserUnits(#2,#3)(#4,#5)
\MoveToLoc($#2) \:x\:X \:y\:Y
\MoveToLoc($#3) \advance\:x -\:X
\advance\:y -\:Y
\edef\:temp{ \:xxx\the\:x \:yyy\the\:y }
\MoveToLoc($#4)
\advance\:X \:y \advance\:Y -\:x
\MarkLoc(^$) \MoveToLL($#4,^$)($#2,$#3)
\MarkLoc(^$)
\:distance($#4,$#5) \:xx\:d \:distance($#4,^$)
\ifdim \:d>\:xx \:wrn3{(#2,#3)(#4,#5)}
\else \ifdim \:d<\:mmp \:yy\:xx \else \:yy\:d
\:divide\:yy\:xx \:sqr\:yy
\:yy-\:yy \advance\:yy \p@
\:Sqrt\:yy \:yy\:Cons\:xx\:yy
\fi \fi
\:temp \:x\:xxx \:y\:yyy \:length \:xx\:d
\:divide\:xxx\:xx
\:divide\:yyy\:xx
\advance\:X #1\:Cons\:yy\:xxx
\advance\:Y #1\:Cons\:yy\:yyy
\:SysUnits } \def\Object#1{\:Opt(){\:DefineSD#1}0}
\def\:DefineSD#1(#2){\begingroup \:multid#1
\:DraCatCodes \:DefSD#1(#2)}
\def\:DefSD#1(#2)#3{
\expandafter\::Define\csname\string#1.\endcsname(#2){
\:t{\:SubD{#3}}
\if:IIID \edef\:temp{\noexpand\TwoDim \the\:t
\noexpand\EndTwoDim}
\else \def\:temp{\the\:t} \fi \:temp}
\def#1{\def\:SDname{\csname\string#1.\endcsname}
\:Opt[]\:CallSD{}}}
\def\:CallSD[#1]{ \edef\:Entry{#1} \:SDname }\def\:SubD#1{
\let\::RecallXLoc\:AddXLoc \gdef\:AddXLoc{}
\edef\:RecallBor{ \global\:LBorder \the\:LBorder
\global\:RBorder \the\:RBorder
\xdef\noexpand\:UBorder{\:UBorder}
\global\:TeXLoc\the\:TeXLoc }
\global\:TeXLoc\z@
\setbox\:box\vbox{\EntryExit(0,0,0,0)
\begingroup
\def\MarkXLoc{\:MarkXLoc}
\:InDraw #1
\endgroup
\:SetDrawWidth \let\:XLoc\relax
\xdef\:AddXLoc{\:dd\the\:LBorder \:AddXLoc}}
\:RecallBor
\:ddd\dp\:box
\ifx \:Entry\empty
\:DrawBox
\else
\let\:RecallIn\:InOut
\:x\:X \:y\:Y
\def\:XLoc(##1,##2,##3){
\def\:temp{##1}
\ifx \:temp\:Entry \:X\:x \advance\:X -##2
\:Y\:y \advance\:Y -##3
\fi}
\:AddXLoc
\advance\:X \:dd \advance\:Y -\:ddd
\EntryExit(-1,-1,\:InOut2,\:InOut3) \:DrawBox
\let\:InOut\:RecallIn
\fi
\MarkLoc(^)
\MoveToExit(-1,-1)
\:xxx\:X \:yyy\:Y \advance\:yyy \:ddd
\def\:XLoc(##1,##2,##3){
\:X\:xxx \advance\:X ##2 \advance\:X -\:dd
\:Y\:yyy \advance\:Y ##3
\MarkLoc(##1)}
\:AddXLoc
\MoveToLoc(^)
\ifx \:Entry\empty \else \MoveToLoc(\:Entry) \fi
\global\let\:AddXLoc\::RecallXLoc }
\Define\:MarkXLoc(1){ \:theDoReg
\let\:XLoc\relax
\xdef\:AddXLoc{\:AddXLoc \:XLoc(#1,\the\:X,\the\:Y)}
\let\DoReg\:DoReg}
\catcode`\ 10 \catcode`\^^M5 \catcode`\^^I10
\let\wlog\:wlog \let\:wlog\:undefined
\:RestoreCatcodes \tracingstats1 \endinput
--- NEW FILE ProTex.sty ---
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% v 1.5
% ProTex %
% Copyright (C) 1990,1991 by Eitan M. Gurari %
% %
% This program can redistributed and/or modified under %
% the terms of the LaTeX Project Public License %
% Distributed from CTAN archives in directory %
% macros/latex/base/lppl.txt; either version 1 of the %
% License, or (at your option) any later version. %
% %
% However, you are allowed to modify this program %
% without changing its name, if you modify its %
% signature. Changes to the signature can be introduced %
% with a directive of the form %
% \message{signature} %
% %
% gurari at cse.ohio-state.edu %
% http://www.cse.ohio-state.edu/~gurari %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\expandafter\edef\csname :RestoreCatcodes\endcsname{%
\catcode`\noexpand :=\the\catcode`:%
\catcode`\noexpand @=\the\catcode`@%
\catcode`\noexpand -=\the\catcode`-%
\catcode`\noexpand +=\the\catcode`+%
\catcode`\noexpand ^=\the\catcode`^%
\let\expandafter\noexpand\csname:RestoreCatcodes\endcsname=
\noexpand\undefined}
\catcode`\:=11 \catcode`\@=11 \catcode`\^=7
\def\:latexpg{\ifx\pageno\:undefined
\let\pageno=\c at page \fi}
\:latexpg
\def\:minus{-} \catcode`\-=13 \catcode`\+=13
\def\Code#1#2{%
{\:TraceDef#1{#2}}%
\ifx #1\:undefined \else \def#1{}%
\:warn{\string\Code\space redefines \string#1}\fi
\ifx #1\:undefined \ModifyCode{#1}\fi
\gdef#1{-{#2}{\string#1}}\AppendCode#1}\def\ModifyCode#1{}
\def\:warn#1{\immediate \write16{l.\the\inputlineno
\space\:minus\string- Warning \:minus\string- #1}}
\def\:CheckCommand#1#2{%
\def-##1##2{\let\:undefined=\relax}%
\def+##1##2{}%
#2\relax
\ifx \:undefined\relax \else
\errmessage{\string#1\string#2 without
\string\Code\string#2}\fi}
\def\AppendCode#1{%
\begingroup
\:CheckCommand\AppendCode#1%
\:defaultcats
\def\:ScanAppend##1{\endgroup
\:ifempty{##1}\else
\global\advance\:CodeNumber by 1
{\def\:TagCs{\string#1.\the\:CodeNumber}%
\:WriteTrc{DefineCode}}%
\:ExpandDef#1{+{##1}}{\noexpand
{\CodeId{\string#1}{\the\:CodeNumber}\noexpand}}%
\AfterCode{#1}%
\fi}%
\ModifyAppendCode{#1}\relax
\:ScanAppend}\def\ModifyAppendCode#1{} \def\AfterCode#1{}
\def\:ifempty#1{\def\:parm{#1}%
\ifx \:parm\empty}\def\CodeId#1#2{#1.#2} \newcount\:CodeNumber
\newtoks\:tokens
\def\:ExpandDef#1#2#3{%
\:tokens=\expandafter{#1#2}%
\xdef#1{\the\:tokens #3}}\def\:defaultcats{%
\:NoSpecials{12}{0}{255}%
\:NoSpecials{11}{65}{90}%
\:NoSpecials{11}{97}{122}%
\catcode`\\=0 \catcode`\{=1 \catcode`\}=2
\catcode`\ =13 \catcode`\^^M=13 \catcode`\^^I=13 }
\def\:NoSpecials#1#2#3{\edef\:temp{\the\:CodeNumber}%
\global\:CodeNumber=#3
\def\:next{\catcode\:CodeNumber=#1
\ifnum \:CodeNumber=#2 \let\:next=\relax \fi
\global\advance\:CodeNumber by \:minus1 \:next}\:next
\global\:CodeNumber=\:temp }
\def-#1#2{{\CodeFont \WindowTitle{#1}}}
\def+#1#2{}
\def\WindowTitle#1{\leavevmode \hbox{$\triangleleft
\triangleleft$}~#1~\hbox{$\triangleright
\triangleright$}}
\let\CodeFont=\tt
\def\ShowCode#1{%
\def\:test{#1}%
\ifx \:test\:minus \expandafter\:ShowCode \else
\:ShowCode#1\fi}\def\:ShowCode#1{%
\begingroup \:ShowCommands
\:SpTbLn
\def\\{\char 92 }%
\def\{{\char 123 }%
\def\}{\char 125 }%
\ifvmode
\def\:Sp{\leavevmode\phantom{x}}%
\def\:Tb{\:Sp\:Sp}%
\def\:Ln{\leavevmode\par}%
\else
\def\:Sp{ }%
\def\:Tb{ \ignorespaces}%
\def\:Ln{\:Tb}%
\fi
\ifvmode \everypar={}%
\:CodeSkip
\parskip=0em \parindent=\:minus3em
\advance \leftskip by 6em
%
\def\:TopTitle##1{{\:TitleShift
\noindent \hfil \:FrontTitle{##1}\par
\nobreak \smallskip}}%
\def\:BottomTitle{{\par \nobreak \:TitleShift
\noindent \hfil \:BackTitle\par}}%
\else
\def\:TopTitle##1{\:FrontTitle{##1} }%
\def\:BottomTitle{ \:BackTitle}%
\def\:CodeSkip{}%
\fi
\def\:FrontTitle##1{\PortTitle{##1}\:AppendSign}%
\def\:BackTitle{\hbox{$\diamond\diamond\diamond$}}%
%
\def\PortTitle##1{\leavevmode \hbox{$\triangleright
\triangleright$}~##1~\hbox{$\triangleleft
\triangleleft$}}%
\def-##1##2{}%
\def+##1##2{\let+=\:next}%
\def\:next##1##2{\def\:AppendSign{\char43 }}%
\def\:AppendSign{}%
#1\relax
\def-##1##2{}%
\def+##1##2{\def\:LastCodeLabel{##2}}%
\def\:LastCodeLabel{}%
#1\relax
\ifx\:LastCodeLabel\empty\else
{\def\:TagCs{\:LastCodeLabel}\:WriteTrc{ShowCode}}%
\fi
\CodeFont
\:CheckCommand{\ShowCode}{#1}%
\ModifyShowCode{#1}\relax
\ifx \:test\:minus \else
\def-##1##2{\:TopTitle{##1}}%
\def+##1##2{}%
\ModifyFrontTitle{#1}\relax
#1\relax
\fi
\def-##1##2{}%
\def+##1##2{\def\:LastCode{##1}}%
\def\:LastCode{}%
\ModifyLastCode{#1}\relax
#1\relax\def-##1##2{{\def\:TagCs{##2}\:WriteTrc{ShowTitle}}%
\WindowTitle{##1}}%
\def+##1##2{}%
\ModifyShowLastCode{#1}\relax
\:LastCode
\ifx \:test\:minus \else
\:BottomTitle
\fi
\:CodeSkip
\endgroup}
\def\ModifyShowCode#1{}
\def\:CodeSkip{\ifdim \CodeSkipAmount>0pt
\vskip\:minus\lastskip \fi
\vskip\CodeSkipAmount}
\def\CodeSkipAmount{\medskipamount}
\def\ShiftTitle#1{%
\def\:TitleShift{\advance \leftskip by #1}}
\ShiftTitle{\:minus6em}
\def\ModifyFrontTitle#1{}\def\ModifyLastCode#1{}
\def\ModifyShowLastCode#1{}\begingroup
\catcode`\.=10 \catcode`\^^I=13 \catcode`\^^M=13%
\catcode`\ =13%
...\gdef\:SpTbLn{%
......\def {\:Sp}\def^^M{\:Ln}\def^^I{\:Tb}}%
\endgroup\begingroup
\catcode`\{=12 \catcode`\}=12
\catcode`\[=1 \catcode`\]=2
\gdef\:lbrc[{] \gdef\:rbrc[}]
\catcode`\,=0 \catcode`\\=12
,gdef,:backslash[\]
,endgroup
\catcode`\%=12 \catcode`\@=14
\def\:ShowCommands{@ \tempor
\ifvmode
\linepenalty=100
\def\NL%{$\rightarrow\rightarrow$\hfill\break}@
\def\%##1\%{{\CommentFont
\def\:Tb{ \ignorespaces}@
\def\:Sp{ }@
\def\:Ln{\hfill\break}@
##1}}@
\else
\def\NL%{}@
\def\%##1\%{{\CommentFont ##1}}@
\fi}
\def\CommentFont{\it}
\def\:OutCommands{\def\NL%{}\def\%##1\%{}}
\catcode`\%=14 \catcode`\@=11 \def\:OutputCode#1{%
\begingroup \:OutCommands
\:CheckCommand{\OutputCode}{#1}%
\:latexpg
{\def\:TagCs{\string#1}\:WriteTrc{OutputCode}}%
\def\Tag##1##2{}\def\Ref##1{}%
\:SpTbLn
\def\:Sp{ }%
\def\:Tb{\:Sp\:Sp}%
\newlinechar`\^^J \def\:Ln{^^J}%
\def\\{\:backslash}%
\def\{{\:lbrc}%
\def\}{\:rbrc}%
\def\Extension{prg}%
\def\:WriteCode{\immediate\write15{#1}}%
% rules for expanding the code macros
\def-##1##2{}%
\def+##1##2{\:comment{##2\ifx \CodeId\:gobbleii\else...\fi}##1%
\:comment{\ifx \CodeId\:gobbleii\else...\fi##2}}%
% name for the auxiliary code file
\def\:gobble##1{}%
\def\:FileName{\expandafter
\:gobble\string#1.\Extension}%
% writing the file
\ModifyOutputCode{#1}\relax
\immediate\openout15=\:FileName \:WriteCode
\immediate\closeout15
% notifying the user
\ProTexMssg{\string-\string-\string-
Writing file \string-\string-\string-
\:FileName\space\string-\string-\string-}%
\endgroup }
\def\:gobbleii#1#2{}
\def\ProTexMssg{\immediate\write16}
\def\:ParOutputCode#1]#2{{%
\let\:ModifyOutputCode=\ModifyOutputCode
\def\ModifyOutputCode##1{\:ModifyOutputCode{##1}%
\def\Extension{#1}}%
\:OutputCode #2}}
\def\OutputCode#1{%
\ifx#1[\let\:next=\:ParOutputCode
\else \def\:next{\:OutputCode#1}\fi \:next}
\def\ModifyOutputCode#1{}\def\:comment#1{}
\def\Comment{\begingroup
\:defaultcats
\::comment}
\def\::comment#1#2{\endgroup
\def\:flag{}%
\:ifempty{#1}\else \def\:flag{.}\fi
\:ifempty{#2}\else \def\:flag{.}\fi
\ifx \:flag\empty \def\:comment##1{}%
\else \def\:comment##1{#1##1#2}\fi}
\def\Ref#1{%
\:ifempty{#1}\:warn{Empty field in \noexpand\Ref}%
\else
\expandafter\ifx \csname cw:#1\endcsname \relax
\:NoTag{#1}%
\else \expandafter\csname cw:#1\endcsname \fi
\fi}
\def\Tag#1#2{%
\:ifempty{#1}\:warn{First field
empty in \noexpand\Tag}%
\else
\begingroup
\:latexpg
\edef\:head{\:TagCs\space{#1}{#2}}%
\def\:write{\write\:refout}%
\expandafter \expandafter
\expandafter\:write
\expandafter{\:head{\the\pageno}}%
\endgroup
\fi}
\let\:trc=\Tag
\def\:TagCs{\string\:CrossWord} \catcode`\-=12 \catcode`\+=12
\ifx \:refout\:UnDef
\openin15 \jobname.xref
\ifeof15 \immediate\write16{No file \jobname.xref}
\def\:NoTag#1{\hbox{$???$}}
\else
\begingroup
\def\:CrossWord#1#2#3{%
\def\:parm{#2}%
\ifx \:parm\empty \:AddTag{#1}{#3}\else
\:AddTag{#1}{#2}\fi}
\def\:AddTag#1#2{%
\expandafter \ifx \csname cw:#1\endcsname \relax
\def \:entries{#2}%
\else \edef\:entries{\csname cw:#1\endcsname , #2}%
\fi
\expandafter \xdef \csname cw:#1\endcsname{\:entries}}
\input \jobname.xref
\endgroup
\def\:NoTag#1{\hbox{$???$}%
\:warn{\string\Ref\string{\string#1\string}?}}
\fi
\closein15
\fi
\catcode`\-=13 \catcode`\+=13
\ifx \:refout\:UnDef
\csname newwrite\endcsname\:refout
\openout\:refout=\jobname.xref
\fi
\newwrite\:trcfile
\immediate\openout\:trcfile=\jobname.trc
\def\:WriteTrc#1{{\let\:refout=\:trcfile
\:trc{\string#1}{\the\inputlineno}}}
\def\:TraceDef#1#2{\:tokens={#2}%
\immediate\write\:trcfile{%
\string#1\space{DefineTitle}{{\the
\:tokens};;\the\inputlineno}{}}}
\def\:AlProTex{\ifx \:next[
\def\AlProTex[##1]##2{\egroup \def\AlProTex{##2}\input ##1 }
\else
\def\AlProTex##1{\egroup \def\AlProTex{##1}\input AlProTex.sty }
\fi \let\:AlProTex=\:undefined \AlProTex}
\def\AlProTex{\bgroup \catcode`\@=12 \catcode`\^=7 \catcode`\_=8
\futurelet\:next\:AlProTex}
\ifx \inputlineno\undefined
\csname newcount\endcsname\inputlineno
\let\:oldNoSpecials=\:NoSpecials
\def\:NoSpecials#1#2#3{\ifnum #3>127
\:oldNoSpecials{#1}{#2}{127}\else
\:oldNoSpecials{#1}{#2}{#3}\fi }
\fi
\:RestoreCatcodes \endinput
tetex-tex4ht-1.0-prev.patch:
--- NEW FILE tetex-tex4ht-1.0-prev.patch ---
--- tex4ht-1.0.2006_10_24_0142/debian/lit/rebuild.sh.prev 2006-10-31 11:10:45.000000000 +0100
+++ tex4ht-1.0.2006_10_24_0142/debian/lit/rebuild.sh 2006-11-03 00:08:29.000000000 +0100
@@ -3,6 +3,8 @@
# This program is released into the public domain.
# You may do whatever you please with it.
+set -x
+
# This script takes the literate sources for Eitan Gurari's TeX4HT
# system and produces a directory tree like the one that is
# distributed as a tar.gz archive. It is gleaned from the 3-4 line
@@ -30,6 +32,8 @@
DESTDIR=${TOP}/dest
DEBDIR=${TOP}/debian
+unset TEXINPUTS TEXMFCNF TEX4HTINPUTS T4HTINPUTS \
+ TEX4HTFONTSET TEXINPUTS_tex4ht TEXINPUTS_t4ht
# We need a different texmf.cnf that expands
# TeX's memory usage. We will create this in
# the following directory:
@@ -119,10 +123,13 @@
[ -d ${LITDIR} -a -d ${DEBDIR} ] || \
(echo "Must be in top-level source directory to run this"; exit 0)
+rm -rf ${DESTDIR}
+
# Initialise the working environment
mkdirheir
makesomefiles
setupenv
+
cd $DESTDIR
# Make tex4ht.c
@@ -131,8 +138,12 @@
# Make t4ht.c
tex tex4ht-t4ht
+# Make htcmd
+tex tex4ht-htcmd
+
# Make scripts
latex tex4ht-mkht
+perl -c mk4ht.perl
latex ./mkht-scripts.4ht
# Make tex4ht.sty
@@ -168,6 +179,7 @@
# The xttl files are for the experimental speech support.
# These are built using xhlatex.
+htlatex xtpipes "xhtml,3,next" "" "-d./"
xhlatex tex4ht-docbook-xttl "html,next,3" "" "-d./"
xhlatex tex4ht-oo-xttl "html,next,3" "" "-d./"
xhlatex tex4ht-html-speech-xtpipes "html,next,3" "" "-d./"
@@ -177,14 +189,18 @@
# Make font files. The Needs directives in this file cause "t4ht" to
# move the files into their correct locations automatically.
-tex tex4ht-fonts-noncjk
-tex tex4ht-fonts-noncjk
-tex4ht tex4ht-fonts-noncjk
-t4ht tex4ht-fonts-noncjk
-latex tex4ht-fonts-4hf
-latex tex4ht-fonts-4hf
-tex4ht tex4ht-fonts-4hf
-t4ht tex4ht-fonts-4hf
+for font in noncjk cjk; do
+tex tex4ht-fonts-${font}
+tex tex4ht-fonts-${font}
+tex4ht tex4ht-fonts-${font}
+t4ht tex4ht-fonts-${font}
+done
+for font in 4hf; do
+latex tex4ht-fonts-${font}
+latex tex4ht-fonts-${font}
+tex4ht tex4ht-fonts-${font}
+t4ht tex4ht-fonts-${font}
+done
movefiles
texclean
tetex-tex4ht-1.0.2006_10_24_0142-nohome.patch:
--- NEW FILE tetex-tex4ht-1.0.2006_10_24_0142-nohome.patch ---
--- tex4ht-1.0.2006_10_24_0142/lit/xtpipes.tex.nohome 2006-11-02 23:03:41.000000000 +0100
+++ tex4ht-1.0.2006_10_24_0142/lit/xtpipes.tex 2006-11-02 23:43:25.000000000 +0100
@@ -70,7 +70,7 @@
\def\StartDir{}\fi
}
\def\SLASH{/}
-\def\MYdir{work.dir}
+\def\MYdir{.}
\expandafter\let\csname !/\endcsname\empty
@@ -117,23 +117,21 @@
\AtEndDocument{\Needs{"
- cd work.dir
- ;
javac -Xlint:unchecked xtpipes/*.java
- -d /home/4/gurari/tex4ht.dir/texmf/tex4ht/bin/.
+ -d texmf/tex4ht/bin/.
;
javac -Xlint:unchecked xtpipes/*/*.java
- -d /home/4/gurari/tex4ht.dir/texmf/tex4ht/bin/.
+ -d texmf/tex4ht/bin/.
;
javac -Xlint:unchecked xtpipes.java
- -d /home/4/gurari/tex4ht.dir/texmf/tex4ht/bin/.
+ -d texmf/tex4ht/bin/.
"}}
% \Needs{"cp xtpipes.dtd xtpipes.dtd.1"}
% \AddFile[xtpipes.dtd](/home/4/gurari/tex4ht.dir/texmf/tex4ht/bin){xtpipes.dtd.1}{xtpipes/lib}
-\AddFile(/home/4/gurari/tex4ht.dir/texmf/tex4ht/bin){xtpipes.dtd}{xtpipes/lib}
+\AddFile{xtpipes.dtd}{texmf/tex4ht/bin/xtpipes/lib}
% \Needs{"
@@ -2507,7 +2505,7 @@
\OutputCodE\<xtpipes-default.4xt\>
}
-\AddFile(/home/4/gurari/tex4ht.dir/texmf/tex4ht/bin){xtpipes-default.4xt}{xtpipes/lib}
+\AddFile{xtpipes-default.4xt}{texmf/tex4ht/bin/xtpipes/lib}
texmf.cnf.patch:
--- NEW FILE texmf.cnf.patch ---
--- texmf.cnf.orig 2006-10-02 00:11:40.000000000 +0200
+++ texmf.cnf 2006-10-25 22:34:21.000000000 +0200
@@ -161,7 +161,7 @@
% Plain TeX. Have the command tex check all directories as a last
% resort, we may have plain-compatible stuff anywhere.
-TEXINPUTS.tex = .;$TEXMF/tex/{plain,generic,}//
+TEXINPUTS.tex = $TEXMF/tex/{plain,generic,}//;.
% Other plain-based formats.
TEXINPUTS.amstex = .;$TEXMF/tex/{amstex,plain,generic,}//
@@ -177,7 +177,7 @@
% latex209, useful for macros that were written for 2.09 and do not
% mention 2e at all, but can be used with 2e.
TEXINPUTS.cslatex = .;$TEXMF/tex/{cslatex,csplain,latex,generic,}//
-TEXINPUTS.latex = .;$TEXMF/tex/{latex,generic,}//
+TEXINPUTS.latex = $TEXMF/tex/{latex,generic,}//;.
TEXINPUTS.olatex = .;$TEXMF/tex/{latex,generic,}//
TEXINPUTS.latex209 = .;$TEXMF/tex/{latex209,generic,latex,}//
@@ -192,8 +192,8 @@
% e-TeX. This form of the input paths is borrowed from teTeX. A certain
% variant of TDS is assumed here, unaffected by the build variables.
-TEXINPUTS.elatex = .;$TEXMF/tex/{latex,generic,}//
-TEXINPUTS.etex = .;$TEXMF/tex/{plain,generic,}//
+TEXINPUTS.elatex = $TEXMF/tex/{latex,generic,}//;.
+TEXINPUTS.etex = $TEXMF/tex/{plain,generic,}//;.
% pdfTeX. This form of the input paths is borrowed from teTeX. A certain
% variant of TDS is assumed here, unaffected by the build variables.
@@ -254,7 +254,7 @@
TEXINPUTS.pdfplatex = .;$TEXMF/tex/{platex,latex,generic,}//
% Earlier entries override later ones, so put this last.
-TEXINPUTS = .;$TEXMF/tex/{$progname,generic,}//
+TEXINPUTS = $TEXMF/tex/{$progname,generic,}//;.
% Metafont, MetaPost inputs.
MFINPUTS = .;$TEXMF/metafont//;{$TEXMF/fonts,$VARTEXFONTS}/source//
@@ -388,6 +388,8 @@
% a program that uses the 'other text files' or 'other binary files'
% search formats, you'll want to add their variables here as well.
T4HTINPUTS = .;$TEXMF/tex4ht//
+TEXINPUTS.tex4ht = .;$TEXMF/tex4ht//
+TEXINPUTS.t4ht = .;$TEXMF/tex4ht/ht-fonts//
% Architecture independent executables
TEXMFSCRIPTS = $TEXMF/scripts//
@@ -494,9 +496,9 @@
% For some xy-pic samples, you may need as much as 700000 words of memory.
% For the vast majority of documents, 60000 or less will do.
%
-main_memory = 1000000 % words of inimemory available; also applies to inimf&mp
-extra_mem_top = 0 % extra high memory for chars, tokens, etc.
-extra_mem_bot = 0 % extra low memory for boxes, glue, breakpoints, etc.
+main_memory = 25000000 % words of inimemory available; also applies to inimf&mp
+extra_mem_top = 4000000 % extra high memory for chars, tokens, etc.
+extra_mem_bot = 8000000 % extra low memory for boxes, glue, breakpoints, etc.
% ConTeXt is a memory hog...
extra_mem_top.context = 2000000
@@ -507,25 +509,25 @@
main_memory.xmltex = 2500000
% Words of font info for TeX (total size of all TFM files, approximately).
-font_mem_size = 500000
+font_mem_size = 5000000
% Total number of fonts. Must be >= 50 and <= 2000 (without tex.ch changes).
font_max = 2000
% Extra space for the hash table of control sequences (which allows 10K
% names as distributed).
-hash_extra = 50000
+hash_extra = 500000
% Max number of characters in all strings, including all error messages,
% help texts, font names, control sequences. These values apply to TeX and MP.
-pool_size = 1250000
+pool_size = 3000000
% Minimum pool space after TeX/MP's own strings; must be at least
% 25000 less than pool_size, but doesn't need to be nearly that large.
-string_vacancies = 90000
+string_vacancies = 200000
% Maximum number of strings.
-max_strings = 100000
+max_strings = 1500000
% min pool space left after loading .fmt
-pool_free = 47500
+pool_free = 475000
% Hyphenation trie. As distributed, the maximum is 65535; this should
% work unless `unsigned short' is not supported or is smaller than 16
@@ -538,14 +540,14 @@
% German: 14000.
% US English: 10000.
%
-trie_size = 262000
+trie_size = 300000
% Buffer size. TeX uses the buffer to contain input lines, but macro
% expansion works by writing material into the buffer and reparsing the
% line. As a consequence, certain constructs require the buffer to be
% very large. As distributed, the size is 50000; most documents can be
% handled within a tenth of this size.
-buf_size = 200000
+buf_size = 300000
hyph_size = 1000 % number of hyphenation exceptions, >610 and <32767.
nest_size = 500 % simultaneous semantic levels (e.g., groups)
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/tetex-tex4ht/devel/.cvsignore,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- .cvsignore 28 Aug 2006 10:32:14 -0000 1.7
+++ .cvsignore 3 Nov 2006 00:41:27 -0000 1.8
@@ -1 +1,4 @@
-tex4ht-1.0.2006_08_26_2341.tar.gz
+tex4ht-all-20050228.zip
+tex4ht-lit-20061028.zip
+tex4ht_20060913-1.diff.gz
+tex4ht-1.0.2006_10_28_1705.tar.gz
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/tetex-tex4ht/devel/sources,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- sources 28 Aug 2006 18:27:01 -0000 1.8
+++ sources 3 Nov 2006 00:41:27 -0000 1.9
@@ -1,2 +1,4 @@
-2dd8bbec7cb147391ca08efe4ae7d445 tex4ht-1.0.2006_08_26_2341.tar.gz
26eb8df2d6631794b3df0d6fb87a0219 tex4ht-all-20050228.zip
+a2837b2bd29e66afb574f1d0f99d4190 tex4ht-lit-20061028.zip
+a69edc1e15d23777bc89b9f3132930b0 tex4ht_20060913-1.diff.gz
+de456f43632f5fb321f5bdbeeb92dfe1 tex4ht-1.0.2006_10_28_1705.tar.gz
Index: tetex-tex4ht.spec
===================================================================
RCS file: /cvs/extras/rpms/tetex-tex4ht/devel/tetex-tex4ht.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- tetex-tex4ht.spec 6 Sep 2006 10:46:07 -0000 1.8
+++ tetex-tex4ht.spec 3 Nov 2006 00:41:27 -0000 1.9
@@ -2,8 +2,8 @@
Summary: Translates TeX and LaTeX into HTML or XML+MathML
Name: tetex-tex4ht
-Version: 1.0.2006_08_26_2341
-Release: 2%{?dist}
+Version: 1.0.2006_10_28_1705
+Release: 1%{?dist}
License: LaTeX Project Public License
Group: Applications/Publishing
URL: http://www.cse.ohio-state.edu/~gurari/TeX4ht/
@@ -14,17 +14,39 @@
# unversioned upstream source, downloaded with wget -N
#Source1 http://www.cse.ohio-state.edu/~gurari/TeX4ht/tex4ht-all.zip
Source2: tex4ht-lppl.txt
-Patch0: tex4ht-env.patch
+# unversioned upstream litteral source, downloaded with wget -N
+#Source3: http://www.cse.ohio-state.edu/~gurari/TeX4ht/fix/tex4ht-lit.zip
+Source3: tex4ht-lit-20061028.zip
+Source4: http://www.cse.ohio-state.edu/~gurari/tpf/ProTex.sty
+Source5: http://www.cse.ohio-state.edu/~gurari/tpf/AlProTex.sty
+Source6: http://www.cse.ohio-state.edu/~gurari/tpf/DraTex.sty
+Source7: http://www.cse.ohio-state.edu/~gurari/tpf/AlDraTex.sty
+#Patch0: tex4ht-1.0.2006_10_24_0142-paths.patch
+# debian
+Patch1: http://ftp.debian.org/debian/pool/main/t/tex4ht/tex4ht_20060913-1.diff.gz
+# patch similar from debian/lit/texmf.cnf.patch, modified to fit fedora
+Patch2: texmf.cnf.patch
+# update debian rebuild script
+Patch3: tetex-tex4ht-1.0-prev.patch
+# if building from litteral sources, install xtpipes files in dest
+Patch4: tetex-tex4ht-1.0.2006_10_24_0142-nohome.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: /usr/bin/kpsewhich
BuildRequires: tetex-fonts
-Requires: ImageMagick
+# for uudecode to generate the debian tutorial images
+BuildRequires: sharutils
+# pnmcrop and pnmtopng are in netpbm-progs.
+Requires: netpbm-progs
+# ImageMagick, pstoedit depends on ghostscript and gs is in ghostscript
+Requires: ImageMagick pstoedit
+# dvips is in tetex-dvips. tetex-latex depends on tetex-dvips.
+# dvipng is in tetex. tetex-latex depends on tetex.
Requires: tetex-latex
Requires(post): /usr/bin/texhash
Requires(postun): /usr/bin/texhash
-Obsoletes: tex4ht
-Provides: tex4ht
+Obsoletes: tex4ht < %{version}-%{release}
+Provides: tex4ht = %{version}-%{release}
# description taken from ctan and modified
%description
@@ -38,15 +60,43 @@
%prep
%setup -q -n tex4ht-%{version}
-%patch -p 1
+%patch1 -p1
+
+# apply debian path which avoids using xtpipes since we cannot compile it
+patch -p1 < debian/patches/fix_mk4ht.diff
+
chmod a-x src/*.c
cp %{SOURCE2} lppl.txt
mkdir doc
cp %{SOURCE1} doc
pushd doc
unzip tex4ht-all-*.zip
-rm -f *.zip
+rm *.zip
popd
+mkdir lit
+cp %{SOURCE3} lit
+pushd lit
+unzip tex4ht-lit-*.zip
+rm *.zip
+chmod 0644 *.tex
+popd
+cp -p %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} lit/
+
+# avoid duplicating the debian patches while still allowing to rebuild
+# from literate sources
+patch -p1 < debian/lit/patches/fix_tex4ht_dir.diff
+patch -p1 < debian/lit/patches/fix_tex4ht_fonts_4hf.diff
+%patch4 -p1 -b .nohome
+
+patch -p1 < debian/patches/add_manpage.diff
+
+cp %{PATCH2} debian/lit/
+
+%patch3 -p1 -b .prev
+
+chmod a+x debian/lit/rebuild.sh*
+
+(cd debian/images; for i in *.uue; do uudecode $i; done; mv *.png ../html)
find texmf -type f -exec chmod a-x \{\} \;
@@ -55,12 +105,12 @@
CFLAGS="$RPM_OPT_FLAGS -DHAVE_STRING_H -DHAVE_DIRENT_H -DHAVE_UNISTD_H \
-DHAVE_SYS_DIR_H -DKPATHSEA -DENVFILE=\"%{_texmf}/tex4ht/base/unix/tex4ht.env\""
LDFLAGS=-lkpathsea
-gcc -c $CFLAGS tex4ht.c
-gcc -c $CFLAGS t4ht.c
-gcc -o tex4ht tex4ht.o $LDFLAGS
-gcc -o t4ht t4ht.o $LDFLAGS
+gcc -o tex4ht $CFLAGS tex4ht.c $LDFLAGS
+gcc -o t4ht $CFLAGS t4ht.c $LDFLAGS
popd
+# files in bin/ht/unix have a shebang but use xtpipes
+
# add shebangs to the scripts that lacks one
for file in bin/unix/*; do
if grep '^#! */' $file > /dev/null 2>&1; then continue; fi
@@ -74,18 +124,31 @@
install -d -m755 $RPM_BUILD_ROOT%{_bindir}
install -m755 src/tex4ht $RPM_BUILD_ROOT%{_bindir}
install -m755 src/t4ht $RPM_BUILD_ROOT%{_bindir}
+#install -m755 bin/ht/unix/* $RPM_BUILD_ROOT%{_bindir}
install -m755 bin/unix/* $RPM_BUILD_ROOT%{_bindir}
pushd texmf
install -d -m755 $RPM_BUILD_ROOT%{_texmf}/tex4ht/base/unix
cp tex4ht/base/unix/tex4ht.env $RPM_BUILD_ROOT%{_texmf}/tex4ht/base/unix
-cp -r tex4ht/ht-fonts $RPM_BUILD_ROOT%{_texmf}/tex4ht
+cp -pr tex4ht/ht-fonts $RPM_BUILD_ROOT%{_texmf}/tex4ht
install -d -m755 $RPM_BUILD_ROOT%{_texmf}/tex/generic
-cp -r tex/generic/tex4ht $RPM_BUILD_ROOT%{_texmf}/tex/generic
+cp -pr tex/generic/tex4ht $RPM_BUILD_ROOT%{_texmf}/tex/generic
popd
+cp -pr debian/html tutorial
+
+sed 's/Debian packaged/Debian and Fedora packaged/' debian/README.kpathsea \
+ > README.kpathsea
+
+mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
+sed -e 's;@SCRIPTSDIR@;%{_bindir};' \
+ -e 's;@TEX4HTDIR@;%{_texmf}/tex4ht/base/unix;' \
+ -e 's;@TEXMFCNF@;%{_texmf}/web2c/texmf.cnf;' \
+ -e 's;@HTFDIR@;%{_texmf}/tex4ht/ht-fonts;' \
+ -e 's;@TEXDIR@;%{_texmf}/tex/generic/tex4ht;g' \
+ src/tex4ht.man > $RPM_BUILD_ROOT%{_mandir}/man1/tex4ht.1
%clean
rm -rf $RPM_BUILD_ROOT
@@ -95,7 +158,8 @@
%{_texmf}/tex4ht/
%{_texmf}/tex/generic/tex4ht/
%{_bindir}/*
-%doc lppl.txt doc
+%{_mandir}/man1/tex4ht.1*
+%doc lppl.txt doc tutorial README.kpathsea
%post
texhash > /dev/null 2>&1 || :
@@ -104,6 +168,12 @@
texhash > /dev/null 2>&1 || :
%changelog
+* Fri Nov 3 2006 Patrice Dumas <pertusus at free.fr> 1.0.2006_10_28_1705-1
+- update
+- use debian patchset
+- remove the patch modifying paths in tex4ht.env, it is unneeded with
+ kpathsee
+
* Mon Aug 28 2006 Patrice Dumas <pertusus at free.fr> 1.0.2006_08_26_2341-2
- update
--- tex4ht-env.patch DELETED ---
More information about the scm-commits
mailing list