T h e   C W E B   S y s t e m   o f   S t r u c t u r e d   D o c u m e n t a t i o n 
 ( V e r s i o n   3 . 6 4      F e b r u a r y   2 0 0 2 ) 
 D o n a l d   E .   K n u t h   a n d   S i l v i o   L e v y 
 T E X   i s   a   t r a d e m a r k   o f   t h e   A m e r i c a n   M a t h e m a t i c a l   S o c i e t y . 
 A c r o b a t   R e a d e r   i s   a   t r a d e m a r k   o f   A d o b e   S y s t e m s   I n c o r p o r a t e d . 
 T h e   p r i n t e d   f o r m   o f   t h i s   m a n u a l   i s   c o p y r i g h t   c    1 9 9 4   b y   A d d i s o n - W e s l e y   P u b l i s h i n g   C o m p a n y ,   I n c .   A l l 
 r i g h t s   r e s e r v e d . 
 T h e   e l e c t r o n i c   f o r m   i s   c o p y r i g h t   c    1 9 8 7 ,   1 9 9 0 ,   1 9 9 3 ,   2 0 0 0   b y   S i l v i o   L e v y   a n d   D o n a l d   E .   K n u t h . 
 P e r m i s s i o n   i s   g r a n t e d   t o   m a k e   a n d   d i s t r i b u t e   v e r b a t i m   c o p i e s   o f   t h e   e l e c t r o n i c   f o r m   o f   t h i s   d o c u m e n t   p r o v i d e d 
 t h a t   t h e   e l e c t r o n i c   c o p y r i g h t   n o t i c e   a n d   t h i s   p e r m i s s i o n   n o t i c e   a r e   p r e s e r v e d   o n   a l l   c o p i e s . 
 P e r m i s s i o n   i s   g r a n t e d   t o   c o p y   a n d   d i s t r i b u t e   m o d i f i e d   v e r s i o n s   o f   t h e   e l e c t r o n i c   f o r m   o f   t h i s   d o c u m e n t   u n d e r 
 t h e   c o n d i t i o n s   f o r   v e r b a t i m   c o p y i n g ,   p r o v i d e d   t h a t   t h e   e n t i r e   r e s u l t i n g   d e r i v e d   w o r k   i s   d i s t r i b u t e d   u n d e r   t h e 
 t e r m s   o f   a   p e r m i s s i o n   n o t i c e   i d e n t i c a l   t o   t h i s   o n e . 
 I n d i v i d u a l s   m a y   m a k e   c o p i e s   o f   t h e   d o c u m e n t a t i o n   f r o m   t h e   e l e c t r o n i c   f i l e s   f o r   t h e i r   o w n   p e r s o n a l   u s e . 
 I n t e r n e t   p a g e   h t t p : / / w w w "c s "f a c u l t y . s t a n f o r d . e d u / ~ k n u t h / c w e b . h t m l   c o n t a i n s   c u r r e n t   i n f o   a b o u t   C W E B 
 a n d   r e l a t e d   t o p i c s . 
 T h e   C W E B   S y s t e m   o f   S t r u c t u r e d   D o c u m e n t a t i o n 
 D o n a l d   E .   K n u t h   a n d   S i l v i o   L e v y 
 T h i s   d o c u m e n t   d e s c r i b e s   a   v e r s i o n   o f   D o n   K n u t h  s   W E B   s y s t e m ,   a d a p t e d   t o   C   b y   S i l v i o   L e v y .   S i n c e   i t s 
 c r e a t i o n   i n   1 9 8 7 ,   C W E B   h a s   b e e n   r e v i s e d   a n d   e n h a n c e d   i n   v a r i o u s   w a y s ,   b y   b o t h   K n u t h   a n d   L e v y .   W e   n o w 
 b e l i e v e   t h a t   i t s   e v o l u t i o n   i s   n e a r   a n   e n d ;   h o w e v e r ,   b u g   r e p o r t s ,   s u g g e s t i o n s   a n d   c o m m e n t s   a r e   s t i l l   w e l c o m e , 
 a n d   s h o u l d   b e   s e n t   t o   L e v y   ( l e v y @ m a t h . b e r k e l e y . e d u ) . 
 R e a d e r s   w h o   a r e   f a m i l i a r   w i t h   K n u t h  s   m e m o    T h e   W E B   S y s t e m   o f   S t r u c t u r e d   D o c u m e n t a t i o n    w i l l   b e   a b l e 
 t o   s k i m   t h i s   m a t e r i a l   r a p i d l y ,   b e c a u s e   C W E B   a n d   W E B   s h a r e   t h e   s a m e   p h i l o s o p h y   a n d   ( e s s e n t i a l l y )   t h e   s a m e 
 s y n t a x .   I n   s o m e   r e s p e c t s   C W E B   i s   a   s i m p l i f i c a t i o n   o f   W E B :   f o r   e x a m p l e ,   C W E B   d o e s   n o t   n e e d   W E B  s   f e a t u r e s 
 f o r   m a c r o   d e f i n i t i o n   a n d   s t r i n g   h a n d l i n g ,   b e c a u s e   C   a n d   i t s   p r e p r o c e s s o r   a l r e a d y   t a k e   c a r e   o f   m a c r o s   a n d 
 s t r i n g s .   S i m i l a r l y ,   t h e   W E B   c o n v e n t i o n s   o f   d e n o t i n g   o c t a l   a n d   h e x a d e c i m a l   c o n s t a n t s   b y   @  7 7   a n d   @ " 3 f   a r e 
 r e p l a c e d   b y   C  s   c o n v e n t i o n s   0 7 7   a n d   0 x 3 f .   A l l   o t h e r   f e a t u r e s   o f   W E B   h a v e   b e e n   r e t a i n e d ,   a n d   n e w   f e a t u r e s 
 h a v e   b e e n   a d d e d . 
 W e   t h a n k   a l l   w h o   c o n t r i b u t e d   s u g g e s t i o n s   a n d   c r i t i c i s m   t o   t h e   d e v e l o p m e n t   o f   C W E B .   W e   a r e   e s p e c i a l l y 
 g r a t e f u l   t o   S t e v e   A v e r y ,   N e l s o n   B e e b e ,   H a n s - H e r m a n n   B o d e ,   K l a u s   G u n t e r m a n n ,   N o r m a n   R a m s e y ,   J o a c h i m 
 S c h n i t t e r ,   a n d   S a r o j   M a h a p a t r a ,   w h o   c o n t r i b u t e d   c o d e ,   a n d   t o   C a m e r o n   S m i t h ,   w h o   m a d e   m a n y   s u g g e s t i o n s 
 i m p r o v i n g   t h e   m a n u a l .   R a m s e y   h a s   m a d e   l i t e r a t e   p r o g r a m m i n g   a c c e s s i b l e   t o   u s e r s   o f   y e t   o t h e r   l a n g u a g e s   b y 
 m e a n s   o f   h i s   S P I D E R   s y s t e m   [ s e e   C o m m u n i c a t i o n s   o f   t h e   A C M   3 2   ( 1 9 8 9 ) ,   1 0 5 1  1 0 5 5 ] .   T h e   b o o k   L i t e r a t e 
 P r o g r a m m i n g   b y   K n u t h   ( 1 9 9 2 )   c o n t a i n s   a   c o m p r e h e n s i v e   b i b l i o g r a p h y   o f   r e l a t e d   e a r l y   w o r k .   B o d e ,   S c h n i t t e r , 
 a n d   M a h a p a t r a   a d a p t e d   C W E B   s o   t h a t   i t   w o r k s   f o r   C + +   a s   w e l l ;   t h e r e f o r e   i n   t h e   t e x t   b e l o w   y o u   c a n   r e a d   C + + 
 f o r   C   i f   y o u   s o   d e s i r e . 
 I n t r o d u c t i o n 
 T h e   p h i l o s o p h y   b e h i n d   C W E B   i s   t h a t   p r o g r a m m e r s   w h o   w a n t   t o   p r o v i d e   t h e   b e s t   p o s s i b l e   d o c u m e n t a t i o n   f o r 
 t h e i r   p r o g r a m s   n e e d   t w o   t h i n g s   s i m u l t a n e o u s l y :   a   l a n g u a g e   l i k e   T E X   f o r   f o r m a t t i n g ,   a n d   a   l a n g u a g e   l i k e   C 
 f o r   p r o g r a m m i n g .   N e i t h e r   t y p e   o f   l a n g u a g e   c a n   p r o v i d e   t h e   b e s t   d o c u m e n t a t i o n   b y   i t s e l f .   B u t   w h e n   b o t h 
 a r e   a p p r o p r i a t e l y   c o m b i n e d ,   w e   o b t a i n   a   s y s t e m   t h a t   i s   m u c h   m o r e   u s e f u l   t h a n   e i t h e r   l a n g u a g e   s e p a r a t e l y . 
 T h e   s t r u c t u r e   o f   a   s o f t w a r e   p r o g r a m   m a y   b e   t h o u g h t   o f   a s   a    w e b    t h a t   i s   m a d e   u p   o f   m a n y   i n t e r c o n n e c t e d 
 p i e c e s .   T o   d o c u m e n t   s u c h   a   p r o g r a m ,   w e   w a n t   t o   e x p l a i n   e a c h   i n d i v i d u a l   p a r t   o f   t h e   w e b   a n d   h o w   i t   r e l a t e s 
 t o   i t s   n e i g h b o r s .   T h e   t y p o g r a p h i c   t o o l s   p r o v i d e d   b y   T E X   g i v e   u s   a n   o p p o r t u n i t y   t o   e x p l a i n   t h e   l o c a l   s t r u c t u r e 
 o f   e a c h   p a r t   b y   m a k i n g   t h a t   s t r u c t u r e   v i s i b l e ,   a n d   t h e   p r o g r a m m i n g   t o o l s   p r o v i d e d   b y   C   m a k e   i t   p o s s i b l e   f o r 
 u s   t o   s p e c i f y   t h e   a l g o r i t h m s   f o r m a l l y   a n d   u n a m b i g u o u s l y .   B y   c o m b i n i n g   t h e   t w o ,   w e   c a n   d e v e l o p   a   s t y l e   o f 
 p r o g r a m m i n g   t h a t   m a x i m i z e s   o u r   a b i l i t y   t o   p e r c e i v e   t h e   s t r u c t u r e   o f   a   c o m p l e x   p i e c e   o f   s o f t w a r e ,   a n d   a t   t h e 
 s a m e   t i m e   t h e   d o c u m e n t e d   p r o g r a m s   c a n   b e   m e c h a n i c a l l y   t r a n s l a t e d   i n t o   a   w o r k i n g   s o f t w a r e   s y s t e m   t h a t 
 m a t c h e s   t h e   d o c u m e n t a t i o n . 
 T h e   C W E B   s y s t e m   c o n s i s t s   o f   t w o   p r o g r a m s   n a m e d   C W E A V E   a n d   C T A N G L E .   W h e n   w r i t i n g   a   C W E B   p r o g r a m 
 t h e   u s e r   k e e p s   t h e   C   c o d e   a n d   t h e   d o c u m e n t a t i o n   i n   t h e   s a m e   f i l e ,   c a l l e d   t h e   C W E B   f i l e   a n d   g e n e r a l l y   n a m e d 
 s o m e t h i n g . w .   T h e   c o m m a n d    c w e a v e   s o m e t h i n g    c r e a t e s   a n   o u t p u t   f i l e   s o m e t h i n g . t e x ,   w h i c h   c a n   t h e n   b e 
 f e d   t o   T E X ,   y i e l d i n g   a    p r e t t y   p r i n t e d    v e r s i o n   o f   s o m e t h i n g . w   t h a t   c o r r e c t l y   h a n d l e s   t y p o g r a p h i c   d e t a i l s 
 l i k e   p a g e   l a y o u t   a n d   t h e   u s e   o f   i n d e n t a t i o n ,   i t a l i c s ,   b o l d f a c e ,   a n d   m a t h e m a t i c a l   s y m b o l s .   T h e   t y p e s e t   o u t p u t 
 a l s o   i n c l u d e s   e x t e n s i v e   c r o s s - i n d e x   i n f o r m a t i o n   t h a t   i s   g a t h e r e d   a u t o m a t i c a l l y .   S i m i l a r l y ,   i f   y o u   r u n   t h e 
 c o m m a n d    c t a n g l e   s o m e t h i n g    y o u   w i l l   g e t   a   C   f i l e   s o m e t h i n g . c ,   w h i c h   c a n   t h e n   b e   c o m p i l e d   t o   y i e l d 
 e x e c u t a b l e   c o d e . 
 B e s i d e s   p r o v i d i n g   a   d o c u m e n t a t i o n   t o o l ,   C W E B   e n h a n c e s   t h e   C   l a n g u a g e   b y   p r o v i d i n g   t h e   a b i l i t y   t o   p e r m u t e 
 p i e c e s   o f   t h e   p r o g r a m   t e x t ,   s o   t h a t   a   l a r g e   s y s t e m   c a n   b e   u n d e r s t o o d   e n t i r e l y   i n   t e r m s   o f   s m a l l   s e c t i o n s   a n d 
 t h e i r   l o c a l   i n t e r r e l a t i o n s h i p s .   T h e   C T A N G L E   p r o g r a m   i s   s o   n a m e d   b e c a u s e   i t   t a k e s   a   g i v e n   w e b   a n d   m o v e s 
 t h e   s e c t i o n s   f r o m   t h e i r   w e b   s t r u c t u r e   i n t o   t h e   o r d e r   r e q u i r e d   b y   C ;   t h e   a d v a n t a g e   o f   p r o g r a m m i n g   i n   C W E B 
 i s   t h a t   t h e   a l g o r i t h m s   c a n   b e   e x p r e s s e d   i n    u n t a n g l e d    f o r m ,   w i t h   e a c h   s e c t i o n   e x p l a i n e d   s e p a r a t e l y .   T h e 
 C W E A V E   p r o g r a m   i s   s o   n a m e d   b e c a u s e   i t   t a k e s   a   g i v e n   w e b   a n d   i n t e r t w i n e s   t h e   T E X   a n d   C   p o r t i o n s   c o n t a i n e d 
 i n   e a c h   s e c t i o n ,   t h e n   i t   k n i t s   t h e   w h o l e   f a b r i c   i n t o   a   s t r u c t u r e d   d o c u m e n t .   ( G e t   i t ?   W o w . )   P e r h a p s   t h e r e   i s 
 s o m e   d e e p   c o n n e c t i o n   h e r e   w i t h   t h e   f a c t   t h a t   t h e   G e r m a n   w o r d   f o r    w e a v e    i s    w e b e  ,   a n d   t h e   c o r r e s p o n d i n g 
 L a t i n   i m p e r a t i v e   i s    t e x e  ! 
 2   C W E B   U S E R   M A N U A L   ( V E R S I O N   3 . 6 4 ) 
 A   u s e r   o f   C W E B   s h o u l d   b e   f a i r l y   f a m i l i a r   w i t h   t h e   C   p r o g r a m m i n g   l a n g u a g e .   A   m i n i m a l   a m o u n t   o f   a c q u a i n - 
 t a n c e   w i t h   T E X   i s   a l s o   d e s i r a b l e ,   b u t   i n   f a c t   i t   c a n   b e   a c q u i r e d   a s   o n e   u s e s   C W E B ,   s i n c e   s t r a i g h t   t e x t   c a n   b e 
 t y p e s e t   i n   T E X   w i t h   v i r t u a l l y   n o   k n o w l e d g e   o f   t h a t   l a n g u a g e .   T o   s o m e o n e   f a m i l i a r   w i t h   b o t h   C   a n d   T E X   t h e 
 a m o u n t   o f   e f f o r t   n e c e s s a r y   t o   l e a r n   t h e   c o m m a n d s   o f   C W E B   i s   s m a l l . 
 O v e r v i e w 
 T w o   k i n d s   o f   m a t e r i a l   g o   i n t o   C W E B   f i l e s :   T E X   t e x t   a n d   C   t e x t .   A   p r o g r a m m e r   w r i t i n g   i n   C W E B   s h o u l d   b e 
 t h i n k i n g   b o t h   o f   t h e   d o c u m e n t a t i o n   a n d   o f   t h e   C   p r o g r a m   b e i n g   c r e a t e d ;   i . e . ,   t h e   p r o g r a m m e r   s h o u l d   b e 
 i n s t i n c t i v e l y   a w a r e   o f   t h e   d i f f e r e n t   a c t i o n s   t h a t   C W E A V E   a n d   C T A N G L E   w i l l   p e r f o r m   o n   t h e   C W E B   f i l e .   T E X   t e x t 
 i s   e s s e n t i a l l y   c o p i e d   w i t h o u t   c h a n g e   b y   C W E A V E ,   a n d   i t   i s   e n t i r e l y   d e l e t e d   b y   C T A N G L E ;   t h e   T E X   t e x t   i s    p u r e 
 d o c u m e n t a t i o n .    C   t e x t ,   o n   t h e   o t h e r   h a n d ,   i s   f o r m a t t e d   b y   C W E A V E   a n d   i t   i s   s h u f f l e d   a r o u n d   b y   C T A N G L E , 
 a c c o r d i n g   t o   r u l e s   t h a t   w i l l   b e c o m e   c l e a r   l a t e r .   F o r   n o w   t h e   i m p o r t a n t   p o i n t   t o   k e e p   i n   m i n d   i s   t h a t   t h e r e   a r e 
 t w o   k i n d s   o f   t e x t .   W r i t i n g   C W E B   p r o g r a m s   i s   s o m e t h i n g   l i k e   w r i t i n g   T E X   d o c u m e n t s ,   b u t   w i t h   a n   a d d i t i o n a l 
  C   m o d e    t h a t   i s   a d d e d   t o   T E X  s   h o r i z o n t a l   m o d e ,   v e r t i c a l   m o d e ,   a n d   m a t h   m o d e . 
 A   C W E B   f i l e   i s   b u i l t   u p   f r o m   u n i t s   c a l l e d   s e c t i o n s   t h a t   a r e   m o r e   o r   l e s s   s e l f - c o n t a i n e d .   E a c h   s e c t i o n   h a s 
 t h r e e   p a r t s : 
 "   A   T E X   p a r t ,   c o n t a i n i n g   e x p l a n a t o r y   m a t e r i a l   a b o u t   w h a t   i s   g o i n g   o n   i n   t h e   s e c t i o n . 
 "   A   m i d d l e   p a r t ,   c o n t a i n i n g   m a c r o   d e f i n i t i o n s   t h a t   s e r v e   a s   a b b r e v i a t i o n s   f o r   C   c o n s t r u c t i o n s   t h a t   w o u l d   b e 
 l e s s   c o m p r e h e n s i b l e   i f   w r i t t e n   o u t   i n   f u l l   e a c h   t i m e .   T h e y   a r e   t u r n e d   b y   C T A N G L E   i n t o   p r e p r o c e s s o r 
 m a c r o   d e f i n i t i o n s . 
 "   A   C   p a r t ,   c o n t a i n i n g   a   p i e c e   o f   t h e   p r o g r a m   t h a t   C T A N G L E   w i l l   p r o d u c e .   T h i s   C   c o d e   s h o u l d   i d e a l l y   b e 
 a b o u t   a   d o z e n   l i n e s   l o n g ,   s o   t h a t   i t   i s   e a s i l y   c o m p r e h e n s i b l e   a s   a   u n i t   a n d   s o   t h a t   i t s   s t r u c t u r e   i s 
 r e a d i l y   p e r c e i v e d . 
 T h e   t h r e e   p a r t s   o f   e a c h   s e c t i o n   m u s t   a p p e a r   i n   t h i s   o r d e r ;   i . e . ,   t h e   T E X   c o m m e n t a r y   m u s t   c o m e   f i r s t ,   t h e n 
 t h e   m i d d l e   p a r t ,   a n d   f i n a l l y   t h e   C   c o d e .   A n y   o f   t h e   p a r t s   m a y   b e   e m p t y . 
 A   s e c t i o n   b e g i n s   w i t h   e i t h e r   o f   t h e   s y m b o l s    @      o r    @ *  ,   w h e r e         d e n o t e s   a   b l a n k   s p a c e .   A   s e c t i o n   e n d s 
 a t   t h e   b e g i n n i n g   o f   t h e   n e x t   s e c t i o n   ( i . e . ,   a t   t h e   n e x t    @      o r    @ *  ) ,   o r   a t   t h e   e n d   o f   t h e   f i l e ,   w h i c h e v e r   c o m e s 
 f i r s t .   T h e   C W E B   f i l e   m a y   a l s o   c o n t a i n   m a t e r i a l   t h a t   i s   n o t   p a r t   o f   a n y   s e c t i o n   a t   a l l ,   n a m e l y   t h e   t e x t   ( i f   a n y ) 
 t h a t   o c c u r s   b e f o r e   t h e   f i r s t   s e c t i o n .   S u c h   t e x t   i s   s a i d   t o   b e    i n   l i m b o  ;   i t   i s   i g n o r e d   b y   C T A N G L E   a n d   c o p i e d 
 e s s e n t i a l l y   v e r b a t i m   b y   C W E A V E ,   s o   i t s   f u n c t i o n   i s   t o   p r o v i d e   a n y   a d d i t i o n a l   f o r m a t t i n g   i n s t r u c t i o n s   t h a t   m a y 
 b e   d e s i r e d   i n   t h e   T E X   o u t p u t .   I n d e e d ,   i t   i s   c u s t o m a r y   t o   b e g i n   a   C W E B   f i l e   w i t h   T E X   c o d e   i n   l i m b o   t h a t   l o a d s 
 s p e c i a l   f o n t s ,   d e f i n e s   s p e c i a l   m a c r o s ,   c h a n g e s   t h e   p a g e   s i z e s ,   a n d / o r   p r o d u c e s   a   t i t l e   p a g e . 
 S e c t i o n s   a r e   n u m b e r e d   c o n s e c u t i v e l y ,   s t a r t i n g   w i t h   1 .   T h e s e   n u m b e r s   a p p e a r   a t   t h e   b e g i n n i n g   o f   e a c h   s e c - 
 t i o n   o f   t h e   T E X   d o c u m e n t a t i o n   o u t p u t   b y   C W E A V E ,   a n d   t h e y   a p p e a r   a s   b r a c k e t e d   c o m m e n t s   a t   t h e   b e g i n n i n g 
 a n d   e n d   o f   t h e   c o d e   g e n e r a t e d   b y   t h a t   s e c t i o n   i n   t h e   C   p r o g r a m   o u t p u t   b y   C T A N G L E . 
 S e c t i o n   N a m e s 
 F o r t u n a t e l y ,   y o u   n e v e r   m e n t i o n   t h e s e   n u m b e r s   y o u r s e l f   w h e n   y o u   a r e   w r i t i n g   i n   C W E B .   Y o u   j u s t   s a y    @    
 o r    @ *    a t   t h e   b e g i n n i n g   o f   e a c h   n e w   s e c t i o n ,   a n d   t h e   n u m b e r s   a r e   s u p p l i e d   a u t o m a t i c a l l y   b y   C W E A V E   a n d 
 C T A N G L E .   A s   f a r   a s   y o u   a r e   c o n c e r n e d ,   a   s e c t i o n   h a s   a   n a m e   i n s t e a d   o f   a   n u m b e r ;   i t s   n a m e   i s   s p e c i f i e d   b y 
 w r i t i n g    @ <    f o l l o w e d   b y   T E X   t e x t   f o l l o w e d   b y    @ >  .   W h e n   C W E A V E   o u t p u t s   a   s e c t i o n   n a m e ,   i t   r e p l a c e s   t h e    @ <  
 a n d    @ >    b y   a n g l e   b r a c k e t s   a n d   i n s e r t s   t h e   s e c t i o n   n u m b e r   i n   s m a l l   t y p e .   T h u s ,   w h e n   y o u   r e a d   t h e   o u t p u t   o f 
 C W E A V E   i t   i s   e a s y   t o   l o c a t e   a n y   s e c t i o n   t h a t   i s   r e f e r r e d   t o   i n   a n o t h e r   s e c t i o n . 
 F o r   e x p o s i t o r y   p u r p o s e s ,   a   s e c t i o n   n a m e   s h o u l d   b e   a   g o o d   d e s c r i p t i o n   o f   t h e   c o n t e n t s   o f   t h a t   s e c t i o n ;   i . e . , 
 i t   s h o u l d   s t a n d   f o r   t h e   a b s t r a c t i o n   r e p r e s e n t e d   b y   t h e   s e c t i o n .   T h e n   t h e   s e c t i o n   c a n   b e    p l u g g e d   i n t o    o n e   o r 
 m o r e   o t h e r   s e c t i o n s   i n   s u c h   a   w a y   t h a t   u n i m p o r t a n t   d e t a i l s   o f   i t s   i n n e r   w o r k i n g s   a r e   s u p p r e s s e d .   A   s e c t i o n 
 n a m e   t h e r e f o r e   o u g h t   t o   b e   l o n g   e n o u g h   t o   c o n v e y   t h e   n e c e s s a r y   m e a n i n g . 
 U n f o r t u n a t e l y ,   i t   i s   l a b o r i o u s   t o   t y p e   s u c h   l o n g   n a m e s   o v e r   a n d   o v e r   a g a i n ,   a n d   i t   i s   a l s o   d i f f i c u l t   t o   s p e c i f y 
 a   l o n g   n a m e   t w i c e   i n   e x a c t l y   t h e   s a m e   w a y   s o   t h a t   C W E A V E   a n d   C T A N G L E   w i l l   b e   a b l e   t o   m a t c h   t h e   n a m e s   t o 
 t h e   s e c t i o n s .   T o   a m e l i o r a t e   t h i s   s i t u a t i o n ,   C W E A V E   a n d   C T A N G L E   l e t   y o u   a b b r e v i a t e   a   s e c t i o n   n a m e ,   s o   l o n g 
 a s   t h e   f u l l   n a m e   a p p e a r s   s o m e w h e r e   i n   t h e   C W E B   f i l e ;   y o u   c a n   t y p e   s i m p l y    @ < . . . @ >  ,   w h e r e     i s   a n y   s t r i n g 
 t h a t   i s   a   p r e f i x   o f   e x a c t l y   o n e   s e c t i o n   n a m e   a p p e a r i n g   i n   t h e   f i l e .   F o r   e x a m p l e ,    @ < C l e a r   t h e   a r r a y s @ >    c a n 
 b e   a b b r e v i a t e d   t o    @ < C l e a r . . . @ >    i f   n o   o t h e r   s e c t i o n   n a m e   b e g i n s   w i t h   t h e   f i v e   l e t t e r s    C l e a r  .   E l s e w h e r e 
 y o u   m i g h t   u s e   t h e   a b b r e v i a t i o n    @ < C l e a r   t . . . @ >  ,   a n d   s o   o n . 
 C W E B   U S E R   M A N U A L   ( V E R S I O N   3 . 6 4 )   3 
 S e c t i o n   n a m e s   m u s t   o t h e r w i s e   m a t c h   c h a r a c t e r   f o r   c h a r a c t e r ,   e x c e p t   t h a t   c o n s e c u t i v e   c h a r a c t e r s   o f   w h i t e 
 s p a c e   ( s p a c e s ,   t a b   m a r k s ,   n e w l i n e s ,   a n d / o r   f o r m   f e e d s )   a r e   t r e a t e d   a s   e q u i v a l e n t   t o   a   s i n g l e   s p a c e ,   a n d   s u c h 
 s p a c e s   a r e   d e l e t e d   a t   t h e   b e g i n n i n g   a n d   e n d   o f   t h e   n a m e .   T h u s ,    @ <   C l e a r   t h e   a r r a y s   @ >    w i l l   a l s o   m a t c h 
 t h e   n a m e   i n   t h e   p r e v i o u s   e x a m p l e .   S p a c e s   f o l l o w i n g   t h e   e l l i p s i s   i n   a b b r e v i a t i o n s   a r e   i g n o r e d   a s   w e l l ,   b u t   n o t 
 t h o s e   b e f o r e ,   s o   t h a t    @ < C l e a r   t   . . . @ >    w o u l d   n o t   m a t c h    @ < C l e a r   t h e   a r r a y s @ >  . 
 W h a t   C T A N G L E   D o e s 
 W e   h a v e   s a i d   t h a t   a   s e c t i o n   b e g i n s   w i t h    @      o r    @ *  ,   b u t   w e   d i d n  t   s a y   h o w   i t   g e t s   d i v i d e d   u p   i n t o   a   T E X 
 p a r t ,   a   m i d d l e   p a r t ,   a n d   a   C   p a r t .   T h e   m i d d l e   p a r t   b e g i n s   w i t h   t h e   f i r s t   a p p e a r a n c e   o f    @ d    o r    @ f    i n   t h e 
 s e c t i o n ,   a n d   t h e   C   p a r t   b e g i n s   w i t h   t h e   f i r s t   a p p e a r a n c e   o f    @ c    o r    @ < s e c t i o n   n a m e @ > =  .   I n   t h e   l a t t e r   c a s e 
 y o u   a r e   s a y i n g ,   i n   e f f e c t ,   t h a t   t h e   s e c t i o n   n a m e   s t a n d s   f o r   t h e   C   t e x t   t h a t   f o l l o w s .   A l t e r n a t i v e l y ,   i f   t h e   C 
 p a r t   b e g i n s   w i t h    @ c    i n s t e a d   o f   a   s e c t i o n   n a m e ,   t h e   c u r r e n t   s e c t i o n   i s   s a i d   t o   b e   u n n a m e d . 
 T h e   c o n s t r u c t    @ < s e c t i o n   n a m e @ >    c a n   a p p e a r   a n y   n u m b e r   o f   t i m e s   i n   t h e   C   p a r t   o f   a   s e c t i o n :   S u b s e q u e n t 
 a p p e a r a n c e s   i n d i c a t e   t h a t   a   n a m e d   s e c t i o n   i s   b e i n g    u s e d    r a t h e r   t h a n    d e f i n e d .    I n   o t h e r   w o r d s ,   t h e   C   c o d e 
 f o r   t h e   n a m e d   s e c t i o n ,   p r e s u m a b l y   d e f i n e d   e l s e w h e r e ,   s h o u l d   b e   s p l i c e d   i n   a t   t h i s   p o i n t   i n   t h e   C   p r o g r a m . 
 I n d e e d ,   t h e   m a i n   i d e a   o f   C T A N G L E   i s   t o   m a k e   a   C   p r o g r a m   o u t   o f   i n d i v i d u a l   s e c t i o n s ,   n a m e d   a n d   u n n a m e d . 
 T h e   e x a c t   w a y   i n   w h i c h   t h i s   i s   d o n e   i s   t h i s :   F i r s t   a l l   t h e   m a c r o   d e f i n i t i o n s   i n d i c a t e d   b y    @ d    a r e   t u r n e d   i n t o 
 C   p r e p r o c e s s o r   m a c r o   d e f i n i t i o n s   a n d   c o p i e d   a t   t h e   b e g i n n i n g .   T h e n   t h e   C   p a r t s   o f   u n n a m e d   s e c t i o n s   a r e 
 c o p i e d   d o w n ,   i n   o r d e r ;   t h i s   c o n s t i t u t e s   t h e   f i r s t - o r d e r   a p p r o x i m a t i o n   t o   t h e   t e x t   o f   t h e   p r o g r a m .   ( T h e r e 
 s h o u l d   b e   a t   l e a s t   o n e   u n n a m e d   s e c t i o n ,   o t h e r w i s e   t h e r e   w i l l   b e   n o   p r o g r a m . )   T h e n   a l l   s e c t i o n   n a m e s   t h a t 
 a p p e a r   i n   t h e   f i r s t - o r d e r   a p p r o x i m a t i o n   a r e   r e p l a c e d   b y   t h e   C   p a r t s   o f   t h e   c o r r e s p o n d i n g   s e c t i o n s ,   a n d   t h i s 
 s u b s t i t u t i o n   p r o c e s s   c o n t i n u e s   u n t i l   n o   s e c t i o n   n a m e s   r e m a i n .   A l l   c o m m e n t s   a r e   r e m o v e d ,   b e c a u s e   t h e   C 
 p r o g r a m   i s   i n t e n d e d   o n l y   f o r   t h e   e y e s   o f   t h e   C   c o m p i l e r . 
 I f   t h e   s a m e   n a m e   h a s   b e e n   g i v e n   t o   m o r e   t h a n   o n e   s e c t i o n ,   t h e   C   t e x t   f o r   t h a t   n a m e   i s   o b t a i n e d   b y   p u t t i n g 
 t o g e t h e r   a l l   o f   t h e   C   p a r t s   i n   t h e   c o r r e s p o n d i n g   s e c t i o n s .   T h i s   f e a t u r e   i s   u s e f u l ,   f o r   e x a m p l e ,   i n   a   s e c t i o n 
 n a m e d    G l o b a l   v a r i a b l e s  ,   s i n c e   o n e   c a n   t h e n   d e c l a r e   g l o b a l   v a r i a b l e s   i n   w h a t e v e r   s e c t i o n s   t h o s e   v a r i a b l e s 
 a r e   i n t r o d u c e d .   W h e n   s e v e r a l   s e c t i o n s   h a v e   t h e   s a m e   n a m e ,   C W E A V E   a s s i g n s   t h e   f i r s t   s e c t i o n   n u m b e r   a s   t h e 
 n u m b e r   c o r r e s p o n d i n g   t o   t h a t   n a m e ,   a n d   i t   i n s e r t s   a   n o t e   a t   t h e   b o t t o m   o f   t h a t   s e c t i o n   t e l l i n g   t h e   r e a d e r   t o 
  S e e   a l s o   s e c t i o n s   s o - a n d - s o  ;   t h i s   f o o t n o t e   g i v e s   t h e   n u m b e r s   o f   a l l   t h e   o t h e r   s e c t i o n s   h a v i n g   t h e   s a m e   n a m e 
 a s   t h e   p r e s e n t   o n e .   T h e   C   t e x t   c o r r e s p o n d i n g   t o   a   s e c t i o n   i s   u s u a l l y   f o r m a t t e d   b y   C W E A V E   s o   t h a t   t h e   o u t p u t 
 h a s   a n   e q u i v a l e n c e   s i g n   i n   p l a c e   o f   t h e   e q u a l s   s i g n   i n   t h e   C W E B   f i l e ;   i . e . ,   t h e   o u t p u t   s a y s    0  s e c t i o n   n a m e   	0  a"  C 
 t e x t  .   H o w e v e r ,   i n   t h e   c a s e   o f   t h e   s e c o n d   a n d   s u b s e q u e n t   a p p e a r a n c e s   o f   a   s e c t i o n   w i t h   t h e   s a m e   n a m e ,   t h i s 
  a"   s i g n   i s   r e p l a c e d   b y    + a" ,   a s   a n   i n d i c a t i o n   t h a t   t h e   f o l l o w i n g   C   t e x t   i s   b e i n g   a p p e n d e d   t o   t h e   C   t e x t   o f 
 a n o t h e r   s e c t i o n . 
 A s   C T A N G L E   e n t e r s   a n d   l e a v e s   s e c t i o n s ,   i t   i n s e r t s   p r e p r o c e s s o r   # l i n e   c o m m a n d s   i n t o   t h e   C   o u t p u t   f i l e . 
 T h i s   m e a n s   t h a t   w h e n   t h e   c o m p i l e r   g i v e s   y o u   e r r o r   m e s s a g e s ,   o r   w h e n   y o u   d e b u g   y o u r   p r o g r a m ,   t h e   m e s s a g e s 
 r e f e r   t o   l i n e   n u m b e r s   i n   t h e   C W E B   f i l e ,   a n d   n o t   i n   t h e   C   f i l e .   I n   m o s t   c a s e s   y o u   c a n   t h e r e f o r e   f o r g e t   a b o u t   t h e 
 C   f i l e   a l t o g e t h e r . 
 W h a t   C W E A V E   D o e s 
 T h e   g e n e r a l   i d e a   o f   C W E A V E   i s   t o   m a k e   a   . t e x   f i l e   f r o m   t h e   C W E B   f i l e   i n   t h e   f o l l o w i n g   w a y :   T h e   f i r s t   l i n e   o f 
 t h e   . t e x   f i l e   t e l l s   T E X   t o   i n p u t   a   f i l e   w i t h   m a c r o s   t h a t   d e f i n e   C W E B  s   d o c u m e n t a t i o n   c o n v e n t i o n s .   T h e   n e x t 
 l i n e s   o f   t h e   f i l e   w i l l   b e   c o p i e d   f r o m   w h a t e v e r   T E X   t e x t   i s   i n   l i m b o   b e f o r e   t h e   f i r s t   s e c t i o n .   T h e n   c o m e s   t h e 
 o u t p u t   f o r   e a c h   s e c t i o n   i n   t u r n ,   p o s s i b l y   i n t e r s p e r s e d   w i t h   e n d - o f - p a g e   m a r k s .   F i n a l l y ,   C W E A V E   w i l l   g e n e r a t e 
 a   c r o s s - r e f e r e n c e   i n d e x   t h a t   l i s t s   e a c h   s e c t i o n   n u m b e r   i n   w h i c h   e a c h   C   i d e n t i f i e r   a p p e a r s ,   a n d   i t   w i l l   a l s o 
 g e n e r a t e   a n   a l p h a b e t i z e d   l i s t   o f   t h e   s e c t i o n   n a m e s ,   a s   w e l l   a s   a   t a b l e   o f   c o n t e n t s   t h a t   s h o w s   t h e   p a g e   a n d 
 s e c t i o n   n u m b e r s   f o r   e a c h    s t a r r e d    s e c t i o n . 
 W h a t   i s   a    s t a r r e d    s e c t i o n ,   y o u   a s k ?   A   s e c t i o n   t h a t   b e g i n s   w i t h    @ *    i n s t e a d   o f    @      i s   s l i g h t l y   s p e c i a l 
 i n   t h a t   i t   d e n o t e s   a   n e w   m a j o r   g r o u p   o f   s e c t i o n s .   T h e    @ *    s h o u l d   b e   f o l l o w e d   b y   t h e   t i t l e   o f   t h i s   g r o u p , 
 f o l l o w e d   b y   a   p e r i o d .   S u c h   s e c t i o n s   w i l l   a l w a y s   s t a r t   o n   a   n e w   p a g e   i n   t h e   T E X   o u t p u t ,   a n d   t h e   g r o u p   t i t l e 
 w i l l   a p p e a r   a s   a   r u n n i n g   h e a d l i n e   o n   a l l   s u b s e q u e n t   p a g e s   u n t i l   t h e   n e x t   s t a r r e d   s e c t i o n .   T h e   t i t l e   w i l l   a l s o 
 a p p e a r   i n   t h e   t a b l e   o f   c o n t e n t s ,   a n d   i n   b o l d f a c e   t y p e   a t   t h e   b e g i n n i n g   o f   i t s   s e c t i o n .   C a u t i o n :   D o   n o t   u s e 
 T E X   c o n t r o l   s e q u e n c e s   i n   s u c h   t i t l e s ,   u n l e s s   y o u   k n o w   t h a t   t h e   c w e b m a c   m a c r o s   w i l l   d o   t h e   r i g h t   t h i n g   w i t h 
 t h e m .   T h e   r e a s o n   i s   t h a t   t h e s e   t i t l e s   a r e   c o n v e r t e d   t o   u p p e r c a s e   w h e n   t h e y   a p p e a r   a s   r u n n i n g   h e a d s ,   a n d 
 t h e y   a r e   c o n v e r t e d   t o   b o l d f a c e   w h e n   t h e y   a p p e a r   a t   t h e   b e g i n n i n g   o f   t h e i r   s e c t i o n s ,   a n d   t h e y   a r e   a l s o   w r i t t e n 
 4   C W E B   U S E R   M A N U A L   ( V E R S I O N   3 . 6 4 ) 
 o u t   t o   a   t a b l e - o f - c o n t e n t s   f i l e   u s e d   f o r   t e m p o r a r y   s t o r a g e   w h i l e   T E X   i s   w o r k i n g ;   w h a t e v e r   c o n t r o l   s e q u e n c e s 
 y o u   u s e   m u s t   b e   m e a n i n g f u l   i n   a l l   t h r e e   o f   t h e s e   m o d e s . 
 T h e   T E X   o u t p u t   p r o d u c e d   b y   C W E A V E   f o r   e a c h   s e c t i o n   c o n s i s t s   o f   t h e   f o l l o w i n g :   F i r s t   c o m e s   t h e   s e c t i o n 
 n u m b e r   ( e . g . ,    \ M 1 2 3 .    a t   t h e   b e g i n n i n g   o f   s e c t i o n   1 2 3 ,   e x c e p t   t h a t    \ N    a p p e a r s   i n   p l a c e   o f    \ M    a t   t h e 
 b e g i n n i n g   o f   a   s t a r r e d   s e c t i o n ) .   T h e n   c o m e s   t h e   T E X   p a r t   o f   t h e   s e c t i o n ,   c o p i e d   a l m o s t   v e r b a t i m   e x c e p t 
 a s   n o t e d   b e l o w .   T h e n   c o m e s   t h e   m i d d l e   p a r t   a n d   t h e   C   p a r t ,   f o r m a t t e d   s o   t h a t   t h e r e   w i l l   b e   a   l i t t l e   e x t r a 
 s p a c e   b e t w e e n   t h e m   i f   b o t h   a r e   n o n e m p t y .   T h e   m i d d l e   a n d   C   p a r t s   a r e   o b t a i n e d   b y   i n s e r t i n g   a   b u n c h   o f 
 f u n n y - l o o k i n g   T E X   m a c r o s   i n t o   t h e   C   p r o g r a m ;   t h e s e   m a c r o s   h a n d l e   t y p o g r a p h i c   d e t a i l s   a b o u t   f o n t s   a n d 
 p r o p e r   m a t h   s p a c i n g ,   a s   w e l l   a s   l i n e   b r e a k s   a n d   i n d e n t a t i o n . 
 C   C o d e   i n   T E X   T e x t   a n d   V i c e   V e r s a 
 W h e n   y o u   a r e   t y p i n g   T E X   t e x t ,   y o u   w i l l   p r o b a b l y   w a n t   t o   m a k e   f r e q u e n t   r e f e r e n c e   t o   v a r i a b l e s   a n d   o t h e r 
 q u a n t i t i e s   i n   y o u r   C   c o d e ,   a n d   y o u   w i l l   w a n t   t h o s e   v a r i a b l e s   t o   h a v e   t h e   s a m e   t y p o g r a p h i c   t r e a t m e n t   w h e n 
 t h e y   a p p e a r   i n   y o u r   t e x t   a s   w h e n   t h e y   a p p e a r   i n   y o u r   p r o g r a m .   T h e r e f o r e   t h e   C W E B   l a n g u a g e   a l l o w s   y o u 
 t o   g e t   t h e   e f f e c t   o f   C   e d i t i n g   w i t h i n   T E X   t e x t ,   i f   y o u   p l a c e    |    m a r k s   b e f o r e   a n d   a f t e r   t h e   C   m a t e r i a l .   F o r 
 e x a m p l e ,   s u p p o s e   y o u   w a n t   t o   s a y   s o m e t h i n g   l i k e   t h i s : 
 I f   p a   i s   d e c l a r e d   a s    i n t   "p a    ,   t h e   a s s i g n m e n t   p a   =   & a [ 0 ]   m a k e s   p a   p o i n t   t o   t h e   z e r o t h   e l e m e n t   o f   a . 
 T h e   T E X   t e x t   w o u l d   l o o k   l i k e   t h i s   i n   y o u r   C W E B   f i l e : 
 I f   | p a |   i s   d e c l a r e d   a s    | i n t   * p a |  ,   t h e 
 a s s i g n m e n t   | p a = & a [ 0 ] |   m a k e s   | p a |   p o i n t   t o   t h e   z e r o t h   e l e m e n t   o f   | a | . 
 A n d   C W E A V E   t r a n s l a t e s   t h i s   i n t o   s o m e t h i n g   y o u   a r e   g l a d   y o u   d i d n  t   h a v e   t o   t y p e : 
 I f   \ \ { p a }   i s   d e c l a r e d   a s    \ & { i n t }   $ { } { * } \ \ { p a } $  , 
 t h e   a s s i g n m e n t   $ \ \ { p a } \ K { \ A N D } \ | a [ \ T { 0 } ] $ 
 m a k e s   \ \ { p a }   p o i n t   t o   t h e   z e r o t h   e l e m e n t   o f   \ | a . 
 I n c i d e n t a l l y ,   t h e   c r o s s - r e f e r e n c e   i n d e x   t h a t   C W E A V E   w o u l d   m a k e ,   i n   t h e   p r e s e n c e   o f   a   c o m m e n t   l i k e   t h i s ,   w o u l d 
 i n c l u d e   t h e   c u r r e n t   s e c t i o n   n u m b e r   a s   o n e   o f   t h e   i n d e x   e n t r i e s   f o r   p a   ,   e v e n   t h o u g h   p a   m i g h t   n o t   a p p e a r   i n 
 t h e   C   p a r t   o f   t h i s   s e c t i o n .   T h u s ,   t h e   i n d e x   c o v e r s   r e f e r e n c e s   t o   i d e n t i f i e r s   i n   t h e   e x p l a n a t o r y   c o m m e n t s   a s 
 w e l l   a s   i n   t h e   p r o g r a m   i t s e l f ;   y o u   w i l l   s o o n   l e a r n   t o   a p p r e c i a t e   t h i s   f e a t u r e .   H o w e v e r ,   t h e   i d e n t i f i e r s   i n t 
 a n d   a   w o u l d   n o t   b e   i n d e x e d ,   b e c a u s e   C W E A V E   d o e s   n o t   m a k e   i n d e x   e n t r i e s   f o r   r e s e r v e d   w o r d s   o r   s i n g l e - l e t t e r 
 i d e n t i f i e r s .   S u c h   i d e n t i f i e r s   a r e   f e l t   t o   b e   s o   u b i q u i t o u s   t h a t   i t   w o u l d   b e   p o i n t l e s s   t o   m e n t i o n   e v e r y   p l a c e 
 w h e r e   t h e y   o c c u r . 
 A l t h o u g h   a   s e c t i o n   b e g i n s   w i t h   T E X   t e x t   a n d   e n d s   w i t h   C   t e x t ,   w e   h a v e   n o t e d   t h a t   t h e   d i v i d i n g   l i n e   i s n  t 
 s h a r p ,   s i n c e   C   t e x t   c a n   b e   i n c l u d e d   i n   T E X   t e x t   i f   i t   i s   e n c l o s e d   i n    | . . . |  .   C o n v e r s e l y ,   T E X   t e x t   a p p e a r s 
 f r e q u e n t l y   w i t h i n   C   t e x t ,   b e c a u s e   e v e r y t h i n g   i n   c o m m e n t s   ( i . e . ,   b e t w e e n   / *   a n d   * / ,   o r   f o l l o w i n g   / / )   i s   t r e a t e d 
 a s   T E X   t e x t .   L i k e w i s e ,   t h e   t e x t   o f   a   s e c t i o n   n a m e   c o n s i s t s   o f   T E X   t e x t ,   b u t   t h e   c o n s t r u c t   @ < s e c t i o n   n a m e @ > 
 a s   a   w h o l e   i s   e x p e c t e d   t o   b e   f o u n d   i n   C   t e x t ;   t h u s ,   o n e   t y p i c a l l y   g o e s   b a c k   a n d   f o r t h   b e t w e e n   t h e   C   a n d   T E X 
 e n v i r o n m e n t s   i n   a   n a t u r a l   w a y ,   a s   i n   t h e s e   e x a m p l e s : 
 i f   ( x = = 0 )   @ < E m p t y   t h e   | b u f f e r |   a r r a y @ > 
 . . .   u s i n g   t h e   a l g o r i t h m   i n   | @ < E m p t y   t h e   | b u f f e r |   a r r a y @ > | . 
 T h e   f i r s t   o f   t h e s e   e x c e r p t s   w o u l d   b e   f o u n d   i n   t h e   C   p a r t   o f   a   s e c t i o n ,   i n t o   w h i c h   t h e   c o d e   f r o m   t h e   s e c t i o n 
 n a m e d    E m p t y   t h e   b u f f e r   a r r a y    i s   b e i n g   s p l i c e d .   T h e   s e c o n d   e x c e r p t   w o u l d   b e   f o u n d   i n   t h e   T E X   p a r t   o f   t h e 
 s e c t i o n ,   a n d   t h e   n a m e d   s e c t i o n   i s   b e i n g    c i t e d  ,   r a t h e r   t h a n   d e f i n e d   o r   u s e d .   ( N o t e   t h e    | . . . |    s u r r o u n d i n g 
 t h e   s e c t i o n   n a m e   i n   t h i s   c a s e . ) 
 M a c r o s 
 T h e   c o n t r o l   c o d e   @ d   f o l l o w e d   b y 
 i d e n t i f i e r   C   t e x t   o r   b y   i d e n t i f i e r   ( p a r   1 ,   .   .   .   ,   p a r   n )   C   t e x t 
 ( w h e r e   t h e r e   i s   n o   b l a n k   b e t w e e n   t h e   i d e n t i f i e r   a n d   t h e   p a r e n t h e s e s   i n   t h e   s e c o n d   c a s e )   i s   t r a n s f o r m e d   b y 
 C T A N G L E   i n t o   a   p r e p r o c e s s o r   c o m m a n d ,   s t a r t i n g   w i t h   # d e f i n e ,   w h i c h   i s   p r i n t e d   a t   t h e   t o p   o f   t h e   C   o u t p u t 
 f i l e   a s   e x p l a i n e d   e a r l i e r . 
 C W E B   U S E R   M A N U A L   ( V E R S I O N   3 . 6 4 )   5 
 A    @ d    m a c r o   d e f i n i t i o n   c a n   g o   o n   f o r   s e v e r a l   l i n e s ,   a n d   t h e   n e w l i n e s   d o n  t   h a v e   t o   b e   p r o t e c t e d   b y 
 b a c k s l a s h e s ,   s i n c e   C T A N G L E   i t s e l f   i n s e r t s   t h e   b a c k s l a s h e s .   I f   f o r   a n y   r e a s o n   y o u   n e e d   a   # d e f i n e   c o m m a n d   a t 
 a   s p e c i f i c   s p o t   i n   y o u r   C   f i l e ,   y o u   c a n   t r e a t   i t   a s   C   c o d e ,   i n s t e a d   o f   a s   a   C W E B   m a c r o ;   b u t   t h e n   y o u   d o   h a v e 
 t o   p r o t e c t   n e w l i n e s   y o u r s e l f . 
 S t r i n g s   a n d   c o n s t a n t s 
 I f   y o u   w a n t   a   s t r i n g   t o   a p p e a r   i n   t h e   C   f i l e ,   d e l i m i t e d   b y   p a i r s   o f      o r   "   m a r k s   a s   u s u a l ,   y o u   c a n   t y p e   i t 
 e x a c t l y   s o   i n   t h e   C W E B   f i l e ,   e x c e p t   t h a t   t h e   c h a r a c t e r    @    s h o u l d   b e   t y p e d    @ @    ( i t   b e c o m e s   a   c o n t r o l   c o d e ,   t h e 
 o n l y   o n e   t h a t   c a n   a p p e a r   i n   s t r i n g s ;   s e e   b e l o w ) .   S t r i n g s   s h o u l d   e n d   o n   t h e   s a m e   l i n e   a s   t h e y   b e g i n ,   u n l e s s 
 t h e r e  s   a   b a c k s l a s h   a t   t h e   e n d   o f   l i n e s   w i t h i n   t h e m . 
 T E X   a n d   C   h a v e   d i f f e r e n t   w a y s   t o   r e f e r   t o   o c t a l   a n d   h e x   c o n s t a n t s ,   b e c a u s e   T E X   i s   o r i e n t e d   t o   t e c h n i c a l 
 w r i t i n g   w h i l e   C   i s   o r i e n t e d   t o   c o m p u t e r   p r o c e s s i n g .   I n   T E X   y o u   m a k e   a   c o n s t a n t   o c t a l   o r   h e x a d e c i m a l   b y 
 p r e p e n d i n g      o r   " ,   r e s p e c t i v e l y ,   t o   i t ;   i n   C   t h e   c o n s t a n t   s h o u l d   b e   p r e c e d e d   b y   0   o r   0 x .   I n   C W E B   i t   s e e m s 
 r e a s o n a b l e   t o   l e t   e a c h   c o n v e n t i o n   h o l d   i n   i t s   r e s p e c t i v e   r e a l m ;   s o   i n   C   t e x t   y o u   g e t   4 0 8   b y   t y p i n g    0 4 0  , 
 w h i c h   C T A N G L E   f a i t h f u l l y   c o p i e s   i n t o   t h e   C   f i l e   ( f o r   t h e   c o m p i l e r  s   b e n e f i t )   a n d   w h i c h   C W E A V E   p r i n t s   a s   %4 0   . 
 S i m i l a r l y ,   C W E A V E   p r i n t s   t h e   h e x a d e c i m a l   C   c o n s t a n t    0 x 2 0    a s   # 2 0 .   T h e   u s e   o f   i t a l i c   f o n t   f o r   o c t a l   d i g i t s 
 a n d   t y p e w r i t e r   f o n t   f o r   h e x a d e c i m a l   d i g i t s   m a k e s   t h e   m e a n i n g   o f   s u c h   c o n s t a n t s   c l e a r e r   i n   a   d o c u m e n t .   F o r 
 c o n s i s t e n c y ,   t h e n ,   y o u   s h o u l d   t y p e    | 0 4 0 |    o r    | 0 x 2 0 |    i n   t h e   T E X   p a r t   o f   t h e   s e c t i o n . 
 C o n t r o l   c o d e s 
 A   C W E B   c o n t r o l   c o d e   i s   a   t w o - c h a r a c t e r   c o m b i n a t i o n   o f   w h i c h   t h e   f i r s t   i s    @  .   W e  v e   a l r e a d y   s e e n   t h e   m e a n i n g 
 o f   s e v e r a l   c o n t r o l   c o d e s ;   i t  s   t i m e   t o   l i s t   t h e m   m o r e   m e t h o d i c a l l y . 
 I n   t h e   f o l l o w i n g   l i s t ,   t h e   l e t t e r s   i n   b r a c k e t s   a f t e r   a   c o n t r o l   c o d e   i n d i c a t e   i n   w h a t   c o n t e x t s   t h a t   c o d e   i s 
 a l l o w e d .   L   i n d i c a t e s   t h a t   t h e   c o d e   i s   a l l o w e d   i n   l i m b o ;   T   ( f o r   T E X ) ,   M   ( f o r   m i d d l e ) ,   a n d   C   ( f o r   C )   m e a n 
 t h a t   t h e   c o d e   i s   a l l o w e d   i n   e a c h   o f   t h e   t h r e e   p a r t s   o f   a   s e c t i o n ,   a t   t o p   l e v e l  t h a t   i s ,   o u t s i d e   s u c h   c o n s t r u c t s 
 a s    | . . . |    a n d   s e c t i o n   n a m e s .   A n   a r r o w   !  m e a n s   t h a t   t h e   c o n t r o l   c o d e   t e r m i n a t e s   t h e   p r e s e n t   p a r t   o f   t h e 
 C W E B   f i l e ,   a n d   i n a u g u r a t e s   t h e   p a r t   i n d i c a t e d   b y   t h e   l e t t e r   f o l l o w i n g   t h e   a r r o w .   T h u s   [ L T M C   !  T   ]   n e x t   t o 
 @   i n d i c a t e s   t h a t   t h i s   c o n t r o l   c o d e   c a n   o c c u r   i n   l i m b o ,   o r   i n   a n y   o f   t h e   t h r e e   p a r t s   o f   a   s e c t i o n ,   a n d   t h a t   i t 
 s t a r t s   t h e   ( p o s s i b l y   e m p t y )   T E X   p a r t   o f   t h e   f o l l o w i n g   s e c t i o n . 
 T w o   o t h e r   a b b r e v i a t i o n s   c a n   o c c u r   i n   t h e s e   b r a c k e t s :   T h e   l e t t e r   r   s t a n d s   f o r   r e s t r i c t e d   c o n t e x t ,   t h a t   i s , 
 m a t e r i a l   i n s i d e   C   c o m m e n t s ,   s e c t i o n   n a m e s ,   C   s t r i n g s   a n d   c o n t r o l   t e x t s   ( d e f i n e d   b e l o w ) ;   t h e   l e t t e r   c   s t a n d s 
 f o r   i n n e r   C   c o n t e x t ,   t h a t   i s ,   C   m a t e r i a l   i n s i d e    | . . . |    ( i n c l u d i n g    | . . . |  s   i n s i d e   c o m m e n t s ,   b u t   n o t   t h o s e 
 o c c u r r i n g   i n   o t h e r   r e s t r i c t e d   c o n t e x t s ) .   A n   a s t e r i s k   "  f o l l o w i n g   t h e   b r a c k e t s   m e a n s   t h a t   t h e   c o n t e x t   f r o m 
 t h i s   c o n t r o l   c o d e   t o   t h e   m a t c h i n g   @ >   i s   r e s t r i c t e d . 
 C o n t r o l   c o d e s   i n v o l v i n g   l e t t e r s   a r e   c a s e - i n s e n s i t i v e ;   t h u s   @ d   a n d   @ D   a r e   e q u i v a l e n t .   O n l y   t h e   l o w e r c a s e 
 v e r s i o n s   a r e   m e n t i o n e d   s p e c i f i c a l l y   b e l o w . 
 @ @   [ L T M C r c ]   A   d o u b l e   @   d e n o t e s   t h e   s i n g l e   c h a r a c t e r    @  .   T h i s   i s   t h e   o n l y   c o n t r o l   c o d e   t h a t   i s   l e g a l 
 e v e r y w h e r e .   N o t e   t h a t   y o u   m u s t   u s e   t h i s   c o n v e n t i o n   i f   y o u   a r e   g i v i n g   a n   i n t e r n e t   e m a i l   a d d r e s s   i n   a 
 C W E B   f i l e   ( e . g . ,   l e v y @ @ m a t h . b e r k e l e y . e d u ) . 
 H e r e   a r e   t h e   c o d e s   t h a t   i n t r o d u c e   t h e   T E X   p a r t   o f   a   s e c t i o n . 
 @   [ L T M C   !  T   ]   T h i s   d e n o t e s   t h e   b e g i n n i n g   o f   a   n e w   ( u n s t a r r e d )   s e c t i o n .   A   t a b   m a r k   o r   f o r m   f e e d   o r 
 e n d - o f - l i n e   c h a r a c t e r   i s   e q u i v a l e n t   t o   a   s p a c e   w h e n   i t   f o l l o w s   a n   @   s i g n   ( a n d   i n   m o s t   o t h e r   c a s e s ) . 
 @ *   [ L T M C   !  T   ]   T h i s   d e n o t e s   t h e   b e g i n n i n g   o f   a   n e w   s t a r r e d   s e c t i o n ,   i . e . ,   a   s e c t i o n   t h a t   b e g i n s   a   n e w 
 m a j o r   g r o u p .   T h e   t i t l e   o f   t h e   n e w   g r o u p   s h o u l d   a p p e a r   a f t e r   t h e   @ * ,   f o l l o w e d   b y   a   p e r i o d .   A s   e x p l a i n e d 
 a b o v e ,   T E X   c o n t r o l   s e q u e n c e s   s h o u l d   b e   a v o i d e d   i n   s u c h   t i t l e s   u n l e s s   t h e y   a r e   q u i t e   s i m p l e .   W h e n 
 C W E A V E   a n d   C T A N G L E   r e a d   a   @ * ,   t h e y   p r i n t   a n   a s t e r i s k   o n   t h e   t e r m i n a l   f o l l o w e d   b y   t h e   c u r r e n t   s e c t i o n 
 n u m b e r ,   s o   t h a t   t h e   u s e r   c a n   s e e   s o m e   i n d i c a t i o n   o f   p r o g r e s s .   T h e   v e r y   f i r s t   s e c t i o n   s h o u l d   b e   s t a r r e d . 
 Y o u   c a n   s p e c i f y   t h e    d e p t h    o f   a   s t a r r e d   s e c t i o n   b y   t y p i n g   *   o r   a   d e c i m a l   n u m b e r   a f t e r   t h e   @ * ; 
 t h i s   i n d i c a t e s   t h e   r e l a t i v e   r a n k i n g   o f   t h e   c u r r e n t   g r o u p   o f   s e c t i o n s   i n   t h e   p r o g r a m   h i e r a r c h y .   T o p - l e v e l 
 p o r t i o n s   o f   t h e   p r o g r a m ,   i n t r o d u c e d   b y   @ * * ,   g e t   t h e i r   n a m e s   t y p e s e t   i n   b o l d f a c e   t y p e   i n   t h e   t a b l e   o f 
 c o n t e n t s ;   t h e y   a r e   s a i d   t o   h a v e   d e p t h   "1 .   O t h e r w i s e   t h e   d e p t h   i s   a   n o n n e g a t i v e   n u m b e r ,   w h i c h   g o v e r n s 
 t h e   a m o u n t   o f   i n d e n t a t i o n   o n   t h e   c o n t e n t s   p a g e .   S u c h   i n d e n t a t i o n   h e l p s   c l a r i f y   t h e   s t r u c t u r e   o f   a   l o n g 
 p r o g r a m .   T h e   d e p t h   i s   a s s u m e d   t o   b e   0   i f   i t   i s   n o t   s p e c i f i e d   e x p l i c i t l y ;   w h e n   y o u r   p r o g r a m   i s   s h o r t ,   y o u 
 6   C W E B   U S E R   M A N U A L   ( V E R S I O N   3 . 6 4 ) 
 m i g h t   a s   w e l l   l e a v e   a l l   d e p t h s   z e r o .   A   s t a r r e d   s e c t i o n   a l w a y s   b e g i n s   a   n e w   p a g e   i n   t h e   o u t p u t ,   u n l e s s 
 t h e   d e p t h   i s   g r e a t e r   t h a n   1 . 
 T h e   m i d d l e   p a r t   o f   e a c h   s e c t i o n   c o n s i s t s   o f   a n y   n u m b e r   o f   m a c r o   d e f i n i t i o n s   ( b e g i n n i n g   w i t h   @ d )   a n d   f o r m a t 
 d e f i n i t i o n s   ( b e g i n n i n g   w i t h   @ f   o r   @ s ) ,   i n t e r m i x e d   i n   a n y   o r d e r . 
 @ d   [ T M   !  M   ]   M a c r o   d e f i n i t i o n s   b e g i n   w i t h   @ d ,   f o l l o w e d   b y   a n   i d e n t i f i e r   a n d   o p t i o n a l   p a r a m e t e r s   a n d   C 
 t e x t   a s   e x p l a i n e d   e a r l i e r . 
 @ f   [ T M   !  M   ]   F o r m a t   d e f i n i t i o n s   b e g i n   w i t h   @ f ;   t h e y   c a u s e   C W E A V E   t o   t r e a t   i d e n t i f i e r s   i n   a   s p e c i a l   w a y 
 w h e n   t h e y   a p p e a r   i n   C   t e x t .   T h e   g e n e r a l   f o r m   o f   a   f o r m a t   d e f i n i t i o n   i s    @ f   l   r  ,   f o l l o w e d   b y   a n   o p t i o n a l 
 c o m m e n t   e n c l o s e d   b e t w e e n   / *   a n d   * / ,   w h e r e   l   a n d   r   a r e   i d e n t i f i e r s ;   C W E A V E   w i l l   s u b s e q u e n t l y   t r e a t 
 i d e n t i f i e r   l   a s   i t   c u r r e n t l y   t r e a t s   r .   T h i s   f e a t u r e   a l l o w s   a   C W E B   p r o g r a m m e r   t o   i n v e n t   n e w   r e s e r v e d   w o r d s 
 a n d / o r   t o   u n r e s e r v e   s o m e   o f   C  s   r e s e r v e d   i d e n t i f i e r s .   F o r   e x a m p l e ,   t h e   c o m m o n   w o r d s    e r r o r    a n d    l i n e  
 h a v e   b e e n   g i v e n   a   s p e c i a l   m e a n i n g   i n   t h e   C   p r e p r o c e s s o r ,   s o   C W E A V E   i s   s e t   u p   t o   f o r m a t   t h e m   s p e c i a l l y ; 
 i f   y o u   w a n t   a   v a r i a b l e   n a m e d   e r r o r   o r   l i n e   ,   y o u   s h o u l d   s a y 
 @ f   e r r o r   n o r m a l   @ f   l i n e   n o r m a l 
 s o m e w h e r e   i n   y o u r   p r o g r a m . 
 I f   r   i s   t h e   s p e c i a l   i d e n t i f i e r    T e X    ,   i d e n t i f i e r   l   w i l l   b e   f o r m a t t e d   a s   a   T E X   c o n t r o l   s e q u e n c e ;   f o r 
 e x a m p l e ,    @ f   f o o   T e X    i n   t h e   C W E B   f i l e   w i l l   c a u s e   i d e n t i f i e r   f o o   t o   b e   o u t p u t   a s   \ f o o   b y   C W E A V E .   T h e 
 p r o g r a m m e r   s h o u l d   d e f i n e   \ f o o   t o   h a v e   w h a t e v e r   c u s t o m   f o r m a t   i s   d e s i r e d ,   a s s u m i n g   T E X   m a t h   m o d e . 
 ( E a c h   u n d e r l i n e   c h a r a c t e r   i s   c o n v e r t e d   t o   x   w h e n   m a k i n g   t h e   T E X   c o n t r o l   s e q u e n c e ,   a n d   e a c h   d o l l a r 
 s i g n   i s   c o n v e r t e d   t o   X ;   t h u s   f o o   b a r   b e c o m e s   \ f o o x b a r .   O t h e r   c h a r a c t e r s ,   i n c l u d i n g   d i g i t s ,   a r e   l e f t 
 u n t r a n s l a t e d ,   s o   T E X   w i l l   c o n s i d e r   t h e m   a s   m a c r o   p a r a m e t e r s ,   n o t   a s   p a r t   o f   t h e   c o n t r o l   s e q u e n c e   i t s e l f . 
 F o r   e x a m p l e , 
 \ d e f \ x # 1 { x _ { # 1 } }   @ f   x 1   T e X   @ f   x 2   T e X 
 w i l l   f o r m a t   x 1   a n d   x 2   n o t   a s   x 1   a n d   x 2   b u t   a s   x 1   a n d   x 2 . ) 
 I f   r   i s   t h e   s p e c i a l   i d e n t i f i e r    m a k e   p a i r    ,   i d e n t i f i e r   l   w i l l   b e   t r e a t e d   a s   a   C + +   f u n c t i o n   t e m p l a t e . 
 F o r   e x a m p l e ,   a f t e r   @ f   c o n v e r t   m a k e _ p a i r   o n e   c a n   s a y    c o n v e r t < i n t > ( 2 . 5 )    w i t h o u t   h a v i n g   <   a n d   > 
 m i s u n d e r s t o o d   a s   l e s s - t h a n   a n d   g r e a t e r - t h a n   s i g n s . 
 C W E A V E   k n o w s   t h a t   i d e n t i f i e r s   b e i n g   d e f i n e d   w i t h   a   t y p e d e f   s h o u l d   b e c o m e   r e s e r v e d   w o r d s ;   t h u s   y o u 
 d o n  t   n e e d   f o r m a t   d e f i n i t i o n s   v e r y   o f t e n . 
 @ s   [ T M   !  M   ;   L ]   S a m e   a s   @ f ,   b u t   C W E A V E   d o e s   n o t   s h o w   t h e   f o r m a t   d e f i n i t i o n   i n   t h e   o u t p u t ,   a n d   t h e 
 o p t i o n a l   C   c o m m e n t   i s   n o t   a l l o w e d .   T h i s   i s   u s e d   m o s t l y   i n   @ i   f i l e s . 
 N e x t   c o m e   t h e   c o d e s   t h a t   g o v e r n   t h e   C   p a r t   o f   a   s e c t i o n . 
 @ c   @ p   [ T M   !  C ]   T h e   C   p a r t   o f   a n   u n n a m e d   s e c t i o n   b e g i n s   w i t h   @ c   ( o r   w i t h   @ p   f o r    p r o g r a m  ;   b o t h 
 c o n t r o l   c o d e s   d o   t h e   s a m e   t h i n g ) .   T h i s   c a u s e s   C T A N G L E   t o   a p p e n d   t h e   f o l l o w i n g   C   c o d e   t o   t h e   f i r s t - o r d e r 
 p r o g r a m   t e x t ,   a s   e x p l a i n e d   o n   p a g e   3 .   N o t e   t h a t   C W E A V E   d o e s   n o t   p r i n t   a    @ c    i n   t h e   T E X   o u t p u t ,   s o 
 i f   y o u   a r e   c r e a t i n g   a   C W E B   f i l e   b a s e d   o n   a   T E X - p r i n t e d   C W E B   d o c u m e n t a t i o n   y o u   h a v e   t o   r e m e m b e r   t o 
 i n s e r t   @ c   i n   t h e   a p p r o p r i a t e   p l a c e s   o f   t h e   u n n a m e d   s e c t i o n s . 
 @ <   [ T M   !  C ;   C ;   c ]   "  T h i s   c o n t r o l   c o d e   i n t r o d u c e s   a   s e c t i o n   n a m e   ( o r   u n a m b i g u o u s   p r e f i x ,   a s   d i s c u s s e d 
 a b o v e ) ,   w h i c h   c o n s i s t s   o f   T E X   t e x t   a n d   e x t e n d s   t o   t h e   m a t c h i n g   @ > .   T h e   w h o l e   c o n s t r u c t   @ < . . . @ >   i s 
 c o n c e p t u a l l y   a   C   e l e m e n t .   T h e   b e h a v i o r   i s   d i f f e r e n t   d e p e n d i n g   o n   t h e   c o n t e x t : 
 A   @ <   a p p e a r i n g   i n   c o n t e x t s   T   a n d   M   a t t a c h e s   t h e   f o l l o w i n g   s e c t i o n   n a m e   t o   t h e   c u r r e n t   s e c t i o n ,   a n d 
 i n a u g u r a t e s   t h e   C   p a r t   o f   t h e   s e c t i o n .   T h e   c l o s i n g   @ >   s h o u l d   b e   f o l l o w e d   b y   =   o r   + = . 
 I n   c o n t e x t   C ,   @ <   i n d i c a t e s   t h a t   t h e   n a m e d   s e c t i o n   i s   b e i n g   u s e d  i t s   C   d e f i n i t i o n   i s   s p l i c e d   i n   b y 
 C T A N G L E ,   a s   e x p l a i n e d   o n   p a g e   3 .   A s   a n   e r r o r - d e t e c t i o n   m e a s u r e ,   C T A N G L E   a n d   C W E A V E   c o m p l a i n   i f   s u c h 
 a   s e c t i o n   n a m e   i s   f o l l o w e d   b y   = ,   b e c a u s e   m o s t   l i k e l y   t h i s   i s   m e a n t   a s   t h e   d e f i n i t i o n   o f   a   n e w   s e c t i o n ,   a n d 
 s o   s h o u l d   b e   p r e c e d e d   b y   @   .   I f   y o u   r e a l l y   w a n t   t o   s a y   0  f o o   	0  =   b a r   ,   w h e r e   0  f o o   	0  i s   b e i n g   u s e d   a n d   n o t 
 d e f i n e d ,   p u t   a   n e w l i n e   b e f o r e   t h e   = . 
 F i n a l l y ,   i n   i n n e r   C   c o n t e x t   ( t h a t   i s ,   w i t h i n    | . . . |    i n   t h e   T E X   p a r t   o f   a   s e c t i o n   o r   i n   a   c o m m e n t ) , 
 @ < . . . @ >   m e a n s   t h a t   t h e   n a m e d   s e c t i o n   i s   b e i n g   c i t e d .   S u c h   a n   o c c u r r e n c e   i s   i g n o r e d   b y   C T A N G L E .   N o t e 
 t h a t   e v e n   h e r e   w e   t h i n k   o f   t h e   s e c t i o n   n a m e   a s   b e i n g   a   C   e l e m e n t ,   h e n c e   t h e   | . . . | . 
 @ (   [ T M   !  C ;   C ;   c ]   "  A   s e c t i o n   n a m e   c a n   b e g i n   w i t h   @ ( .   E v e r y t h i n g   w o r k s   j u s t   a s   f o r   @ < ,   e x c e p t   t h a t 
 t h e   C   c o d e   o f   t h e   s e c t i o n   n a m e d   @ ( f o o @ >   i s   w r i t t e n   b y   C T A N G L E   t o   f i l e   f o o .   I n   t h i s   w a y   y o u   c a n   g e t 
 C W E B   U S E R   M A N U A L   ( V E R S I O N   3 . 6 4 )   7 
 m u l t i p l e - f i l e   o u t p u t   f r o m   a   s i n g l e   C W E B   f i l e .   ( T h e   @ d   d e f i n i t i o n s   a r e   n o t   o u t p u t   t o   s u c h   f i l e s ,   o n l y   t o   t h e 
 m a s t e r   . c   f i l e . )   O n e   u s e   o f   t h i s   f e a t u r e   i s   t o   p r o d u c e   h e a d e r   f i l e s   f o r   o t h e r   p r o g r a m   m o d u l e s   t h a t   w i l l   b e 
 l o a d e d   w i t h   t h e   p r e s e n t   o n e .   A n o t h e r   u s e   i s   t o   p r o d u c e   a   t e s t   r o u t i n e   t h a t   g o e s   w i t h   y o u r   p r o g r a m .   B y 
 k e e p i n g   t h e   s o u r c e s   f o r   a   p r o g r a m   a n d   i t s   h e a d e r   a n d   t e s t   r o u t i n e   t o g e t h e r ,   y o u   a r e   m o r e   l i k e l y   t o   k e e p 
 a l l   t h r e e   c o n s i s t e n t   w i t h   e a c h   o t h e r .   N o t i c e   t h a t   t h e   o u t p u t   o f   a   n a m e d   s e c t i o n   c a n   b e   i n c o r p o r a t e d   i n 
 s e v e r a l   d i f f e r e n t   o u t p u t   f i l e s ,   b e c a u s e   y o u   c a n   m e n t i o n   @ < f o o @ >   i n   b o t h   @ ( b a r 1 @ >   a n d   @ ( b a r 2 @ > . 
 @ h   [ C c ]   C a u s e s   C T A N G L E   t o   i n s e r t   a t   t h e   c u r r e n t   s p o t   t h e   # d e f i n e   s t a t e m e n t s   f r o m   t h e   m i d d l e   p a r t s   o f 
 a l l   s e c t i o n s ,   a n d   n o t   t o   w r i t e   t h e m   a t   t h e   b e g i n n i n g   o f   t h e   C   f i l e .   U s e f u l   w h e n   y o u   w a n t   t h e   m a c r o 
 d e f i n i t i o n s   t o   c o m e   a f t e r   t h e   i n c l u d e   f i l e s ,   s a y .   ( I g n o r e d   b y   C T A N G L E   i n s i d e    | . . . |  . ) 
 T h e   n e x t   s e v e r a l   c o n t r o l   c o d e s   i n t r o d u c e    c o n t r o l   t e x t s ,    w h i c h   e n d   w i t h   t h e   n e x t    @ >  .   T h e   c l o s i n g    @ >  
 m u s t   b e   o n   t h e   s a m e   l i n e   o f   t h e   C W E B   f i l e   a s   t h e   l i n e   w h e r e   t h e   c o n t r o l   t e x t   b e g a n .   T h e   c o n t e x t   f r o m   e a c h 
 o f   t h e s e   c o n t r o l   c o d e s   t o   t h e   m a t c h i n g   @ >   i s   r e s t r i c t e d . 
 @ ^   [ T M C c ]   "  T h e   c o n t r o l   t e x t   t h a t   f o l l o w s ,   u p   t o   t h e   n e x t    @ >  ,   w i l l   b e   e n t e r e d   i n t o   t h e   i n d e x   t o g e t h e r   w i t h 
 t h e   i d e n t i f i e r s   o f   t h e   C   p r o g r a m ;   t h i s   t e x t   w i l l   a p p e a r   i n   r o m a n   t y p e .   F o r   e x a m p l e ,   t o   p u t   t h e   p h r a s e 
  s y s t e m   d e p e n d e n c i e s    i n t o   t h e   i n d e x   t h a t   i s   o u t p u t   b y   C W E A V E ,   t y p e    @ ^ s y s t e m   d e p e n d e n c i e s @ >    i n 
 e a c h   s e c t i o n   t h a t   y o u   w a n t   t o   i n d e x   a s   s y s t e m   d e p e n d e n t . 
 @ .   [ T M C c ]   "  T h e   c o n t r o l   t e x t   t h a t   f o l l o w s   w i l l   b e   e n t e r e d   i n t o   t h e   i n d e x   i n   t y p e w r i t e r   t y p e . 
 @ :   [ T M C c ]   "  T h e   c o n t r o l   t e x t   t h a t   f o l l o w s   w i l l   b e   e n t e r e d   i n t o   t h e   i n d e x   i n   a   f o r m a t   c o n t r o l l e d   b y   t h e 
 T E X   m a c r o    \ 9  ,   w h i c h   y o u   s h o u l d   d e f i n e   a s   d e s i r e d . 
 @ t   [ M C c ]   "  T h e   c o n t r o l   t e x t   t h a t   f o l l o w s   w i l l   b e   p u t   i n t o   a   T E X   \ h b o x   a n d   f o r m a t t e d   a l o n g   w i t h   t h e 
 n e i g h b o r i n g   C   p r o g r a m .   T h i s   t e x t   i s   i g n o r e d   b y   C T A N G L E ,   b u t   i t   c a n   b e   u s e d   f o r   v a r i o u s   p u r p o s e s   w i t h i n 
 C W E A V E .   F o r   e x a m p l e ,   y o u   c a n   m a k e   c o m m e n t s   t h a t   m i x   C   a n d   c l a s s i c a l   m a t h e m a t i c s ,   a s   i n    s i z e   <   2 1 5  , 
 b y   t y p i n g    | s i z e   <   2 @ t $ ^ { 1 5 } $ @ > |  . 
 @ =   [ M C c ]   "  T h e   c o n t r o l   t e x t   t h a t   f o l l o w s   w i l l   b e   p a s s e d   v e r b a t i m   t o   t h e   C   p r o g r a m . 
 @ q   [ L T M C c ]   "  T h e   c o n t r o l   t e x t   t h a t   f o l l o w s   w i l l   b e   t o t a l l y   i g n o r e d  i t  s   a   c o m m e n t   f o r   r e a d e r s   o f   t h e 
 C W E B   f i l e   o n l y .   A   f i l e   i n t e n d e d   t o   b e   i n c l u d e d   i n   l i m b o ,   w i t h   @ i ,   c a n   i d e n t i f y   i t s e l f   w i t h   @ q   c o m m e n t s . 
 A n o t h e r   u s e   i s   t o   b a l a n c e   u n b a l a n c e d   p a r e n t h e s e s   i n   C   s t r i n g s ,   s o   t h a t   y o u r   t e x t   e d i t o r  s   p a r e n t h e s i s 
 m a t c h e r   d o e s n  t   g o   i n t o   a   t a i l s p i n . 
 @ !   [ T M C c ]   "  T h e   s e c t i o n   n u m b e r   i n   a n   i n d e x   e n t r y   w i l l   b e   u n d e r l i n e d   i f    @ !    i m m e d i a t e l y   p r e c e d e s   t h e 
 i d e n t i f i e r   o r   c o n t r o l   t e x t   b e i n g   i n d e x e d .   T h i s   c o n v e n t i o n   i s   u s e d   t o   d i s t i n g u i s h   t h e   s e c t i o n s   w h e r e   a n 
 i d e n t i f i e r   i s   d e f i n e d ,   o r   w h e r e   i t   i s   e x p l a i n e d   i n   s o m e   s p e c i a l   w a y ,   f r o m   t h e   s e c t i o n s   w h e r e   i t   i s   u s e d . 
 A   r e s e r v e d   w o r d   o r   a n   i d e n t i f i e r   o f   l e n g t h   o n e   w i l l   n o t   b e   i n d e x e d   e x c e p t   f o r   u n d e r l i n e d   e n t r i e s .   A n    @ !  
 i s   i m p l i c i t l y   i n s e r t e d   b y   C W E A V E   w h e n   a n   i d e n t i f i e r   i s   b e i n g   d e f i n e d   o r   d e c l a r e d   i n   C   c o d e ;   f o r   e x a m p l e , 
 t h e   d e f i n i t i o n 
 i n t   a r r a y   [ m a x   d i m   ] ,   c o u n t   =   o l d   c o u n t   ; 
 m a k e s   t h e   n a m e s   a r r a y   a n d   c o u n t   g e t   a n   u n d e r l i n e d   e n t r y   i n   t h e   i n d e x .   S t a t e m e n t   l a b e l s ,   f u n c t i o n 
 d e f i n i t i o n s   l i k e   m a i n   ( i n t   a r g c   ,   c h a r   "a r g v   [   ] ) ,   a n d   t y p e d e f   d e f i n i t i o n s   a l s o   i m p l y   u n d e r l i n i n g .   A n   o l d - 
 s t y l e   f u n c t i o n   d e f i n i t i o n   ( w i t h o u t   p r o t o t y p i n g )   d o e s n  t   d e f i n e   i t s   a r g u m e n t s ;   t h e   a r g u m e n t s   w i l l ,   h o w e v e r , 
 b e   c o n s i d e r e d   t o   b e   d e f i n e d   ( i . e . ,   t h e i r   i n d e x   e n t r i e s   w i l l   b e   u n d e r l i n e d )   i f   t h e i r   t y p e s   a r e   d e c l a r e d   b e f o r e 
 t h e   b o d y   o f   t h e   f u n c t i o n   i n   t h e   u s u a l   w a y   ( e . g . ,    i n t   a r g c   ;   c h a r   "a r g v   [   ] ;   {   .   .   .   }  ) .   T h u s   @ !   i s   n o t   n e e d e d 
 v e r y   o f t e n ,   e x c e p t   i n   u n u s u a l   c o n s t r u c t i o n s   o r   i n   c a s e s   l i k e 
 e n u m   b o o l e a n   { @ ! f a l s e ,   @ ! t r u e } ; 
 h e r e   @ !   g i v e s   t h e   b e s t   r e s u l t s   b e c a u s e   i n d i v i d u a l   c o n s t a n t s   e n u m e r a t e d   b y   e n u m   a r e   n o t   a u t o m a t i c a l l y 
 u n d e r l i n e d   i n   t h e   i n d e x   a t   t h e i r   p o i n t   o f   d e f i n i t i o n . 
 W e   n o w   t u r n   t o   c o n t r o l   c o d e s   t h a t   a f f e c t   o n l y   t h e   o p e r a t i o n   o f   C T A N G L E . 
 @    [ M C c ]   T h i s   c o n t r o l   c o d e   i s   d a n g e r o u s   b e c a u s e   i t   h a s   q u i t e   d i f f e r e n t   m e a n i n g s   i n   C W E B   a n d   t h e   o r i g i n a l 
 W E B .   I n   C W E B   i t   p r o d u c e s   t h e   d e c i m a l   c o n s t a n t   c o r r e s p o n d i n g   t o   t h e   A S C I I   c o d e   f o r   a   s t r i n g   o f   l e n g t h   1 
 ( e . g . ,   @  a    i s   C T A N G L E d   i n t o   9 7   a n d   @  \ t    i n t o   9 ) .   Y o u   m i g h t   w a n t   t o   u s e   t h i s   i f   y o u   n e e d   t o   w o r k   i n 
 A S C I I   o n   a   n o n - A S C I I   m a c h i n e ;   b u t   i n   m o s t   c a s e s   t h e   C   c o n v e n t i o n s   o f   < c t y p e . h >   a r e   a d e q u a t e   f o r 
 c h a r a c t e r - s e t - i n d e p e n d e n t   p r o g r a m m i n g . 
 8   C W E B   U S E R   M A N U A L   ( V E R S I O N   3 . 6 4 ) 
 @ &   [ M C c ]   T h e   @ &   o p e r a t i o n   c a u s e s   w h a t e v e r   i s   o n   i t s   l e f t   t o   b e   a d j a c e n t   t o   w h a t e v e r   i s   o n   i t s   r i g h t ,   i n   t h e 
 C   o u t p u t .   N o   s p a c e s   o r   l i n e   b r e a k s   w i l l   s e p a r a t e   t h e s e   t w o   i t e m s . 
 @ l   [ L ]   C W E B   p r o g r a m m e r s   h a v e   t h e   o p t i o n   o f   u s i n g   a n y   8 - b i t   c h a r a c t e r   c o d e   f r o m   t h e   o f t e n - f o r b i d d e n   r a n g e 
 1 2 8  2 5 5   w i t h i n   T E X   t e x t ;   s u c h   c h a r a c t e r s   a r e   a l s o   p e r m i t t e d   i n   s t r i n g s   a n d   e v e n   i n   i d e n t i f i e r s   o f   t h e   C 
 p r o g r a m .   U n d e r   v a r i o u s   e x t e n s i o n s   o f   t h e   b a s i c   A S C I I   s t a n d a r d ,   t h e   h i g h e r   8 - b i t   c o d e s   c o r r e s p o n d   t o 
 a c c e n t e d   l e t t e r s ,   l e t t e r s   f r o m   n o n - L a t i n   a l p h a b e t s ,   a n d   s o   o n .   W h e n   s u c h   c h a r a c t e r s   o c c u r   i n   i d e n t i f i e r s , 
 C T A N G L E   m u s t   r e p l a c e   t h e m   b y   s t a n d a r d   A S C I I   a l p h a n u m e r i c   c h a r a c t e r s   o r   _ ,   i n   o r d e r   t o   g e n e r a t e 
 l e g a l   C   c o d e .   I t   d o e s   t h i s   b y   m e a n s   o f   a   t r a n s l i t e r a t i o n   t a b l e ,   w h i c h   b y   d e f a u l t   a s s o c i a t e s   t h e   s t r i n g 
 X a b   t o   t h e   c h a r a c t e r   w i t h   A S C I I   c o d e   # a b   ( w h e r e   a   a n d   b   a r e   h e x a d e c i m a l   d i g i t s ,   a n d   a   e"  8 ) .   B y 
 p l a c i n g   t h e   c o n s t r u c t i o n   @ l   a b   n e w s t r i n g   i n   l i m b o ,   y o u   a r e   t e l l i n g   C T A N G L E   t o   r e p l a c e   t h i s   c h a r a c t e r 
 b y   n e w s t r i n g   i n s t e a d .   F o r   e x a m p l e ,   t h e   I S O   L a t i n - 1   c o d e   f o r   t h e   l e t t e r    u    i s   # F C   ( o r    \ 3 7 4  ) ,   a n d 
 C T A N G L E   w i l l   n o r m a l l y   c h a n g e   t h i s   c o d e   t o   t h e   t h r e e - c h a r a c t e r   s e q u e n c e   X F C   i f   i t   a p p e a r s   i n   a n   i d e n t i f i e r . 
 I f   y o u   s a y   @ l   f c   u e ,   t h e   c o d e   w i l l   b e   t r a n s l i t e r a t e d   i n t o   u e   i n s t e a d . 
 C W E A V E   p a s s e s   8 - b i t   c h a r a c t e r s   s t r a i g h t   t h r o u g h   t o   T E X   w i t h o u t   t r a n s l i t e r a t i o n ;   t h e r e f o r e   T E X   m u s t 
 b e   p r e p a r e d   t o   r e c e i v e   t h e m .   I f   y o u   a r e   f o r m a t t i n g   a l l   y o u r   n o n s t a n d a r d   i d e n t i f i e r s   a s    c u s t o m    c o n t r o l 
 s e q u e n c e s ,   y o u   s h o u l d   m a k e   T E X   t r e a t   a l l   t h e i r   c h a r a c t e r s   a s   l e t t e r s .   O t h e r w i s e   y o u   s h o u l d   e i t h e r   m a k e 
 y o u r   8 - b i t   c o d e s    a c t i v e    i n   T E X ,   o r   l o a d   f o n t s   t h a t   c o n t a i n   t h e   s p e c i a l   c h a r a c t e r s   y o u   n e e d   i n   t h e   c o r r e c t 
 p o s i t i o n s .   ( T h e   f o n t   s e l e c t e d   b y   T E X   c o n t r o l   s e q u e n c e   \ i t   i s   u s e d   f o r   i d e n t i f i e r s . )   L o o k   f o r   s p e c i a l   m a c r o 
 p a c k a g e s   d e s i g n e d   f o r   C W E B   u s e r s   i n   y o u r   l a n g u a g e ;   o r ,   i f   y o u   a r e   b r a v e ,   w r i t e   o n e   y o u r s e l f . 
 T h e   n e x t   e i g h t   c o n t r o l   c o d e s   ( n a m e l y    @ ,  ,    @ /  ,    @ |  ,    @ #  ,    @ +  ,    @ ;  ,    @ [  ,   a n d    @ ]  )   h a v e   n o   e f f e c t   o n   t h e 
 C   p r o g r a m   o u t p u t   b y   C T A N G L E ;   t h e y   m e r e l y   h e l p   t o   i m p r o v e   t h e   r e a d a b i l i t y   o f   t h e   T E X - f o r m a t t e d   C   t h a t 
 i s   o u t p u t   b y   C W E A V E ,   i n   u n u s u a l   c i r c u m s t a n c e s .   C W E A V E  s   b u i l t - i n   f o r m a t t i n g   m e t h o d   i s   f a i r l y   g o o d   w h e n 
 d e a l i n g   w i t h   s y n t a c t i c a l l y   c o r r e c t   C   t e x t ,   b u t   i t   i s   i n c a p a b l e   o f   h a n d l i n g   a l l   p o s s i b l e   c a s e s ,   b e c a u s e   i t   m u s t 
 d e a l   w i t h   f r a g m e n t s   o f   t e x t   i n v o l v i n g   m a c r o s   a n d   s e c t i o n   n a m e s ;   t h e s e   f r a g m e n t s   d o   n o t   n e c e s s a r i l y   o b e y   C  s 
 s y n t a x .   A l t h o u g h   C W E B   a l l o w s   y o u   t o   o v e r r i d e   t h e   a u t o m a t i c   f o r m a t t i n g ,   y o u r   b e s t   s t r a t e g y   i s   n o t   t o   w o r r y 
 a b o u t   s u c h   t h i n g s   u n t i l   y o u   h a v e   s e e n   w h a t   C W E A V E   p r o d u c e s   a u t o m a t i c a l l y ,   s i n c e   y o u   w i l l   p r o b a b l y   n e e d   t o 
 m a k e   o n l y   a   f e w   c o r r e c t i o n s   w h e n   y o u   a r e   t o u c h i n g   u p   y o u r   d o c u m e n t a t i o n . 
 @ ,   [ M C c ]   T h i s   c o n t r o l   c o d e   i n s e r t s   a   t h i n   s p a c e   i n   C W E A V E  s   o u t p u t .   S o m e t i m e s   y o u   n e e d   t h i s   e x t r a   s p a c e 
 i f   y o u   a r e   u s i n g   m a c r o s   i n   a n   u n u s u a l   w a y ,   e . g . ,   i f   t w o   i d e n t i f i e r s   a r e   a d j a c e n t . 
 @ /   [ M C ]   T h i s   c o n t r o l   c o d e   c a u s e s   a   l i n e   b r e a k   t o   o c c u r   w i t h i n   a   C   p r o g r a m   f o r m a t t e d   b y   C W E A V E .   L i n e 
 b r e a k s   a r e   c h o s e n   a u t o m a t i c a l l y   b y   T E X   a c c o r d i n g   t o   a   s c h e m e   t h a t   w o r k s   9 9 %   o f   t h e   t i m e ,   b u t   s o m e t i m e s 
 y o u   w i l l   p r e f e r   t o   f o r c e   a   l i n e   b r e a k   s o   t h a t   t h e   p r o g r a m   i s   s e g m e n t e d   a c c o r d i n g   t o   l o g i c a l   r a t h e r   t h a n 
 v i s u a l   c r i t e r i a .   I f   a   c o m m e n t   f o l l o w s ,   s a y    @ / @ ,    t o   b r e a k   t h e   l i n e   b e f o r e   t h e   c o m m e n t . 
 @ |   [ M C ]   T h i s   c o n t r o l   c o d e   s p e c i f i e s   a n   o p t i o n a l   l i n e   b r e a k   i n   t h e   m i d s t   o f   a n   e x p r e s s i o n .   F o r   e x a m p l e , 
 i f   y o u   h a v e   a   l o n g   e x p r e s s i o n   o n   t h e   r i g h t - h a n d   s i d e   o f   a n   a s s i g n m e n t   s t a t e m e n t ,   y o u   c a n   u s e    @ |    t o 
 s p e c i f y   b r e a k p o i n t s   m o r e   l o g i c a l   t h a n   t h e   o n e s   t h a t   T E X   m i g h t   c h o o s e   o n   v i s u a l   g r o u n d s . 
 @ #   [ M C ]   T h i s   c o n t r o l   c o d e   f o r c e s   a   l i n e   b r e a k ,   l i k e   @ /   d o e s ,   a n d   i t   a l s o   c a u s e s   a   l i t t l e   e x t r a   w h i t e   s p a c e 
 t o   a p p e a r   b e t w e e n   t h e   l i n e s   a t   t h i s   b r e a k .   Y o u   m i g h t   u s e   i t ,   f o r   e x a m p l e ,   b e t w e e n   g r o u p s   o f   m a c r o 
 d e f i n i t i o n s   t h a t   a r e   l o g i c a l l y   s e p a r a t e   b u t   w i t h i n   t h e   s a m e   s e c t i o n .   C W E B   a u t o m a t i c a l l y   i n s e r t s   t h i s   e x t r a 
 s p a c e   b e t w e e n   f u n c t i o n s ,   b e t w e e n   e x t e r n a l   d e c l a r a t i o n s   a n d   f u n c t i o n s ,   a n d   b e t w e e n   d e c l a r a t i o n s   a n d 
 s t a t e m e n t s   w i t h i n   a   f u n c t i o n . 
 @ +   [ M C ]   T h i s   c o n t r o l   c o d e   c a n c e l s   a   l i n e   b r e a k   t h a t   m i g h t   o t h e r w i s e   b e   i n s e r t e d   b y   C W E A V E ,   e . g . ,   b e f o r e 
 t h e   w o r d    e l s e  ,   i f   y o u   w a n t   t o   p u t   a   s h o r t   i f  e l s e   c o n s t r u c t i o n   o n   a   s i n g l e   l i n e .   I f   y o u   s a y    { @ +    a t   t h e 
 b e g i n n i n g   o f   a   c o m p o u n d   s t a t e m e n t   t h a t   i s   t h e   b o d y   o f   a   f u n c t i o n ,   t h e   f i r s t   d e c l a r a t i o n   o r   s t a t e m e n t   o f 
 t h e   f u n c t i o n   w i l l   a p p e a r   o n   t h e   s a m e   l i n e   a s   t h e   l e f t   b r a c e ,   a n d   i t   w i l l   b e   i n d e n t e d   b y   t h e   s a m e   a m o u n t 
 a s   t h e   s e c o n d   d e c l a r a t i o n   o r   s t a t e m e n t   o n   t h e   n e x t   l i n e . 
 @ ;   [ M C ]   T h i s   c o n t r o l   c o d e   i s   t r e a t e d   l i k e   a   s e m i c o l o n ,   f o r   f o r m a t t i n g   p u r p o s e s ,   e x c e p t   t h a t   i t   i s   i n v i s i b l e . 
 Y o u   c a n   u s e   i t ,   f o r   e x a m p l e ,   a f t e r   a   s e c t i o n   n a m e   o r   m a c r o   w h e n   t h e   C   t e x t   r e p r e s e n t e d   b y   t h a t   s e c t i o n 
 o r   m a c r o   i s   a   c o m p o u n d   s t a t e m e n t   o r   e n d s   w i t h   a   s e m i c o l o n .   C o n s i d e r   c o n s t r u c t i o n s   l i k e 
 i f   ( c o n d i t i o n )   m a c r o   @ ; 
 e l s e   b r e a k ; 
 w h e r e   m a c r o   i s   d e f i n e d   t o   b e   a   c o m p o u n d   s t a t e m e n t   ( e n c l o s e d   i n   b r a c e s ) .   T h i s   i s   a   w e l l - k n o w n   i n f e l i c i t y 
 o f   C   s y n t a x . 
 C W E B   U S E R   M A N U A L   ( V E R S I O N   3 . 6 4 )   9 
 @ [   [ M C ]   S e e   @ ] . 
 @ ]   [ M C ]   P l a c e   @ [ . . . @ ]   b r a c k e t s   a r o u n d   p r o g r a m   t e x t   t h a t   C W E A V E   i s   s u p p o s e d   t o   f o r m a t   a s   a n   e x p r e s s i o n , 
 i f   i t   d o e s n  t   a l r e a d y   d o   s o .   ( T h i s   o c c a s i o n a l l y   a p p l i e s   t o   u n u s u a l   m a c r o   a r g u m e n t s . )   A l s o   i n s e r t    @ [ @ ]  
 b e t w e e n   a   s i m p l e   t y p e   n a m e   a n d   a   l e f t   p a r e n t h e s i s   w h e n   d e c l a r i n g   a   p o i n t e r   t o   a   f u n c t i o n ,   a s   i n 
 i n t   @ [ @ ]   ( * f ) ( ) ; 
 o t h e r w i s e   C W E A V E   w i l l   c o n f u s e   t h e   f i r s t   p a r t   o f   t h a t   d e c l a r a t i o n   w i t h   t h e   C + +   e x p r e s s i o n    i n t ( "f )  . 
 A n o t h e r   e x a m p l e ,   f o r   p e o p l e   w h o   w a n t   t o   u s e   l o w - l e v e l   # d e f i n e   c o m m a n d s   i n   t h e   m i d s t   o f   C   c o d e   a n d 
 t h e   d e f i n i t i o n   b e g i n s   w i t h   a   c a s t : 
 # d e f i n e   f o o   @ [ ( i n t ) ( b a r ) @ ] 
 T h e   r e m a i n i n g   c o n t r o l   c o d e s   g o v e r n   t h e   i n p u t   t h a t   C W E B   s e e s . 
 @ x   @ y   @ z   [ c h a n g e   f i l e   ]   C W E A V E   a n d   C T A N G L E   a r e   d e s i g n e d   t o   w o r k   w i t h   t w o   i n p u t   f i l e s ,   c a l l e d   w e b   f i l e   a n d 
 c h a n g e   f i l e   ,   w h e r e   c h a n g e   f i l e   c o n t a i n s   d a t a   t h a t   o v e r r i d e s   s e l e c t e d   p o r t i o n s   o f   w e b   f i l e   .   T h e   r e s u l t i n g 
 m e r g e d   t e x t   i s   a c t u a l l y   w h a t   h a s   b e e n   c a l l e d   t h e   C W E B   f i l e   e l s e w h e r e   i n   t h i s   r e p o r t . 
 H e r e  s   h o w   i t   w o r k s :   T h e   c h a n g e   f i l e   c o n s i s t s   o f   z e r o   o r   m o r e    c h a n g e s ,    w h e r e   a   c h a n g e   h a s   t h e   f o r m 
  @ x 0o l d   l i n e s 	0@ y 0n e w   l i n e s 	0@ z  .   T h e   s p e c i a l   c o n t r o l   c o d e s   @ x ,   @ y ,   @ z ,   w h i c h   a r e   a l l o w e d   o n l y   i n   c h a n g e 
 f i l e s ,   m u s t   a p p e a r   a t   t h e   b e g i n n i n g   o f   a   l i n e ;   t h e   r e m a i n d e r   o f   s u c h   a   l i n e   i s   i g n o r e d .   T h e   0o l d   l i n e s 	0
 r e p r e s e n t   m a t e r i a l   t h a t   e x a c t l y   m a t c h e s   c o n s e c u t i v e   l i n e s   o f   t h e   w e b   f i l e   ;   t h e   0n e w   l i n e s 	0  r e p r e s e n t   z e r o 
 o r   m o r e   l i n e s   t h a t   a r e   s u p p o s e d   t o   r e p l a c e   t h e   o l d .   W h e n e v e r   t h e   f i r s t    o l d   l i n e    o f   a   c h a n g e   i s   f o u n d 
 t o   m a t c h   a   l i n e   i n   t h e   w e b   f i l e   ,   a l l   t h e   o t h e r   l i n e s   i n   t h a t   c h a n g e   m u s t   m a t c h   t o o . 
 B e t w e e n   c h a n g e s ,   b e f o r e   t h e   f i r s t   c h a n g e ,   a n d   a f t e r   t h e   l a s t   c h a n g e ,   t h e   c h a n g e   f i l e   c a n   h a v e   a n y 
 n u m b e r   o f   l i n e s   t h a t   d o   n o t   b e g i n   w i t h    @ x  ,    @ y  ,   o r    @ z  .   S u c h   l i n e s   a r e   b y p a s s e d   a n d   n o t   u s e d   f o r 
 m a t c h i n g   p u r p o s e s . 
 T h i s   d u a l - i n p u t   f e a t u r e   i s   u s e f u l   w h e n   w o r k i n g   w i t h   a   m a s t e r   C W E B   f i l e   t h a t   h a s   b e e n   r e c e i v e d   f r o m 
 e l s e w h e r e   ( e . g . ,   t a n g l e . w   o r   w e a v e . w   o r   t e x . w e b ) ,   w h e n   c h a n g e s   a r e   d e s i r a b l e   t o   c u s t o m i z e   t h e   p r o g r a m 
 f o r   y o u r   l o c a l   c o m p u t e r   s y s t e m .   Y o u   w i l l   b e   a b l e   t o   d e b u g   y o u r   s y s t e m - d e p e n d e n t   c h a n g e s   w i t h o u t 
 c l o b b e r i n g   t h e   m a s t e r   w e b   f i l e ;   a n d   o n c e   y o u r   c h a n g e s   a r e   w o r k i n g ,   y o u   w i l l   b e   a b l e   t o   i n c o r p o r a t e   t h e m 
 r e a d i l y   i n t o   n e w   r e l e a s e s   o f   t h e   m a s t e r   w e b   f i l e   t h a t   y o u   m i g h t   r e c e i v e   f r o m   t i m e   t o   t i m e . 
 @ i   [ w e b   f i l e   ]   F u r t h e r m o r e   t h e   w e b   f i l e   i t s e l f   c a n   b e   a   c o m b i n a t i o n   o f   s e v e r a l   f i l e s .   W h e n   e i t h e r   C W E A V E   o r 
 C T A N G L E   i s   r e a d i n g   a   f i l e   a n d   e n c o u n t e r s   t h e   c o n t r o l   c o d e   @ i   a t   t h e   b e g i n n i n g   o f   a   l i n e ,   i t   i n t e r r u p t s 
 n o r m a l   r e a d i n g   a n d   s t a r t s   l o o k i n g   a t   t h e   f i l e   n a m e d   a f t e r   t h e   @ i ,   m u c h   a s   t h e   C   p r e p r o c e s s o r   d o e s   w h e n 
 i t   e n c o u n t e r s   a n   # i n c l u d e   l i n e .   A f t e r   t h e   i n c l u d e d   f i l e   h a s   b e e n   e n t i r e l y   r e a d ,   t h e   p r o g r a m   g o e s   b a c k 
 t o   t h e   n e x t   l i n e   o f   t h e   o r i g i n a l   f i l e .   T h e   f i l e   n a m e   f o l l o w i n g   @ i   c a n   b e   s u r r o u n d e d   b y   "   c h a r a c t e r s ,   b u t 
 s u c h   d e l i m i t e r s   a r e   o p t i o n a l .   I n c l u d e   f i l e s   c a n   n e s t . 
 C h a n g e   f i l e s   c a n   h a v e   l i n e s   s t a r t i n g   w i t h   @ i .   I n   t h i s   w a y   y o u   c a n   r e p l a c e   o n e   i n c l u d e d   f i l e   w i t h 
 a n o t h e r .   C o n c e p t u a l l y ,   t h e   r e p l a c e m e n t   m e c h a n i s m   d e s c r i b e d   a b o v e   d o e s   i t s   w o r k   f i r s t ,   a n d   i t s   o u t p u t 
 i s   t h e n   c h e c k e d   f o r   @ i   l i n e s .   I f   @ i   f o o   o c c u r s   b e t w e e n   @ y   a n d   @ z   i n   a   c h a n g e   f i l e ,   i n d i v i d u a l   l i n e s   o f 
 f i l e   f o o   a n d   f i l e s   i t   i n c l u d e s   a r e   n o t   c h a n g e a b l e ;   b u t   c h a n g e s   c a n   b e   m a d e   t o   l i n e s   f r o m   f i l e s   t h a t   w e r e 
 i n c l u d e d   b y   u n c h a n g e d   i n p u t . 
 O n   U N I X   s y s t e m s   ( a n d   o t h e r s   t h a t   s u p p o r t   e n v i r o n m e n t   v a r i a b l e s ) ,   i f   t h e   e n v i r o n m e n t   v a r i a b l e 
 C W E B I N P U T S   i s   s e t ,   o r   i f   t h e   c o m p i l e r   f l a g   o f   t h e   s a m e   n a m e   w a s   d e f i n e d   a t   c o m p i l e   t i m e ,   C W E B   w i l l 
 l o o k   f o r   i n c l u d e   f i l e s   i n   t h e   d i r e c t o r y   t h u s   n a m e d ,   i f   i t   c a n n o t   f i n d   t h e m   i n   t h e   c u r r e n t   d i r e c t o r y . 
 A d d i t i o n a l   f e a t u r e s   a n d   c a v e a t s 
 1 .   I n   c e r t a i n   i n s t a l l a t i o n s   o f   C W E B   t h a t   h a v e   a n   e x t e n d e d   c h a r a c t e r   s e t ,   t h e   c h a r a c t e r s    ! ,    ! ,    ! ,    `" ,    d" , 
  e" ,    a" ,    (" ,    '" ,    " ,   a n d    "   c a n   b e   t y p e d   a s   a b b r e v i a t i o n s   f o r    + +  ,    "" ,    ">  ,    ! =  ,    < =  ,    > =  ,    = =  ,    | |    ,    & &  , 
  < <  ,   a n d    > >  ,   r e s p e c t i v e l y . 
 2 .   I f   y o u   h a v e   a n   e x t e n d e d   c h a r a c t e r   s e t ,   y o u   c a n   u s e   i t   w i t h   o n l y   m i n i m a l   r e s t r i c t i o n s ,   a s   d i s c u s s e d   u n d e r 
 t h e   r u l e s   f o r   @ l   a b o v e .   B u t   y o u   s h o u l d   s t i c k   t o   s t a n d a r d   A S C I I   c h a r a c t e r s   i f   y o u   w a n t   t o   w r i t e   p r o g r a m s 
 t h a t   w i l l   b e   u s e f u l   t o   a l l   t h e   p o o r   s o u l s   o u t   t h e r e   w h o   d o n  t   h a v e   e x t e n d e d   c h a r a c t e r   s e t s . 
 3 .   T h e   T E X   f i l e   o u t p u t   b y   C W E A V E   i s   b r o k e n   i n t o   l i n e s   h a v i n g   a t   m o s t   8 0   c h a r a c t e r s   e a c h .   W h e n   T E X   t e x t 
 i s   b e i n g   c o p i e d ,   t h e   e x i s t i n g   l i n e   b r e a k s   a r e   c o p i e d   a s   w e l l .   I f   y o u   a r e n  t   d o i n g   a n y t h i n g   t o o   t r i c k y ,   C W E A V E 
 1 0   C W E B   U S E R   M A N U A L   ( V E R S I O N   3 . 6 4 ) 
 w i l l   r e c o g n i z e   w h e n   a   T E X   c o m m e n t   i s   b e i n g   s p l i t   a c r o s s   t w o   o r   m o r e   l i n e s ,   a n d   i t   w i l l   a p p e n d    %    t o   t h e 
 b e g i n n i n g   o f   s u c h   c o n t i n u e d   c o m m e n t s . 
 4 .   C   t e x t   i s   t r a n s l a t e d   b y   a    b o t t o m   u p    p r o c e d u r e   t h a t   i d e n t i f i e s   e a c h   t o k e n   a s   a    p a r t   o f   s p e e c h    a n d 
 c o m b i n e s   p a r t s   o f   s p e e c h   i n t o   l a r g e r   a n d   l a r g e r   p h r a s e s   a s   m u c h   a s   p o s s i b l e   a c c o r d i n g   t o   a   s p e c i a l   g r a m m a r 
 t h a t   i s   e x p l a i n e d   i n   t h e   d o c u m e n t a t i o n   o f   C W E A V E .   I t   i s   e a s y   t o   l e a r n   t h e   t r a n s l a t i o n   s c h e m e   f o r   s i m p l e 
 c o n s t r u c t i o n s   l i k e   s i n g l e   i d e n t i f i e r s   a n d   s h o r t   e x p r e s s i o n s ,   j u s t   b y   l o o k i n g   a t   a   f e w   e x a m p l e s   o f   w h a t   C W E A V E 
 d o e s ,   b u t   t h e   g e n e r a l   m e c h a n i s m   i s   s o m e w h a t   c o m p l e x   b e c a u s e   i t   m u s t   h a n d l e   m u c h   m o r e   t h a n   C   i t s e l f . 
 F u r t h e r m o r e   t h e   o u t p u t   c o n t a i n s   e m b e d d e d   c o d e s   t h a t   c a u s e   T E X   t o   i n d e n t   a n d   b r e a k   l i n e s   a s   n e c e s s a r y , 
 d e p e n d i n g   o n   t h e   f o n t s   u s e d   a n d   t h e   d e s i r e d   p a g e   w i d t h .   F o r   b e s t   r e s u l t s   i t   i s   w i s e   t o   a v o i d   e n c l o s i n g   l o n g   C 
 t e x t s   i n   | . . . | ,   s i n c e   t h e   i n d e n t a t i o n   a n d   l i n e   b r e a k i n g   c o d e s   a r e   o m i t t e d   w h e n   t h e   | . . . |   t e x t   i s   t r a n s l a t e d 
 f r o m   C   t o   T E X .   S t i c k   t o   s i m p l e   e x p r e s s i o n s   o r   s t a t e m e n t s .   I f   a   C   p r e p r o c e s s o r   c o m m a n d   i s   e n c l o s e d   i n   | . . . | , 
 t h e   #   t h a t   i n t r o d u c e s   i t   m u s t   b e   a t   t h e   b e g i n n i n g   o f   a   l i n e ,   o r   C W E A V E   w o n  t   p r i n t   i t   c o r r e c t l y . 
 5 .   C o m m e n t s   a r e   n o t   p e r m i t t e d   i n   | . . . |   t e x t .   A f t e r   a    |    s i g n a l s   t h e   c h a n g e   f r o m   T E X   t e x t   t o   C   t e x t , 
 t h e   n e x t    |    t h a t   i s   n o t   p a r t   o f   a   s t r i n g   o r   c o n t r o l   t e x t   o r   s e c t i o n   n a m e   e n d s   t h e   C   t e x t . 
 6 .   A   c o m m e n t   m u s t   h a v e   p r o p e r l y   n e s t e d   o c c u r r e n c e s   o f   l e f t   a n d   r i g h t   b r a c e s ,   o t h e r w i s e   C W E A V E   w i l l 
 c o m p l a i n .   B u t   i t   d o e s   t r y   t o   b a l a n c e   t h e   b r a c e s ,   s o   t h a t   T E X   w o n  t   f o u l   u p   t o o   m u c h . 
 7 .   W h e n   y o u  r e   d e b u g g i n g   a   p r o g r a m   a n d   d e c i d e   t o   o m i t   s o m e   o f   y o u r   C   c o d e ,   d o   N O T   s i m p l y    c o m m e n t 
 i t   o u t .    S u c h   c o m m e n t s   a r e   n o t   i n   t h e   s p i r i t   o f   C W E B   d o c u m e n t a t i o n ;   t h e y   w i l l   a p p e a r   t o   r e a d e r s   a s   i f   t h e y 
 w e r e   e x p l a n a t i o n s   o f   t h e   u n c o m m e n t e d - o u t   i n s t r u c t i o n s .   F u r t h e r m o r e ,   c o m m e n t s   o f   a   p r o g r a m   m u s t   b e   v a l i d 
 T E X   t e x t ;   h e n c e   C W E A V E   w i l l   g e t   c o n f u s e d   i f   y o u   e n c l o s e   C   s t a t e m e n t s   i n   / * . . . * /   i n s t e a d   o f   i n   / * | . . . | * / .   I f 
 y o u   m u s t   c o m m e n t   o u t   C   c o d e ,   y o u   c a n   s u r r o u n d   i t   w i t h   p r e p r o c e s s o r   c o m m a n d s   l i k e   # i f   0 = = 1   a n d   # e n d i f . 
 8 .   T h e   @ f   f e a t u r e   a l l o w s   y o u   t o   d e f i n e   o n e   i d e n t i f i e r   t o   a c t   l i k e   a n o t h e r ,   a n d   t h e s e   f o r m a t   d e f i n i t i o n s   a r e 
 c a r r i e d   o u t   s e q u e n t i a l l y .   I n   g e n e r a l ,   a   g i v e n   i d e n t i f i e r   h a s   o n l y   o n e   p r i n t e d   f o r m a t   t h r o u g h o u t   t h e   e n t i r e 
 d o c u m e n t ,   a n d   t h i s   f o r m a t   i s   u s e d   e v e n   b e f o r e   t h e   @ f   t h a t   d e f i n e s   i t .   T h e   r e a s o n   i s   t h a t   C W E A V E   o p e r a t e s 
 i n   t w o   p a s s e s ;   i t   p r o c e s s e s   @ f  s   a n d   c r o s s - r e f e r e n c e s   o n   t h e   f i r s t   p a s s   a n d   i t   d o e s   t h e   o u t p u t   o n   t h e   s e c o n d . 
 ( H o w e v e r ,   i d e n t i f i e r s   t h a t   i m p l i c i t l y   g e t   a   b o l d f a c e   f o r m a t ,   t h a n k s   t o   a   t y p e d e f   d e c l a r a t i o n ,   d o n  t   o b e y   t h i s 
 r u l e ;   t h e y   a r e   p r i n t e d   d i f f e r e n t l y   b e f o r e   a n d   a f t e r   t h e   r e l e v a n t   t y p e d e f .   T h i s   i s   u n f o r t u n a t e ,   b u t   h a r d   t o   f i x . 
 Y o u   c a n   g e t   a r o u n d   t h e   r e s t r i c t i o n   b y   s a y i n g ,   s a y ,    @ s   f o o   i n t  ,   b e f o r e   o r   a f t e r   t h e   t y p e d e f . ) 
 9 .   S o m e t i m e s   i t   i s   d e s i r a b l e   t o   i n s e r t   s p a c i n g   i n t o   f o r m a t t e d   C   c o d e   t h a t   i s   m o r e   g e n e r a l   t h a n   t h e   t h i n 
 s p a c e   p r o v i d e d   b y    @ ,  .   T h e   @ t   f e a t u r e   c a n   b e   u s e d   f o r   t h i s   p u r p o s e ;   e . g . ,    @ t \ h s k i p   1 i n @ >    w i l l   l e a v e 
 o n e   i n c h   o f   b l a n k   s p a c e .   F u r t h e r m o r e ,    @ t \ 4 @ >    c a n   b e   u s e d   t o   b a c k s p a c e   b y   o n e   u n i t   o f   i n d e n t a t i o n ,   s i n c e 
 t h e   c o n t r o l   s e q u e n c e   \ 4   i s   d e f i n e d   i n   c w e b m a c   t o   b e   s u c h   a   b a c k s p a c e .   ( T h i s   c o n t r o l   s e q u e n c e   i s   u s e d ,   f o r 
 e x a m p l e ,   a t   t h e   b e g i n n i n g   o f   l i n e s   t h a t   c o n t a i n   l a b e l e d   s t a t e m e n t s ,   s o   t h a t   t h e   l a b e l   w i l l   s t i c k   o u t   a   l i t t l e   a t 
 t h e   l e f t . )   Y o u   c a n   a l s o   u s e    @ t } \ 3 { "5 @ >    t o   f o r c e   a   b r e a k   i n   t h e   m i d d l e   o f   a n   e x p r e s s i o n . 
 1 0 .   E a c h   i d e n t i f i e r   i n   C W E B   h a s   a   s i n g l e   f o r m a t t i n g   c o n v e n t i o n .   T h e r e f o r e   y o u   s h o u l d n  t   u s e   t h e   s a m e 
 i d e n t i f i e r   t o   d e n o t e ,   s a y ,   b o t h   a   t y p e   n a m e   a n d   p a r t   o f   a   s t r u c t ,   e v e n   t h o u g h   C   d o e s   a l l o w   t h i s . 
 R u n n i n g   t h e   p r o g r a m s 
 T h e   U N I X   c o m m a n d   l i n e   f o r   C T A N G L E   i s 
 c t a n g l e   [ o p t i o n s ]   w e b _ f i l e [ . w ]   [ { c h a n g e _ f i l e [ . c h ] | "}   [ o u t _ f i l e ] ] 
 a n d   t h e   s a m e   c o n v e n t i o n s   a p p l y   t o   C W E A V E .   I f    "   o r   n o   c h a n g e   f i l e   i s   s p e c i f i e d ,   t h e   c h a n g e   f i l e   i s   n u l l .   T h e 
 e x t e n s i o n s   . w   a n d   . c h   a r e   a p p e n d e d   o n l y   i f   t h e   g i v e n   f i l e   n a m e s   c o n t a i n   n o   d o t .   I f   t h e   w e b   f i l e   d e f i n e d   i n   t h i s 
 w a y   c a n n o t   b e   f o u n d ,   t h e   e x t e n s i o n   . w e b   w i l l   b e   t r i e d .   F o r   e x a m p l e ,    c w e a v e   c o b    w i l l   t r y   t o   r e a d   c o b . w ; 
 f a i l i n g   t h a t ,   i t   w i l l   t r y   c o b . w e b   b e f o r e   g i v i n g   u p .   I f   n o   o u t p u t   f i l e   n a m e   i s   s p e c i f i e d ,   t h e   n a m e   o f   t h e   C   f i l e 
 o u t p u t   b y   C T A N G L E   i s   o b t a i n e d   b y   a p p e n d i n g   t h e   e x t e n s i o n   . c ;   t h e   n a m e   o f   t h e   T E X   f i l e   o u t p u t   b y   C W E A V E 
 g e t s   t h e   e x t e n s i o n   . t e x .   I n d e x   f i l e s   o u t p u t   b y   C W E A V E   r e p l a c e   . t e x   b y   . i d x   a n d   . s c n . 
 P r o g r a m m e r s   w h o   l i k e   t e r s e n e s s   m i g h t   c h o o s e   t o   s e t   u p   t h e i r   o p e r a t i n g   s h e l l   s o   t h a t    w v    e x p a n d s   t o 
  c w e a v e   "b h p  ;   t h i s   w i l l   s u p p r e s s   m o s t   t e r m i n a l   o u t p u t   f r o m   C W E A V E   e x c e p t   f o r   e r r o r   m e s s a g e s . 
 O p t i o n s   a r e   i n t r o d u c e d   e i t h e r   b y   a   "  s i g n ,   t o   t u r n   a n   o p t i o n   o f f ,   o r   b y   a   +   s i g n   t o   t u r n   o n e   o n .   F o r   e x a m p l e , 
  "f b    t u r n s   o f f   o p t i o n s   f   a n d   b ;    + s    t u r n s   o n   o p t i o n   s .   O p t i o n s   c a n   b e   s p e c i f i e d   b e f o r e   t h e   f i l e   n a m e s ,   a f t e r 
 t h e   f i l e   n a m e s ,   o r   b o t h .   T h e   f o l l o w i n g   o p t i o n s   a r e   c u r r e n t l y   i m p l e m e n t e d : 
 b   P r i n t   a   b a n n e r   l i n e   a t   t h e   b e g i n n i n g   o f   e x e c u t i o n .   ( O n   b y   d e f a u l t . ) 
 e   E n c l o s e   C   m a t e r i a l   f o r m a t t e d   b y   C W E A V E   i n   b r a c k e t s   \ P B { . . . } ,   s o   t h a t   s p e c i a l   h o o k s   c a n   b e   u s e d .   ( O f f 
 b y   d e f a u l t ;   h a s   n o   e f f e c t   o n   C T A N G L E . ) 
 C W E B   U S E R   M A N U A L   ( V E R S I O N   3 . 6 4 )   1 1 
 f   F o r c e   l i n e   b r e a k s   a f t e r   e a c h   C   s t a t e m e n t   f o r m a t t e d   b y   C W E A V E .   ( O n   b y   d e f a u l t ;   "f   s a v e s   p a p e r   b u t   l o o k s 
 l e s s   C - l i k e   t o   s o m e   p e o p l e . )   ( H a s   n o   e f f e c t   o n   C T A N G L E . ) 
 h   P r i n t   a   h a p p y   m e s s a g e   a t   t h e   c o n c l u s i o n   o f   a   s u c c e s s f u l   r u n .   ( O n   b y   d e f a u l t . ) 
 p   G i v e   p r o g r e s s   r e p o r t s   a s   t h e   p r o g r a m   r u n s .   ( O n   b y   d e f a u l t . ) 
 s   S h o w   s t a t i s t i c s   a b o u t   m e m o r y   u s a g e   a f t e r   t h e   p r o g r a m   r u n s   t o   c o m p l e t i o n .   ( O f f   b y   d e f a u l t . )   I f   y o u   h a v e 
 l a r g e   C W E B   f i l e s   o r   s e c t i o n s ,   y o u   m a y   n e e d   t o   s e e   h o w   c l o s e   y o u   c o m e   t o   e x c e e d i n g   t h e   c a p a c i t y   o f   C T A N G L E 
 a n d / o r   C W E A V E . 
 x   I n c l u d e   i n d e x e s   a n d   a   t a b l e   o f   c o n t e n t s   i n   t h e   T E X   f i l e   o u t p u t   b y   C W E A V E .   ( O n   b y   d e f a u l t . )   ( H a s   n o   e f f e c t 
 o n   C T A N G L E . ) 
 F u r t h e r   d e t a i l s   a b o u t   f o r m a t t i n g 
 Y o u   m a y   n o t   l i k e   t h e   w a y   C W E A V E   h a n d l e s   c e r t a i n   s i t u a t i o n s .   I f   y o u  r e   d e s p e r a t e ,   y o u   c a n   c u s t o m i z e   C W E A V E 
 b y   c h a n g i n g   i t s   g r a m m a r .   T h i s   m e a n s   c h a n g i n g   t h e   s o u r c e   c o d e ,   a   t a s k   t h a t   y o u   m i g h t   f i n d   a m u s i n g .   A 
 t a b l e   o f   g r a m m a r   r u l e s   a p p e a r s   i n   t h e   C W E A V E   s o u r c e   l i s t i n g ,   a n d   y o u   c a n   m a k e   a   s e p a r a t e   c o p y   o f   t h a t   t a b l e 
 b y   c o p y i n g   t h e   f i l e   p r o d . w   f o u n d   i n   t h e   C W E B   s o u r c e s   a n d   s a y i n g    c w e a v e   "x   p r o d  ,   f o l l o w e d   b y    t e x   p r o d  . 
 Y o u   c a n   s e e   e x a c t l y   h o w   C W E A V E   i s   p a r s i n g   y o u r   C   c o d e   b y   p r e c e d i n g   i t   w i t h   t h e   l i n e    @   @ c   @ 2  .   ( T h e 
 c o n t r o l   c o d e    @ 2    t u r n s   o n   a    p e e p i n g    m o d e ,   a n d    @ 0    t u r n s   i t   o f f . )   F o r   e x a m p l e ,   i f   y o u   r u n   C W E A V E   o n   t h e 
 f i l e 
 @   @ c   @ 2 
 m a i n   ( a r g c , a r g v ) 
 c h a r   * * a r g v ; 
 {   f o r   ( ; a r g c > 0 ; a r g c - - )   p r i n t f ( " % s \ n " , a r g v [ a r g c - 1 ] ) ;   } 
 y o u   g e t   t h e   f o l l o w i n g   g i b b e r i s h   o n   y o u r   s c r e e n : 
 [ . . . ] 
 4 : * e x p   (   + e x p +   ) . . . 
 1 1 : * e x p   + e x p +   i n t . . . 
 5 : * + e x p +   i n t   + u n o r b i n o p + . . . 
 [ . . . ] 
 6 0 :   + f n _ d e c l + * + { +   - s t m t -   + } - 
 5 5 : * + f n _ d e c l +   - s t m t - 
 5 2 : * + f u n c t i o n - 
 [ . . . ] 
 T h e   f i r s t   l i n e   s a y s   t h a t   g r a m m a r   r u l e   4   h a s   j u s t   b e e n   a p p l i e d ,   a n d   C W E A V E   c u r r e n t l y   h a s   i n   i t s   m e m o r y   a 
 s e q u e n c e   o f   c h u n k s   o f   T E X   c o d e   ( c a l l e d    s c r a p s  )   t h a t   a r e   r e s p e c t i v e l y   o f   t y p e   e x p   ( f o r   e x p r e s s i o n ) ,   o p e n - 
 p a r e n t h e s i s ,   e x p   a g a i n ,   c l o s e - p a r e n t h e s i s ,   a n d   f u r t h e r   s c r a p s   t h a t   h a v e n  t   y e t   b e e n   c o n s i d e r e d   b y   t h e   p a r s e r . 
 ( T h e   +   a n d   "  s i g n s   s t i p u l a t e   t h a t   T E X   s h o u l d   b e   i n   o r   o u t   o f   m a t h   m o d e   a t   t h e   s c r a p   b o u n d a r i e s .   T h e   * 
 s h o w s   t h e   p a r s e r  s   c u r r e n t   p o s i t i o n . )   T h e n   r u l e   1 1   i s   a p p l i e d ,   a n d   t h e   s e q u e n c e   (   e x p   )   b e c o m e s   a n   e x p   a n d 
 s o   o n .   I n   t h e   e n d   t h e   w h o l e   C   t e x t   h a s   b e c o m e   o n e   b i g   s c r a p   o f   t y p e   f u n c t i o n   . 
 S o m e t i m e s   t h i n g s   d o n  t   w o r k   a s   s m o o t h l y ,   a n d   y o u   g e t   a   b u n c h   o f   l i n e s   l u m p e d   t o g e t h e r .   T h i s   m e a n s   t h a t 
 C W E A V E   c o u l d   n o t   d i g e s t   s o m e t h i n g   i n   y o u r   C   c o d e .   F o r   i n s t a n c e ,   s u p p o s e    @ < A r g u m e n t   d e f i n i t i o n s @ >  
 h a d   a p p e a r e d   i n s t e a d   o f    c h a r   * * a r g v ;    i n   t h e   p r o g r a m   a b o v e .   T h e n   C W E A V E   w o u l d   h a v e   b e e n   s o m e w h a t 
 m y s t i f i e d ,   s i n c e   i t   t h i n k s   t h a t   s e c t i o n   n a m e s   a r e   j u s t   e x p s .   T h u s   i t   w o u l d   t e l l   T E X   t o   f o r m a t    0A r g u m e n t 
 d e c l a r a t i o n s   2   	0   o n   t h e   s a m e   l i n e   a s    m a i n   ( a r g c   ,   a r g v   )  .   I n   t h i s   c a s e   y o u   s h o u l d   h e l p   C W E A V E   b y   p u t t i n g    @ /  
 a f t e r    m a i n ( a r g c , a r g v )  . 
 C W E A V E   a u t o m a t i c a l l y   i n s e r t s   a   b i t   o f   e x t r a   s p a c e   b e t w e e n   d e c l a r a t i o n s   a n d   t h e   f i r s t   a p p a r e n t   s t a t e m e n t 
 o f   a   b l o c k .   O n e   w a y   t o   d e f e a t   t h i s   s p a c i n g   l o c a l l y   i s 
 i n t   x ; @ + @ t } \ 6 { @ > 
 @ < O t h e r   l o c a l s @ > @ ; @ # 
 t h e    @ #    w i l l   p u t   e x t r a   s p a c e   a f t e r    0O t h e r   l o c a l s   	0 . 
 1 2   C W E B   U S E R   M A N U A L   ( V E R S I O N   3 . 6 4 ) 
 H y p e r t e x t   a n d   h y p e r d o c u m e n t a t i o n 
 M a n y   p e o p l e   h a v e   o f   c o u r s e   n o t i c e d   a n a l o g i e s   b e t w e e n   C W E B   a n d   t h e   W o r l d   W i d e   W e b .   T h e   C W E B   m a c r o s   a r e 
 i n   f a c t   s e t   u p   s o   t h a t   t h e   o u t p u t   o f   C W E A V E   c a n   b e   c o n v e r t e d   e a s i l y   i n t o   P o r t a b l e   D o c u m e n t   F o r m a t ,   w i t h 
 c l i c k a b l e   h y p e r l i n k s   t h a t   c a n   b e   r e a d   w i t h   A d o b e  s   A c r o b a t   R e a d e r ,   u s i n g   a   w i d e l y   a v a i l a b l e   o p e n - s o u r c e 
 p r o g r a m   c a l l e d   d v i p d f m   d e v e l o p e d   b y   M a r k   A .   W i c k s .   A f t e r   u s i n g   C W E A V E   t o   c o n v e r t   c o b . w   i n t o   c o b . t e x , 
 y o u   c a n   p r e p a r e   a n d   v i e w   a   h y p e r t e x t   v e r s i o n   o f   t h e   p r o g r a m   b y   g i v i n g   t h e   c o m m a n d s 
 t e x   " \ l e t \ p d f +   \ i n p u t   c o b " 
 d v i p d f m   c o b 
 a c r o r e a d   c o b . p d f 
 i n s t e a d   o f   i n v o k i n g   T E X   i n   t h e   n o r m a l   w a y .   ( T h a n k s   t o   H a n s   H a g e n ,   C e s a r   A u g u s t o   R o r a t o   C r u s i u s ,   a n d 
 J u l i a n   G i l b e y   f o r   t h e   m a c r o s   t h a t   m a k e   t h i s   w o r k . )   A l t e r n a t i v e l y ,   t h a n k s   t o   H a  n   T h e   T h a  n h   a n d   A n d r e a s 
 S c h e r e r ,   y o u   c a n   g e n e r a t e   c o b . p d f   i n   o n e   s t e p   b y   s i m p l y   s a y i n g    p d f t e x   c o b  . 
 A   m o r e   e l a b o r a t e   s y s t e m   c a l l e d   C T W I L L ,   w h i c h   e x t e n d s   t h e   u s u a l   c r o s s   r e f e r e n c e s   o f   C W E A V E   b y   p r e p a r i n g 
 l i n k s   f r o m   t h e   u s e s   o f   i d e n t i f i e r s   t o   t h e i r   d e f i n i t i o n s ,   i s   a l s o   a v a i l a b l e  p r o v i d e d   t h a t   y o u   a r e   w i l l i n g   t o   w o r k   a 
 b i t   h a r d e r   i n   c a s e s   w h e r e   a n   i d e n t i f i e r   i s   m u l t i p l y   d e f i n e d .   C T W I L L   i s   i n t e n d e d   p r i m a r i l y   f o r   h a r d c o p y   o u t p u t , 
 b u t   i t s   p r i n c i p l e s   c o u l d   b e   u s e d   f o r   h y p e r t e x t   a s   w e l l .   S e e   C h a p t e r   1 1   o f   D i g i t a l   T y p o g r a p h y   b y   D .   E .   K n u t h 
 ( 1 9 9 9 ) ,   a n d   t h e   p r o g r a m   s o u r c e s   a t   f t p : / / l a b r e a . s t a n f o r d . e d u / p u b / c t w i l l . 
 A p p e n d i c e s 
 A s   a n   e x a m p l e   o f   a   r e a l   p r o g r a m   w r i t t e n   i n   C W E B ,   A p p e n d i x   A   c o n t a i n s   a n   e x c e r p t   f r o m   t h e   C W E B   p r o g r a m 
 i t s e l f .   T h e   r e a d e r   w h o   e x a m i n e s   t h e   l i s t i n g s   i n   t h i s   a p p e n d i x   c a r e f u l l y   w i l l   g e t   a   g o o d   f e e l i n g   f o r   t h e   b a s i c 
 i d e a s   o f   C W E B . 
 A p p e n d i x   B   i s   t h e   f i l e   t h a t   s e t s   T E X   u p   t o   a c c e p t   t h e   o u t p u t   o f   C W E A V E ,   a n d   A p p e n d i x   C   d i s c u s s e s   h o w 
 t o   u s e   s o m e   o f   t h o s e   m a c r o s   t o   v a r y   t h e   o u t p u t   f o r m a t s . 
 A    l o n g    v e r s i o n   o f   t h i s   m a n u a l ,   w h i c h   c a n   b e   p r o d u c e d   f r o m   t h e   C W E B   s o u r c e s   v i a   t h e   U N I X   c o m m a n d 
 m a k e   f u l l m a n u a l ,   a l s o   c o n t a i n s   a p p e n d i c e s   D ,   E ,   a n d   F ,   w h i c h   e x h i b i t   t h e   c o m p l e t e   s o u r c e   c o d e   f o r   C T A N G L E 
 a n d   C W E A V E . 
 A p p e n d i x   A :   E x c e r p t s   f r o m   a   C W E B   P r o g r a m 
 T h i s   a p p e n d i x   c o n s i s t s   o f   f o u r   l i s t i n g s .   T h e   f i r s t   s h o w s   t h e   C W E B   i n p u t   t h a t   g e n e r a t e d   s e c t i o n s   1 2  1 5   o f   t h e 
 f i l e   c o m m o n . w ,   w h i c h   c o n t a i n s   r o u t i n e s   c o m m o n   t o   C W E A V E   a n d   C T A N G L E .   N o t e   t h a t   s o m e   o f   t h e   l i n e s   a r e 
 i n d e n t e d   t o   s h o w   t h e   p r o g r a m   s t r u c t u r e ;   t h e   i n d e n t a t i o n   i s   i g n o r e d   b y   C W E A V E   a n d   C T A N G L E ,   b u t   u s e r s   f i n d 
 t h a t   C W E B   f i l e s   a r e   q u i t e   r e a d a b l e   i f   t h e y   h a v e   s o m e   s u c h   i n d e n t a t i o n . 
 T h e   s e c o n d   a n d   t h i r d   l i s t i n g s   s h o w   c o r r e s p o n d i n g   p a r t s   o f   t h e   C   c o d e   o u t p u t   b y   C T A N G L E   a n d   o f   t h e 
 c o r r e s p o n d i n g   T E X   c o d e   o u t p u t   b y   C W E A V E ,   w h e n   r u n   o n   c o m m o n . w .   T h e   f o u r t h   l i s t i n g   s h o w s   h o w   t h a t 
 o u t p u t   l o o k s   w h e n   p r i n t e d   o u t . 
 @   P r o c e d u r e   | p r i m e _ t h e _ c h a n g e _ b u f f e r | 
 s e t s   | c h a n g e _ b u f f e r |   i n   p r e p a r a t i o n   f o r   t h e   n e x t   m a t c h i n g   o p e r a t i o n . 
 S i n c e   b l a n k   l i n e s   i n   t h e   c h a n g e   f i l e   a r e   n o t   u s e d   f o r   m a t c h i n g ,   w e   h a v e 
 | ( c h a n g e _ l i m i t = = c h a n g e _ b u f f e r   & &   ! c h a n g i n g ) |   i f   a n d   o n l y   i f 
 t h e   c h a n g e   f i l e   i s   e x h a u s t e d .   T h i s   p r o c e d u r e   i s   c a l l e d   o n l y   w h e n 
 | c h a n g i n g |   i s   1 ;   h e n c e   e r r o r   m e s s a g e s   w i l l   b e   r e p o r t e d   c o r r e c t l y . 
 @ c 
 v o i d 
 p r i m e _ t h e _ c h a n g e _ b u f f e r ( ) 
 { 
 c h a n g e _ l i m i t = c h a n g e _ b u f f e r ;   / *   t h i s   v a l u e   i s   u s e d   i f   t h e   c h a n g e   f i l e   e n d s   * / 
 @ < S k i p   o v e r   c o m m e n t   l i n e s   i n   t h e   c h a n g e   f i l e ;   | r e t u r n |   i f   e n d   o f   f i l e @ > ; 
 @ < S k i p   t o   t h e   n e x t   n o n b l a n k   l i n e ;   | r e t u r n |   i f   e n d   o f   f i l e @ > ; 
 @ < M o v e   | b u f f e r |   a n d   | l i m i t |   t o   | c h a n g e _ b u f f e r |   a n d   | c h a n g e _ l i m i t | @ > ; 
 } 
 @   W h i l e   l o o k i n g   f o r   a   l i n e   t h a t   b e g i n s   w i t h   \ . { @ @ x }   i n   t h e   c h a n g e   f i l e ,   w e 
 a l l o w   l i n e s   t h a t   b e g i n   w i t h   \ . { @ @ } ,   a s   l o n g   a s   t h e y   d o n  t   b e g i n   w i t h   \ . { @ @ y } , 
 \ . { @ @ z } ,   o r   \ . { @ @ i }   ( w h i c h   w o u l d   p r o b a b l y   m e a n   t h a t   t h e   c h a n g e   f i l e   i s   f o u l e d   u p ) . 
 @ < S k i p   o v e r   c o m m e n t   l i n e s   i n   t h e   c h a n g e   f i l e . . . @ > = 
 w h i l e ( 1 )   { 
 c h a n g e _ l i n e + + ; 
 i f   ( ! i n p u t _ l n ( c h a n g e _ f i l e ) )   r e t u r n ; 
 i f   ( l i m i t < b u f f e r + 2 )   c o n t i n u e ; 
 i f   ( b u f f e r [ 0 ] ! =  @ @  )   c o n t i n u e ; 
 i f   ( x i s u p p e r ( b u f f e r [ 1 ] ) )   b u f f e r [ 1 ] = t o l o w e r ( b u f f e r [ 1 ] ) ; 
 i f   ( b u f f e r [ 1 ] = =  x  )   b r e a k ; 
 i f   ( b u f f e r [ 1 ] = =  y    | |   b u f f e r [ 1 ] = =  z    | |   b u f f e r [ 1 ] = =  i  )   { 
 l o c = b u f f e r + 2 ; 
 e r r _ p r i n t ( " !   M i s s i n g   @ @ x   i n   c h a n g e   f i l e " ) ; 
 @ . M i s s i n g   @ @ x . . . @ > 
 } 
 } 
 @   H e r e   w e   a r e   l o o k i n g   a t   l i n e s   f o l l o w i n g   t h e   \ . { @ @ x } . 
 @ < S k i p   t o   t h e   n e x t   n o n b l a n k   l i n e . . . @ > = 
 d o   { 
 c h a n g e _ l i n e + + ; 
 i f   ( ! i n p u t _ l n ( c h a n g e _ f i l e ) )   { 
 e r r _ p r i n t ( " !   C h a n g e   f i l e   e n d e d   a f t e r   @ @ x " ) ; 
 @ . C h a n g e   f i l e   e n d e d . . . @ > 
 r e t u r n ; 
 } 
 }   w h i l e   ( l i m i t = = b u f f e r ) ; 
 @   @ < M o v e   | b u f f e r |   a n d   | l i m i t |   t o   | c h a n g e _ b u f f e r |   a n d   | c h a n g e _ l i m i t | @ > = 
 { 
 c h a n g e _ l i m i t = c h a n g e _ b u f f e r - b u f f e r + l i m i t ; 
 s t r n c p y ( c h a n g e _ b u f f e r , b u f f e r , l i m i t - b u f f e r + 1 ) ; 
 } 
 1 4   A P P E N D I X   A      T R A N S L A T I O N   B Y   C T A N G L E 
 H e r e  s   t h e   p o r t i o n   o f   t h e   C   c o d e   g e n e r a t e d   b y   C T A N G L E   t h a t   c o r r e s p o n d s   t o   t h e   s o u r c e   o n   t h e   p r e c e d i n g 
 p a g e .   N o t i c e   t h a t   s e c t i o n s   1 3 ,   1 4   a n d   1 5   h a v e   b e e n   t a n g l e d   i n t o   s e c t i o n   1 2 . 
 / * : 9 * / / * 1 2 : * / 
 # l i n e   2 4 7   " c o m m o n . w " 
 v o i d 
 p r i m e _ t h e _ c h a n g e _ b u f f e r ( ) 
 { 
 c h a n g e _ l i m i t =   c h a n g e _ b u f f e r ; 
 / * 1 3 : * / 
 # l i n e   2 6 1   " c o m m o n . w " 
 w h i l e ( 1 ) { 
 c h a n g e _ l i n e + + ; 
 i f ( ! i n p u t _ l n ( c h a n g e _ f i l e ) ) r e t u r n ; 
 i f ( l i m i t < b u f f e r + 2 ) c o n t i n u e ; 
 i f ( b u f f e r [ 0 ] ! =  @  ) c o n t i n u e ; 
 i f ( x i s u p p e r ( b u f f e r [ 1 ] ) ) b u f f e r [ 1 ] =   t o l o w e r ( b u f f e r [ 1 ] ) ; 
 i f ( b u f f e r [ 1 ] = =  x  ) b r e a k ; 
 i f ( b u f f e r [ 1 ] = =  y  | | b u f f e r [ 1 ] = =  z  | | b u f f e r [ 1 ] = =  i  ) { 
 l o c =   b u f f e r + 2 ; 
 e r r _ p r i n t ( " !   M i s s i n g   @ x   i n   c h a n g e   f i l e " ) ; 
 } 
 } 
 / * : 1 3 * / 
 # l i n e   2 5 2   " c o m m o n . w " 
 ; 
 / * 1 4 : * / 
 # l i n e   2 7 8   " c o m m o n . w " 
 d o { 
 c h a n g e _ l i n e + + ; 
 i f ( ! i n p u t _ l n ( c h a n g e _ f i l e ) ) { 
 e r r _ p r i n t ( " !   C h a n g e   f i l e   e n d e d   a f t e r   @ x " ) ; 
 r e t u r n ; 
 } 
 } w h i l e ( l i m i t = = b u f f e r ) ; 
 / * : 1 4 * / 
 # l i n e   2 5 3   " c o m m o n . w " 
 ; 
 / * 1 5 : * / 
 # l i n e   2 8 8   " c o m m o n . w " 
 { 
 c h a n g e _ l i m i t =   c h a n g e _ b u f f e r - b u f f e r + l i m i t ; 
 s t r n c p y ( c h a n g e _ b u f f e r , b u f f e r , l i m i t - b u f f e r + 1 ) ; 
 } 
 / * : 1 5 * / 
 # l i n e   2 5 4   " c o m m o n . w " 
 ; 
 } 
 / * : 1 2 * / / * 1 6 : * / 
 A P P E N D I X   A      T R A N S L A T I O N   B Y   C W E A V E   1 5 
 H e r e   i s   t h e   c o r r e s p o n d i n g   e x c e r p t   f r o m   c o m m o n . t e x . 
 \ M { 1 2 } P r o c e d u r e   \ P B { \ \ { p r i m e \ _ t h e \ _ c h a n g e \ _ b u f f e r } } 
 s e t s   \ P B { \ \ { c h a n g e \ _ b u f f e r } }   i n   p r e p a r a t i o n   f o r   t h e   n e x t   m a t c h i n g   o p e r a t i o n . 
 S i n c e   b l a n k   l i n e s   i n   t h e   c h a n g e   f i l e   a r e   n o t   u s e d   f o r   m a t c h i n g ,   w e   h a v e 
 \ P B { $ ( \ \ { c h a n g e \ _ l i m i t } \ E \ \ { c h a n g e \ _ b u f f e r } \ W \ R \ \ { c h a n g i n g } ) $ }   i f   a n d   o n l y   i f 
 t h e   c h a n g e   f i l e   i s   e x h a u s t e d .   T h i s   p r o c e d u r e   i s   c a l l e d   o n l y   w h e n 
 \ P B { \ \ { c h a n g i n g } }   i s   1 ;   h e n c e   e r r o r   m e s s a g e s   w i l l   b e   r e p o r t e d   c o r r e c t l y . 
 \ Y \ B \ & { v o i d }   \ \ { p r i m e \ _ t h e \ _ c h a n g e \ _ b u f f e r } ( \ , ) \ 1 \ 1 \ 2 \ 2 \ 6 
 $ { } \ { { } $ \ 1 \ 6 
 $ { } \ \ { c h a n g e \ _ l i m i t } \ K \ \ { c h a n g e \ _ b u f f e r } { } $ ; \ C {   t h i s   v a l u e   i s   u s e d   i f   t h e 
 c h a n g e   f i l e   e n d s   } \ 6 
 \ X 1 3 : S k i p   o v e r   c o m m e n t   l i n e s   i n   t h e   c h a n g e   f i l e ;   \ P B { \ & { r e t u r n } }   i f   e n d   o f   f i l e % 
 \ X ; \ 6 
 \ X 1 4 : S k i p   t o   t h e   n e x t   n o n b l a n k   l i n e ;   \ P B { \ & { r e t u r n } }   i f   e n d   o f   f i l e \ X ; \ 6 
 \ X 1 5 : M o v e   \ P B { \ \ { b u f f e r } }   a n d   \ P B { \ \ { l i m i t } }   t o   \ P B { \ \ { c h a n g e \ _ b u f f e r } }   a n d   % 
 \ P B { \ \ { c h a n g e \ _ l i m i t } } \ X ; \ 6 
 \ 4 $ { } \ } { } $ \ 2 \ p a r 
 \ f i 
 \ M { 1 3 } W h i l e   l o o k i n g   f o r   a   l i n e   t h a t   b e g i n s   w i t h   \ . { @ x }   i n   t h e   c h a n g e   f i l e ,   w e 
 a l l o w   l i n e s   t h a t   b e g i n   w i t h   \ . { @ } ,   a s   l o n g   a s   t h e y   d o n  t   b e g i n   w i t h   \ . { @ y } , 
 \ . { @ z } ,   o r   \ . { @ i }   ( w h i c h   w o u l d   p r o b a b l y   m e a n   t h a t   t h e   c h a n g e   f i l e   i s   f o u l e d 
 u p ) . 
 \ Y \ B \ 4 \ X 1 3 : S k i p   o v e r   c o m m e n t   l i n e s   i n   t h e   c h a n g e   f i l e ;   \ P B { \ & { r e t u r n } }   i f   e n d 
 o f   f i l e \ X $ { } \ E { } $ \ 6 
 \ & { w h i l e }   ( \ T { 1 } ) \ 5 
 $ { } \ { { } $ \ 1 \ 6 
 $ { } \ \ { c h a n g e \ _ l i n e } \ P P ; { } $ \ 6 
 \ & { i f }   $ { } ( \ R \ \ { i n p u t \ _ l n } ( \ \ { c h a n g e \ _ f i l e } ) ) { } $ \ 1 \ 5 
 \ & { r e t u r n } ; \ 2 \ 6 
 \ & { i f }   $ { } ( \ \ { l i m i t } < \ \ { b u f f e r } + \ T { 2 } ) { } $ \ 1 \ 5 
 \ & { c o n t i n u e } ; \ 2 \ 6 
 \ & { i f }   $ { } ( \ \ { b u f f e r } [ \ T { 0 } ] \ I \ . {  @  } ) { } $ \ 1 \ 5 
 \ & { c o n t i n u e } ; \ 2 \ 6 
 \ & { i f }   ( \ \ { x i s u p p e r } ( \ \ { b u f f e r } [ \ T { 1 } ] ) ) \ 1 \ 5 
 $ { } \ \ { b u f f e r } [ \ T { 1 } ] \ K \ \ { t o l o w e r } ( \ \ { b u f f e r } [ \ T { 1 } ] ) ; { } $ \ 2 \ 6 
 \ & { i f }   $ { } ( \ \ { b u f f e r } [ \ T { 1 } ] \ E \ . {  x  } ) { } $ \ 1 \ 5 
 \ & { b r e a k } ; \ 2 \ 6 
 \ & { i f }   $ { } ( \ \ { b u f f e r } [ \ T { 1 } ] \ E \ . {  y  } \ V \ \ { b u f f e r } [ \ T { 1 } ] \ E \ . {  z  } \ V \ \ { b u f f e r } [ % 
 \ T { 1 } ] \ E \ . {  i  } ) { } $ \ 5 
 $ { } \ { { } $ \ 1 \ 6 
 $ { } \ \ { l o c } \ K \ \ { b u f f e r } + \ T { 2 } ; { } $ \ 6 
 \ \ { e r r \ _ p r i n t } ( \ . { " ! \   M i s s i n g \   @ x \   i n \   c h a } \ ) \ . { n g e \   f i l e " } ) ; \ 6 
 \ 4 $ { } \ } { } $ \ 2 \ 6 
 \ 4 $ { } \ } { } $ \ 2 \ p a r 
 \ U 1 2 . \ f i 
 \ M { 1 4 } H e r e   w e   a r e   l o o k i n g   a t   l i n e s   f o l l o w i n g   t h e   \ . { @ x } . 
 \ Y \ B \ 4 \ X 1 4 : S k i p   t o   t h e   n e x t   n o n b l a n k   l i n e ;   \ P B { \ & { r e t u r n } }   i f   e n d   o f   f i l e \ X $ { } % 
 \ E { } $ \ 6 
 \ & { d o } \ 5 
 $ { } \ { { } $ \ 1 \ 6 
 $ { } \ \ { c h a n g e \ _ l i n e } \ P P ; { } $ \ 6 
 \ & { i f }   $ { } ( \ R \ \ { i n p u t \ _ l n } ( \ \ { c h a n g e \ _ f i l e } ) ) { } $ \ 5 
 $ { } \ { { } $ \ 1 \ 6 
 \ \ { e r r \ _ p r i n t } ( \ . { " ! \   C h a n g e \   f i l e \   e n d e d } \ ) \ . { \   a f t e r \   @ x " } ) ; \ 6 
 \ & { r e t u r n } ; \ 6 
 \ 4 $ { } \ } { } $ \ 2 \ 6 
 \ 4 $ { } \ } { } $ \ 2 \ 5 
 \ & { w h i l e }   $ { } ( \ \ { l i m i t } \ E \ \ { b u f f e r } ) { } $ ; \ p a r 
 \ U 1 2 . \ f i 
 \ M { 1 5 } \ B \ X 1 5 : M o v e   \ P B { \ \ { b u f f e r } }   a n d   \ P B { \ \ { l i m i t } }   t o   \ P B { \ \ { c h a n g e \ _ b u f f e r } } 
 a n d   \ P B { \ \ { c h a n g e \ _ l i m i t } } \ X $ { } \ E { } $ \ 6 
 $ { } \ { { } $ \ 1 \ 6 
 $ { } \ \ { c h a n g e \ _ l i m i t } \ K \ \ { c h a n g e \ _ b u f f e r } - \ \ { b u f f e r } + \ \ { l i m i t } ; { } $ \ 6 
 $ { } \ \ { s t r n c p y } ( \ \ { c h a n g e \ _ b u f f e r } , \ 3 9 \ \ { b u f f e r } , \ 3 9 \ \ { l i m i t } - \ \ { b u f f e r } + % 
 \ T { 1 } ) ; { } $ \ 6 
 \ 4 $ { } \ } { } $ \ 2 \ p a r 
 \ U s 1 2 \ E T 1 6 . \ f i 
 1 6   A P P E N D I X   A      F I N A L   D O C U M E N T 
 A n d   h e r e  s   w h a t   t h e   s a m e   e x c e r p t   l o o k s   l i k e   w h e n   t y p e s e t . 
 1 2 .   P r o c e d u r e   p r i m e   t h e   c h a n g e   b u f f e r   s e t s   c h a n g e   b u f f e r   i n   p r e p a r a t i o n   f o r   t h e   n e x t   m a t c h i n g   o p e r a t i o n . 
 S i n c e   b l a n k   l i n e s   i n   t h e   c h a n g e   f i l e   a r e   n o t   u s e d   f o r   m a t c h i n g ,   w e   h a v e   ( c h a n g e   l i m i t   a"  c h a n g e   b u f f e r   '"
  c h a n g i n g   )   i f   a n d   o n l y   i f   t h e   c h a n g e   f i l e   i s   e x h a u s t e d .   T h i s   p r o c e d u r e   i s   c a l l e d   o n l y   w h e n   c h a n g i n g   i s   1 ; 
 h e n c e   e r r o r   m e s s a g e s   w i l l   b e   r e p o r t e d   c o r r e c t l y . 
 v o i d   p r i m e   t h e   c h a n g e   b u f f e r   (   ) 
 { 
 c h a n g e   l i m i t   =   c h a n g e   b u f f e r   ;   / "  t h i s   v a l u e   i s   u s e d   i f   t h e   c h a n g e   f i l e   e n d s   "/ 
 0S k i p   o v e r   c o m m e n t   l i n e s   i n   t h e   c h a n g e   f i l e ;   r e t u r n   i f   e n d   o f   f i l e   1 3   	0; 
 0S k i p   t o   t h e   n e x t   n o n b l a n k   l i n e ;   r e t u r n   i f   e n d   o f   f i l e   1 4   	0; 
 0M o v e   b u f f e r   a n d   l i m i t   t o   c h a n g e   b u f f e r   a n d   c h a n g e   l i m i t   1 5   	0; 
 } 
 1 3 .   W h i l e   l o o k i n g   f o r   a   l i n e   t h a t   b e g i n s   w i t h   @ x   i n   t h e   c h a n g e   f i l e ,   w e   a l l o w   l i n e s   t h a t   b e g i n   w i t h   @ ,   a s 
 l o n g   a s   t h e y   d o n  t   b e g i n   w i t h   @ y ,   @ z ,   o r   @ i   ( w h i c h   w o u l d   p r o b a b l y   m e a n   t h a t   t h e   c h a n g e   f i l e   i s   f o u l e d   u p ) . 
 0S k i p   o v e r   c o m m e n t   l i n e s   i n   t h e   c h a n g e   f i l e ;   r e t u r n   i f   e n d   o f   f i l e   1 3   	0  a"
 w h i l e   ( 1 )   { 
 c h a n g e   l i n e + + ; 
 i f   (  i n p u t   l n   ( c h a n g e   f i l e   ) )   r e t u r n ; 
 i f   ( l i m i t   <   b u f f e r   +   2 )   c o n t i n u e ; 
 i f   ( b u f f e r   [ 0 ]   6 =    @  )   c o n t i n u e ; 
 i f   ( x i s u p p e r   ( b u f f e r   [ 1 ] ) )   b u f f e r   [ 1 ]   =   t o l o w e r   ( b u f f e r   [ 1 ] ) ; 
 i f   ( b u f f e r   [ 1 ]   a"   x  )   b r e a k ; 
 i f   ( b u f f e r   [ 1 ]   a"   y    ("  b u f f e r   [ 1 ]   a"   z    ("  b u f f e r   [ 1 ]   a"   i  )   { 
 l o c   =   b u f f e r   +   2 ; 
 e r r   p r i n t   ( " !   M i s s i n g   @ x   i n   c h a n g e   f i l e " ) ; 
 } 
 } 
 T h i s   c o d e   i s   u s e d   i n   s e c t i o n   1 2 . 
 1 4 .   H e r e   w e   a r e   l o o k i n g   a t   l i n e s   f o l l o w i n g   t h e   @ x . 
 0S k i p   t o   t h e   n e x t   n o n b l a n k   l i n e ;   r e t u r n   i f   e n d   o f   f i l e   1 4   	0  a"
 d o   { 
 c h a n g e   l i n e + + ; 
 i f   (  i n p u t   l n   ( c h a n g e   f i l e   ) )   { 
 e r r   p r i n t   ( " !   C h a n g e   f i l e   e n d e d   a f t e r   @ x " ) ; 
 r e t u r n ; 
 } 
 }   w h i l e   ( l i m i t   a"  b u f f e r   ) ; 
 T h i s   c o d e   i s   u s e d   i n   s e c t i o n   1 2 . 
 1 5 .   0M o v e   b u f f e r   a n d   l i m i t   t o   c h a n g e   b u f f e r   a n d   c h a n g e   l i m i t   1 5   	0  a"
 { 
 c h a n g e   l i m i t   =   c h a n g e   b u f f e r   "  b u f f e r   +   l i m i t   ; 
 s t r n c p y   ( c h a n g e   b u f f e r   ,   b u f f e r   ,   l i m i t   "  b u f f e r   +   1 ) ; 
 } 
 T h i s   c o d e   i s   u s e d   i n   s e c t i o n s   1 2   a n d   1 6 . 
 A p p e n d i x   B :   T h e   c w e b m a c . t e x   f i l e 
 T h i s   i s   t h e   f i l e   t h a t   e x t e n d s    p l a i n   T E X    f o r m a t   i n   o r d e r   t o   s u p p o r t   t h e   f e a t u r e s   n e e d e d   b y   t h e   o u t p u t   o f 
 C W E A V E . 
 %   s t a n d a r d   m a c r o s   f o r   C W E B   l i s t i n g s   ( i n   a d d i t i o n   t o   p l a i n . t e x ) 
 %   V e r s i o n   3 . 6 4   - - -   F e b r u a r y   2 0 0 2 
 \ i f x \ d o c u m e n t s t y l e \ u n d e f i n e d \ e l s e \ e n d i n p u t \ f i   %   L a T e X   w i l l   u s e   o t h e r   m a c r o s 
 \ x d e f \ f m t v e r s i o n { \ f m t v e r s i o n + C W E B 3 . 6 4 } 
 \ c h a r d e f \ c w e b v e r s i o n = 3   \ c h a r d e f \ c w e b r e v i s i o n = 6 4 
 \ n e w i f \ i f p d f 
 \ i f x \ p d f + \ p d f t r u e \ f i 
 %   U n c o m m e n t   t h e   f o l l o w i n g   l i n e   i f   y o u   w a n t   P D F   g o o d i e s   t o   b e   t h e   d e f a u l t 
 % \ i f x \ p d f - \ e l s e \ p d f t r u e \ f i 
 \ d e f \ p d f l i n k c o l o r { 0   0   1 }   %   t h e   R G B   v a l u e s   f o r   h y p e r l i n k   c o l o r 
 \ n e w i f \ i f p d f t e x 
 \ i f x \ p d f o u t p u t \ u n d e f i n e d   \ p d f t e x f a l s e   \ e l s e \ i f n u m \ p d f o u t p u t = 0   \ p d f t e x f a l s e 
 \ e l s e   \ p d f t e x t r u e   \ p d f o u t p u t = 1   \ i n p u t   p d f c o l o r   \ l e t \ s e t c o l o r \ p d f s e t c o l o r   \ f i \ f i 
 \ n e w i f \ i f a c r o   \ i f p d f \ a c r o t r u e \ f i   \ i f p d f t e x \ a c r o t r u e \ f i 
 \ l e t \ : = \ .   %   p r e s e r v e   a   w a y   t o   g e t   t h e   d o t   a c c e n t 
 %   ( a l l   o t h e r   a c c e n t s   w i l l   s t i l l   w o r k   a s   u s u a l ) 
 \ p a r s k i p   0 p t   %   n o   s t r e t c h   b e t w e e n   p a r a g r a p h s 
 \ p a r i n d e n t   1 e m   %   f o r   p a r a g r a p h s   a n d   f o r   t h e   f i r s t   l i n e   o f   C   t e x t 
 \ f o n t \ n i n e r m = c m r 9 
 \ l e t \ m c = \ n i n e r m   %   m e d i u m   c a p s 
 \ d e f \ C E E / { { \ m c   C \ s p a c e f a c t o r 1 0 0 0 } } 
 \ d e f \ U N I X / { { \ m c   U \ k e r n - . 0 5 e m N I X \ s p a c e f a c t o r 1 0 0 0 } } 
 \ d e f \ T E X / { \ T e X } 
 \ d e f \ C P L U S P L U S / { { \ m c   C \ P P \ s p a c e f a c t o r 1 0 0 0 } } 
 \ d e f \ C e e { \ C E E / }   %   f o r   b a c k w a r d   c o m p a t i b i l i t y 
 \ d e f \ 9 # 1 { } 
 %   w i t h   t h i s   d e f i n i t i o n   o f   \ 9   y o u   c a n   s a y   @ : s o r t   k e y } { T e X   c o d e @ > 
 %   t o   a l p h a b e t i z e   a n   i n d e x   e n t r y   b y   t h e   s o r t   k e y   b u t   f o r m a t   w i t h   t h e   T e X   c o d e 
 \ f o n t \ e i g h t r m = c m r 8 
 \ l e t \ s c = \ e i g h t r m   %   f o r   s m a l l i s h   c a p s   ( N O T   a   c a p s - a n d - s m a l l - c a p s   f o n t ) 
 \ l e t \ m a i n f o n t = \ t e n r m 
 \ l e t \ c m n t f o n t \ t e n r m 
 % \ f o n t \ t e n s s = c m s s 1 0   \ l e t \ c m n t f o n t \ t e n s s   %   a l t e r n a t i v e   c o m m e n t   f o n t 
 \ f o n t \ t i t l e f o n t = c m r 7   s c a l e d \ m a g s t e p 4   %   t i t l e   o n   t h e   c o n t e n t s   p a g e 
 \ f o n t \ t t i t l e f o n t = c m t t 1 0   s c a l e d \ m a g s t e p 2   %   t y p e w r i t e r   t y p e   i n   t i t l e 
 \ f o n t \ t e n t e x = c m t e x 1 0   %   T e X   e x t e n d e d   c h a r a c t e r   s e t   ( u s e d   i n   s t r i n g s ) 
 \ f o n t d i m e n 7 \ t e n t e x = 0 p t   %   n o   d o u b l e   s p a c e   a f t e r   s e n t e n c e s 
 \ d e f \ \ # 1 { \ l e a v e v m o d e \ h b o x { \ i t # 1 \ / \ k e r n . 0 5 e m } }   %   i t a l i c   t y p e   f o r   i d e n t i f i e r s 
 \ d e f \ | # 1 { \ l e a v e v m o d e \ h b o x { $ # 1 $ } }   %   o n e - l e t t e r   i d e n t i f i e r s   l o o k   b e t t e r   t h i s   w a y 
 \ d e f \ & # 1 { \ l e a v e v m o d e \ h b o x { \ b f 
 \ d e f \ _ { \ k e r n . 0 4 e m \ v b o x { \ h r u l e   w i d t h . 3 e m   h e i g h t   . 6 p t } \ k e r n . 0 8 e m } % 
 # 1 \ / \ k e r n . 0 5 e m } }   %   b o l d f a c e   t y p e   f o r   r e s e r v e d   w o r d s 
 \ d e f \ . # 1 { \ l e a v e v m o d e \ h b o x { \ t e n t e x   %   t y p e w r i t e r   t y p e   f o r   s t r i n g s 
 \ l e t \ \ = \ B S   %   b a c k s l a s h   i n   a   s t r i n g 
 \ l e t \ { = \ L B   %   l e f t   b r a c e   i n   a   s t r i n g 
 \ l e t \ } = \ R B   %   r i g h t   b r a c e   i n   a   s t r i n g 
 \ l e t \ ~ = \ T L   %   t i l d e   i n   a   s t r i n g 
 \ l e t \   = \ S P   %   s p a c e   i n   a   s t r i n g 
 \ l e t \ _ = \ U L   %   u n d e r l i n e   i n   a   s t r i n g 
 \ l e t \ & = \ A M   %   a m p e r s a n d   i n   a   s t r i n g 
 \ l e t \ ^ = \ C F   %   c i r c u m f l e x   i n   a   s t r i n g 
 # 1 \ k e r n . 0 5 e m } } 
 \ d e f \ ) { { \ t e n t e x \ k e r n - . 0 5 e m } \ d i s c r e t i o n a r y { \ h b o x { \ t e n t e x \ B S } } { } { } } 
 \ d e f \ A T { @ }   %   a t   s i g n   f o r   c o n t r o l   t e x t   ( n o t   n e e d e d   i n   v e r s i o n s   > =   2 . 9 ) 
 \ d e f \ A T L { \ p a r \ n o i n d e n t \ b g r o u p \ c a t c o d e  \ _ = 1 2   \ p o s t A T L }   %   p r i n t   @ l   i n   l i m b o 
 \ d e f \ p o s t A T L # 1   # 2   { \ b f   l e t t e r   \ \ { \ u p p e r c a s e { \ c h a r " # 1 } } 
 t a n g l e s   a s   \ t e n t e x   " # 2 " \ e g r o u p \ p a r } 
 \ d e f \ n o A T L # 1   # 2   { } 
 \ d e f \ n o a t l { \ l e t \ A T L = \ n o A T L }   %   s u p p r e s s   o u t p u t   f r o m   @ l 
 \ d e f \ A T H { { \ a c r o f a l s e \ X \ k e r n - . 5 e m : P r e p r o c e s s o r   d e f i n i t i o n s \ X } } 
 \ l e t \ P B = \ r e l a x   %   h o o k   f o r   p r o g r a m   b r a c k e t s   | . . . |   i n   T e X   p a r t   o r   s e c t i o n   n a m e 
 1 8   A P P E N D I X   B      M A C R O S   F O R   F O R M A T T I N G 
 \ c h a r d e f \ A M =  \ &   %   a m p e r s a n d   c h a r a c t e r   i n   a   s t r i n g 
 \ c h a r d e f \ B S =  \ \   %   b a c k s l a s h   i n   a   s t r i n g 
 \ c h a r d e f \ L B =  \ {   %   l e f t   b r a c e   i n   a   s t r i n g 
 \ c h a r d e f \ R B =  \ }   %   r i g h t   b r a c e   i n   a   s t r i n g 
 \ d e f \ S P { { \ t t \ c h a r  \   } }   %   ( v i s i b l e )   s p a c e   i n   a   s t r i n g 
 \ c h a r d e f \ T L =  \ ~   %   t i l d e   i n   a   s t r i n g 
 \ c h a r d e f \ U L =  \ _   %   u n d e r l i n e   c h a r a c t e r   i n   a   s t r i n g 
 \ c h a r d e f \ C F =  \ ^   %   c i r c u m f l e x   c h a r a c t e r   i n   a   s t r i n g 
 \ n e w b o x \ P P b o x   %   s y m b o l   f o r   + + 
 \ s e t b o x \ P P b o x = \ h b o x { \ k e r n . 5 p t \ r a i s e 1 p t \ h b o x { \ s e v e n r m + \ k e r n - 1 p t + } \ k e r n . 5 p t } 
 \ d e f \ P P { \ c o p y \ P P b o x } 
 \ n e w b o x \ M M b o x   \ s e t b o x \ M M b o x = \ h b o x { \ k e r n . 5 p t \ r a i s e 1 p t \ h b o x { \ s e v e n s y \ c h a r 0 
 \ k e r n - 1 p t \ c h a r 0 } \ k e r n . 5 p t } 
 \ d e f \ M M { \ c o p y \ M M b o x } 
 \ n e w b o x \ M G b o x   %   s y m b o l   f o r   - > 
 \ s e t b o x \ M G b o x = \ h b o x { \ k e r n - 2 p t \ l o w e r 3 p t \ h b o x { \ t e n i \ c h a r  1 7 6 } \ k e r n 1 p t } 
 \ d e f \ M G { \ c o p y \ M G b o x } 
 \ d e f \ M R L # 1 { \ m a t h r e l { \ l e t \ K = = # 1 } } 
 % \ d e f \ M R L # 1 { \ K K # 1 } \ d e f \ K K # 1 # 2 { \ b u i l d r e l \ ; # 1 \ o v e r { # 2 } } 
 \ l e t \ G G = \ g g 
 \ l e t \ L L = \ l l 
 \ l e t \ N U L L = \ L a m b d a 
 \ m a t h c h a r d e f \ A N D = " 2 0 2 6   %   b i t w i s e   a n d ;   a l s o   \ &   ( u n a r y   o p e r a t o r ) 
 \ l e t \ O R = \ m i d   %   b i t w i s e   o r 
 \ l e t \ X O R = \ o p l u s   %   b i t w i s e   e x c l u s i v e   o r 
 \ d e f \ C M { { \ s i m } }   %   b i t w i s e   c o m p l e m e n t 
 \ n e w b o x \ M O D b o x   \ s e t b o x \ M O D b o x = \ h b o x { \ e i g h t r m \ % } 
 \ d e f \ M O D { \ m a t h b i n { \ c o p y \ M O D b o x } } 
 \ d e f \ D C { \ k e r n . 1 e m { : : } \ k e r n . 1 e m }   %   s y m b o l   f o r   : : 
 \ d e f \ P A { \ m a t h b i n { . * } }   %   s y m b o l   f o r   . * 
 \ d e f \ M G A { \ m a t h b i n { \ M G * } }   %   s y m b o l   f o r   - > * 
 \ d e f \ t h i s { \ & { t h i s } } 
 \ n e w b o x \ b a k   \ s e t b o x \ b a k = \ h b o x   t o   - 1 e m { }   %   b a c k s p a c e   o n e   e m 
 \ n e w b o x \ b a k k \ s e t b o x \ b a k k = \ h b o x   t o   - 2 e m { }   %   b a c k s p a c e   t w o   e m s 
 \ n e w c o u n t \ i n d   %   c u r r e n t   i n d e n t a t i o n   i n   e m s 
 \ d e f \ 1 { \ g l o b a l \ a d v a n c e \ i n d   b y 1 \ h a n g i n d e n t \ i n d   e m }   %   i n d e n t   o n e   m o r e   n o t c h 
 \ d e f \ 2 { \ g l o b a l \ a d v a n c e \ i n d   b y - 1 }   %   i n d e n t   o n e   l e s s   n o t c h 
 \ d e f \ 3 # 1 { \ h f i l \ p e n a l t y # 1 0 \ h f i l n e g }   %   o p t i o n a l   b r e a k   w i t h i n   a   s t a t e m e n t 
 \ d e f \ 4 { \ c o p y \ b a k }   %   b a c k s p a c e   o n e   n o t c h 
 \ d e f \ 5 { \ h f i l \ p e n a l t y - 1 \ h f i l n e g \ k e r n 2 . 5 e m \ c o p y \ b a k k \ i g n o r e s p a c e s } %   o p t i o n a l   b r e a k 
 \ d e f \ 6 { \ i f m m o d e \ e l s e \ p a r   %   f o r c e d   b r e a k 
 \ h a n g i n d e n t \ i n d   e m \ n o i n d e n t \ k e r n \ i n d   e m \ c o p y \ b a k k \ i g n o r e s p a c e s \ f i } 
 \ d e f \ 7 { \ Y \ 6 }   %   f o r c e d   b r e a k   a n d   a   l i t t l e   e x t r a   s p a c e 
 \ d e f \ 8 { \ h s k i p - \ i n d   e m \ h s k i p   2 e m }   %   n o   i n d e n t a t i o n 
 \ n e w c o u n t \ g d e p t h   %   d e p t h   o f   c u r r e n t   m a j o r   g r o u p ,   p l u s   o n e 
 \ n e w c o u n t \ s e c p a g e d e p t h 
 \ s e c p a g e d e p t h = 3   %   p a g e   b r e a k s   w i l l   o c c u r   f o r   d e p t h s   - 1 ,   0 ,   a n d   1 
 \ n e w t o k s \ g t i t l e   %   t i t l e   o f   c u r r e n t   m a j o r   g r o u p 
 \ n e w s k i p \ i n t e r s e c s k i p   \ i n t e r s e c s k i p = 1 2 p t   m i n u s   3 p t   %   s p a c e   b e t w e e n   s e c t i o n s 
 \ l e t \ y s k i p = \ s m a l l s k i p 
 \ d e f \ ? { \ m a t h r e l ? } 
 \ d e f \ n o t e # 1 # 2 . { \ Y \ n o i n d e n t { \ h a n g i n d e n t 2 e m % 
 \ b a s e l i n e s k i p 1 0 p t \ e i g h t r m # 1 ~ \ i f a c r o { \ p d f n o t e # 2 . } \ e l s e # 2 \ f i . \ p a r } } 
 \ n e w t o k s \ t o k s A   \ n e w t o k s \ t o k s B   \ n e w t o k s \ t o k s C   \ n e w t o k s \ t o k s D 
 \ n e w t o k s \ t o k s E   \ n e w t o k s \ t o k s F   \ n e w t o k s \ u s e r s a n i t i z e r 
 \ n e w c o u n t \ c o u n t A   \ c o u n t A = 0   \ n e w c o u n t \ c o u n t B   \ c o u n t B = 0 
 \ n e w c o u n t \ c o u n t C   \ c o u n t C = 0 
 \ n e w i f \ i f t o k p r o c e s s e d   \ n e w i f \ i f T n u m   \ n e w i f \ i f i n s t r 
 { \ d e f \ \ { \ g l o b a l \ l e t \ s p a c e c h a r =   } \ \   } 
 \ i f a c r o   %   T h e   f o l l o w i n g   a r e   p d f   m a c r o s 
 \ d e f \ t h e w i d t h { \ t h e \ w d 0   \ s p a c e } 
 \ d e f \ t h e h e i g h t { \ t h e \ h t \ s t r u t b o x \ s p a c e } 
 \ d e f \ t h e d e p t h { \ t h e \ d p \ s t r u t b o x \ s p a c e } 
 \ i f p d f t e x 
 \ i f x \ p d f a n n o t l i n k \ u n d e f i n e d \ l e t \ p d f a n n o t l i n k \ p d f s t a r t l i n k \ f i %   f o r   p d f T e X   0 . 1 4 
 A P P E N D I X   B      M A C R O S   F O R   F O R M A T T I N G   1 9 
 \ d e f \ p d f l i n k # 1 # 2 { \ h b o x { \ p d f a n n o t l i n k   h e i g h t \ h t \ s t r u t b o x   d e p t h \ d p \ s t r u t b o x 
 a t t r { / B o r d e r   [ 0   0   0 ] }   g o t o   n u m   # 1   \ B l u e G r e e n   # 1 \ B l a c k \ p d f e n d l i n k } } 
 \ e l s e \ d e f \ p d f l i n k # 1 # 2 { \ s e t b o x 0 = \ h b o x { \ s p e c i a l { p d f :   b c   [   \ p d f l i n k c o l o r   ] } { # 1 } % 
 \ s p e c i a l { p d f :   e c } } \ s p e c i a l { p d f :   a n n   w i d t h   \ t h e w i d t h   h e i g h t   \ t h e h e i g h t 
 d e p t h   \ t h e d e p t h   < <   / T y p e   / A n n o t   / S u b t y p e   / L i n k 
 / B o r d e r   [ 0   0   0 ]   / A   < <   / S   / G o T o   / D   ( # 2 )   > >   > > } \ b o x 0 \ r e l a x } \ f i 
 \ d e f \ p d f n o t e # 1 . { \ s e t b o x 0 = \ h b o x { \ t o k s A = { # 1 . } \ t o k s B = { } \ m a k e t o k s } \ t h e \ t o k s A } 
 \ d e f \ f i r s t s e c n o # 1 . { \ s e t b o x 0 = \ h b o x { \ t o k s A = { # 1 . } \ t o k s B = { } % 
 \ d e f \ m a k e n o t e { \ a d d t o k e n s \ t o k s B { \ t h e \ t o k s C } \ d e f \ m a k e n o t e { \ t o k s D = { } 
 \ t o k s C = { } \ l e t \ s p a c e \ e m p t y } \ m a k e n o t e } \ m a k e t o k s } } 
 \ d e f \ a d d t o k e n s # 1 # 2 { \ e d e f \ a d d t o k s { \ n o e x p a n d # 1 = { \ t h e # 1 # 2 } } \ a d d t o k s } 
 \ d e f \ p o p t o k s # 1 # 2 | E N D T O K S | { \ l e t \ f i r s t = # 1 \ t o k s D = { # 1 } % 
 \ i f c a t \ n o e x p a n d \ f i r s t 0 \ c o u n t B =  # 1 \ e l s e \ c o u n t B = 0 \ f i \ t o k s A = { # 2 } } 
 \ d e f \ m a k e t o k s { \ e x p a n d a f t e r \ p o p t o k s \ t h e \ t o k s A | E N D T O K S | % 
 \ i f n u m \ c o u n t B >  9   \ c o u n t B = 0   \ f i 
 \ i f n u m \ c o u n t B <  0 
 \ i f n u m 0 = \ c o u n t C \ e l s e \ m a k e n o t e \ f i 
 \ i f x \ f i r s t . \ l e t \ n e x t = \ m a k e t o k s d o n e \ e l s e 
 \ l e t \ n e x t = \ m a k e t o k s 
 \ a d d t o k e n s \ t o k s B { \ t h e \ t o k s D } 
 \ i f x \ f i r s t , \ a d d t o k e n s \ t o k s B { \ s p a c e } \ f i 
 \ f i 
 \ e l s e   \ a d d t o k e n s \ t o k s C { \ t h e \ t o k s D } \ g l o b a l \ c o u n t C = 1 \ l e t \ n e x t = \ m a k e t o k s 
 \ f i 
 \ n e x t 
 } 
 \ d e f \ m a k e n o t e { \ a d d t o k e n s \ t o k s B 
 { \ n o e x p a n d \ p d f l i n k { \ t h e \ t o k s C } { \ r o m a n n u m e r a l \ t h e \ t o k s C } } \ t o k s C = { } \ g l o b a l \ c o u n t C = 0 } 
 \ d e f \ m a k e t o k s d o n e { \ e d e f \ s t { \ g l o b a l \ n o e x p a n d \ t o k s A = { \ t h e \ t o k s B } } \ s t } 
 \ d e f \ p d f U R L # 1 # 2 { \ i f p d f t e x \ p d f a n n o t l i n k   h e i g h t \ h t \ s t r u t b o x   d e p t h \ d p \ s t r u t b o x 
 a t t r   { / B o r d e r   [ 0   0   0 ] }   u s e r   {   / T y p e   / A c t i o n   / S u b t y p e   / L i n k   / A 
 < <   / S   / U R I   / U R I   ( # 2 )   > > } \ B l u e G r e e n   # 1 \ B l a c k   \ p d f e n d l i n k 
 \ e l s e   \ i f p d f { \ s e t b o x 0 = \ h b o x { \ s p e c i a l { p d f :   b c   [   \ p d f l i n k c o l o r   ] } { # 1 } % 
 \ s p e c i a l { p d f :   e c } } \ s p e c i a l { p d f :   a n n   w i d t h   \ t h e w i d t h \ s p a c e   h e i g h t   \ t h e h e i g h t 
 \ s p a c e   d e p t h   \ t h e d e p t h \ s p a c e   < <   / B o r d e r   [ 0   0   0 ] 
 / T y p e   / A c t i o n   / S u b t y p e   / L i n k   / A   < <   / S   / U R I   / U R I   ( # 2 )   > >   > > } \ b o x 0 \ r e l a x } % 
 \ e l s e   # 1   ( { \ t t # 2 } ) \ f i \ f i } 
 { \ c a t c o d e  \ ~ = 1 2   \ g d e f \ T I L D E / { ~ } }   %   ~   i n   a   U R L 
 { \ c a t c o d e  \ _ = 1 2   \ g d e f \ U N D E R / { _ } }   %   _   i n   a   U R L 
 \ d e f \ s a n i t i z e c o m m a n d # 1 # 2 { \ a d d t o k e n s \ u s e r s a n i t i z e r 
 { \ n o e x p a n d \ d o s a n i t i z e c o m m a n d \ n o e x p a n d # 1 { # 2 } } } 
 \ d e f \ d o s a n i t i z e c o m m a n d # 1 # 2 { \ i f x \ n x t # 1 \ a d d F { # 2 } \ f i } 
 \ c a t c o d e  \ [ = 1   \ c a t c o d e  \ ] = 2   \ c a t c o d e  \ { = 1 2   \ c a t c o d e  \ } = 1 2 
 \ d e f \ l b c h a r [ { ]   \ d e f \ r b c h a r [ } ] 
 \ c a t c o d e  \ [ = 1 2   \ c a t c o d e  \ ] = 1 2   \ c a t c o d e  \ { = 1   \ c a t c o d e  \ } = 2 
 \ c a t c o d e  \ ~ = 1 2   \ d e f \ t i l d e c h a r { ~ }   \ c a t c o d e  \ ~ = 1 3 
 \ c a t c o d e  \ | = 0   | c a t c o d e  | \ = 1 2   | d e f | b s c h a r { \ }   | c a t c o d e  | \ = 0   \ c a t c o d e  \ | = 1 2 
 \ d e f \ m a k e o u t l i n e t o k s { \ T n u m f a l s e \ a f t e r a s s i g n m e n t \ m a k e o l p r o c t o k \ l e t \ n x t =   } 
 \ d e f \ m a k e o l n e x t t o k { \ a f t e r a s s i g n m e n t \ m a k e o l p r o c t o k \ l e t \ n x t =   } 
 \ d e f \ m a k e o l g o b b l e t o k { \ a f t e r a s s i g n m e n t \ m a k e o l n e x t t o k \ l e t \ n x t =   } 
 \ d e f \ a d d F # 1 { \ a d d t o k e n s \ t o k s F { # 1 } \ t o k p r o c e s s e d t r u e } 
 %   n o w   c o m e s   a   r o u t i n e   t o   " s a n i t i z e "   s e c t i o n   n a m e s ,   f o r   p d f   o u t l i n e s 
 \ d e f \ m a k e o l p r o c t o k { \ t o k p r o c e s s e d f a l s e 
 \ l e t \ n e x t \ m a k e o l n e x t t o k   %   d e f a u l t 
 \ i f x \ n x t \ o u t l i n e d o n e \ l e t \ n e x t \ o u t l i n e d o n e 
 \ e l s e \ i f x { \ n x t   \ e l s e \ i f x } \ n x t   \ T n u m f a l s e   \ i n s t r f a l s e   %   s k i p   b r a c e s 
 \ e l s e \ i f x $ \ n x t   %   o r   a   $   s i g n 
 \ e l s e \ i f x ^ \ n x t   \ a d d F ^ \ e l s e \ i f x _ \ n x t   \ a d d F _ %   s a n i t i z e   ^   a n d   _ 
 \ e l s e \ i f x \ n x t \ s p a c e c h a r   \ a d d F \ s p a c e 
 \ e l s e \ i f \ n o e x p a n d \ n x t \ r e l a x   %   w e   h a v e   a   c o n t r o l   s e q u e n c e ;   i s   i t   o n e   w e   k n o w ? 
 \ i f x \ n x t ~ \ a d d F \ s p a c e 
 \ e l s e \ i f x \ n x t \ o n e s p a c e \ a d d F \ s p a c e 
 \ e l s e \ t h e \ u s e r s a n i t i z e r 
 \ i f t o k p r o c e s s e d \ e l s e \ m a k e o l p r o c t o k c t l i 
 \ i f t o k p r o c e s s e d \ e l s e \ m a k e o l p r o c t o k c t l i i 
 \ i f t o k p r o c e s s e d \ e l s e \ m a k e o l p r o c t o k c t l i i i   %   i f   n o t   r e c o g n i s e d ,   s k i p   i t 
 \ f i \ f i \ f i \ f i \ f i 
 \ e l s e   %   w e   d o n  t   h a v e   a   c o n t r o l   s e q u e n c e ,   i t  s   a n   o r d i n a r y   c h a r 
 \ i f x / \ n x t   \ a d d F { \ s t r i n g \ / } %   q u o t e   c h a r s   s p e c i a l   t o   P D F   w i t h   b a c k s l a s h 
 \ e l s e \ i f x ( \ n x t   \ a d d F { \ s t r i n g \ ( } \ e l s e \ i f x ) \ n x t   \ a d d F { \ s t r i n g \ ) } % 
 2 0   A P P E N D I X   B      M A C R O S   F O R   F O R M A T T I N G 
 \ e l s e \ i f x [ \ n x t   \ a d d F { \ s t r i n g \ [ } \ e l s e \ i f x ] \ n x t   \ a d d F { \ s t r i n g \ ] } % 
 \ e l s e \ e x p a n d a f t e r \ m a k e o l p r o c t o k c h a r \ m e a n i n g \ n x t 
 \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i 
 \ n e x t 
 } 
 \ d e f \ m a k e o l p r o c t o k c h a r # 1   # 2   # 3 { \ a d d F { # 3 } } 
 \ d e f \ m a k e o l p r o c t o k c t l i { % 
 \ i f x \ n x t \ C E E \ a d d F { C } \ l e t \ n e x t \ m a k e o l g o b b l e t o k   %   \ C E E / 
 \ e l s e \ i f x \ n x t \ U N I X \ a d d F { U N I X } \ l e t \ n e x t \ m a k e o l g o b b l e t o k   %   \ U N I X / 
 \ e l s e \ i f x \ n x t \ T E X \ a d d F { T e X } \ l e t \ n e x t \ m a k e o l g o b b l e t o k   %   \ T E X / 
 \ e l s e \ i f x \ n x t \ T e X \ a d d F { T e X } \ e l s e \ i f x \ n x t \ L a T e X \ a d d F { L a T e X } % 
 \ e l s e \ i f x \ n x t \ C P L U S P L U S \ a d d F { C + + } \ l e t \ n e x t \ m a k e o l g o b b l e t o k   %   \ C P L U S P L U S / 
 \ e l s e \ i f x \ n x t \ C e e \ a d d F { C } % 
 \ e l s e \ i f x \ n x t \ P B   \ l e t \ n e x t \ m a k e o l g o b b l e t o k   \ t o k p r o c e s s e d t r u e   %   \ P B { . . . } 
 \ e l s e \ i f x \ n x t \ . \ t o k p r o c e s s e d t r u e \ i n s t r t r u e   %   \ . { . . . } 
 %   s k i p   \ | 
 \ e l s e \ i f x \ n x t \ \ \ i f i n s t r \ a d d F { \ b s c h a r \ b s c h a r } \ e l s e \ t o k p r o c e s s e d t r u e \ f i 
 \ e l s e \ i f x \ n x t \ & \ i f i n s t r \ a d d F & \ e l s e \ t o k p r o c e s s e d t r u e \ f i 
 \ e l s e \ i f x \ n x t \ ~ \ i f T n u m \ a d d F { 0 } \ e l s e \ a d d F \ t i l d e c h a r \ f i   %   0 7 7 - > \ T { \ ~ 7 7 } 
 \ e l s e \ i f x \ n x t \ _ \ i f T n u m \ a d d F { E } \ e l s e \ a d d F _ \ f i   %   0 . 1 E 5 - > \ T { 0 . 1 \ _ 5 } 
 \ e l s e \ i f x \ n x t \ ^ \ i f T n u m \ a d d F { 0 x } \ e l s e \ a d d F ^ \ f i   %   0 x 7 7   - >   \ T { \ ^ 7 7 } 
 \ e l s e \ i f x \ n x t \ $ \ i f T n u m \ t o k p r o c e s s e d t r u e \ e l s e \ a d d F $ \ f i   %   \ T { 7 7 \ $ L } 
 \ e l s e \ i f x \ n x t \ { \ a d d F \ l b c h a r   \ e l s e \ i f x \ n x t \ } \ a d d F \ r b c h a r 
 \ e l s e \ i f x \ n x t \   \ a d d F \ s p a c e   \ e l s e \ i f x \ n x t \ # \ a d d F { \ s t r i n g \ # } % 
 \ e l s e \ i f x \ n x t \ P P \ a d d F { + + } \ e l s e \ i f x \ n x t \ M M \ a d d F { - - } % 
 \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i 
 } 
 \ d e f \ m a k e o l p r o c t o k c t l i i { % 
 \ i f x \ n x t \ M G \ a d d F { - > } \ e l s e \ i f x \ n x t \ G G \ a d d F { > > } % 
 \ e l s e \ i f x \ n x t \ L L \ a d d F { < < } \ e l s e \ i f x \ n x t \ N U L L \ a d d F { N U L L } % 
 \ e l s e \ i f x \ n x t \ A N D \ a d d F & \ e l s e \ i f x \ n x t \ O R \ a d d F | % 
 \ e l s e \ i f x \ n x t \ X O R \ a d d F ^ \ e l s e \ i f x \ n x t \ C M \ a d d F \ t i l d e c h a r 
 \ e l s e \ i f x \ n x t \ M O D \ a d d F { \ s t r i n g \ % } \ e l s e \ i f x \ n x t \ D C \ a d d F { : : } % 
 \ e l s e \ i f x \ n x t \ P A \ a d d F { . * } \ e l s e \ i f x \ n x t \ M G A \ a d d F { - > * } % 
 \ e l s e \ i f x \ n x t \ t h i s \ a d d F { t h i s } \ e l s e \ i f x \ n x t \ ? \ a d d F ? % 
 \ e l s e \ i f x \ n x t \ E \ a d d F { = = } \ e l s e \ i f x \ n x t \ G \ a d d F { > = } % 
 \ e l s e \ i f x \ n x t \ I \ a d d F { ! = } \ e l s e \ i f x \ n x t \ K \ a d d F { = } % 
 \ e l s e \ i f x \ n x t \ l \ a d d F { l } \ e l s e \ i f x \ n x t \ L \ a d d F { L } % 
 \ e l s e \ i f x \ n x t \ o \ a d d F { o } \ e l s e \ i f x \ n x t \ O \ a d d F { O } % 
 \ e l s e \ i f x \ n x t \ R \ a d d F ! % 
 \ e l s e \ i f x \ n x t \ T   \ T n u m t r u e   \ l e t \ n e x t \ m a k e o l g o b b l e t o k 
 \ t o k p r o c e s s e d t r u e   %   \ T { n u m b e r } 
 \ e l s e \ i f x \ n x t \ A M \ a d d F & \ e l s e \ i f x \ n x t \ % \ a d d F { \ s t r i n g \ % } % 
 \ f i \ f i \ f i \ f i \ f i   \ f i \ f i \ f i \ f i \ f i 
 \ f i \ f i \ f i \ f i \ f i   \ f i \ f i \ f i \ f i \ f i 
 \ f i \ f i \ f i \ f i \ f i \ f i 
 } 
 \ d e f \ m a k e o l p r o c t o k c t l i i i { % 
 \ i f x \ n x t \ V \ a d d F { | | } \ e l s e \ i f x \ n x t \ W \ a d d F { & & } \ e l s e \ i f x \ n x t \ Z \ a d d F { < = } % 
 \ e l s e \ i f x \ n x t \ * \ a d d F * \ e l s e \ i f x \ n x t \ X a n d \ a d d F { \ s p a c e   a n d \ s p a c e } % 
 \ e l s e \ i f x \ n x t \ X a n d x e q \ a d d F { \ s p a c e   a n d _ e q \ s p a c e } % 
 \ e l s e \ i f x \ n x t \ X b i t a n d \ a d d F { \ s p a c e   b i t a n d \ s p a c e } % 
 \ e l s e \ i f x \ n x t \ X b i t o r \ a d d F { \ s p a c e   b i t o r \ s p a c e } % 
 \ e l s e \ i f x \ n x t \ X c o m p l \ a d d F { \ s p a c e   c o m p l \ s p a c e } % 
 \ e l s e \ i f x \ n x t \ X n o t \ a d d F { \ s p a c e   n o t \ s p a c e } % 
 \ e l s e \ i f x \ n x t \ X n o t x e q \ a d d F { \ s p a c e   n o t _ e q \ s p a c e } % 
 \ e l s e \ i f x \ n x t \ X o r \ a d d F { \ s p a c e   o r \ s p a c e } % 
 \ e l s e \ i f x \ n x t \ X o r x e q \ a d d F { \ s p a c e   o r _ e q \ s p a c e } % 
 \ e l s e \ i f x \ n x t \ X x o r \ a d d F { \ s p a c e   x o r \ s p a c e } % 
 \ e l s e \ i f x \ n x t \ X x o r x e q \ a d d F { \ s p a c e   x o r _ e q \ s p a c e } % 
 \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i \ f i 
 \ f i \ f i \ f i \ f i \ f i 
 } 
 \ d e f \ o u t l i n e d o n e { \ e d e f \ o u t l i n e s t { \ g l o b a l \ n o e x p a n d \ t o k s E = { \ t h e \ t o k s F } } % 
 \ o u t l i n e s t \ l e t \ o u t l i n e d o n e = \ r e l a x } 
 \ f i   %   E n d   o f   p d f   m a c r o s 
 \ d e f \ l a p s t a r { \ r l a p { * } } 
 \ d e f \ s t s e c { \ r i g h t s k i p = 0 p t   %   g e t   o u t   o f   C   m o d e   ( c f .   \ B ) 
 \ s f c o d e  ; = 1 5 0 0   \ p r e t o l e r a n c e   2 0 0   \ h y p h e n p e n a l t y   5 0   \ e x h y p h e n p e n a l t y   5 0 
 \ n o i n d e n t { \ l e t \ * = \ l a p s t a r \ b f \ s e c s t a r . \ q u a d } % 
 A P P E N D I X   B      M A C R O S   F O R   F O R M A T T I N G   2 1 
 \ i f p d f t e x \ s m a s h { \ r a i s e \ b a s e l i n e s k i p \ h b o x   t o 0 p t { % 
 \ l e t \ * = \ e m p t y \ p d f d e s t   n u m   \ s e c s t a r   f i t h } } 
 \ e l s e \ i f p d f \ s m a s h { \ r a i s e \ b a s e l i n e s k i p \ h b o x   t o 0 p t { % 
 \ l e t \ * = \ e m p t y \ s p e c i a l { % 
 p d f :   d e s t   ( \ r o m a n n u m e r a l \ s e c s t a r )   [   @ t h i s p a g e   / F i t H   @ y p o s   ] } } } \ f i \ f i } 
 \ l e t \ s t a r t s e c t i o n = \ s t s e c 
 \ d e f \ d e f i n # 1 { \ g l o b a l \ a d v a n c e \ i n d   b y   2   \ 1 \ & { # 1   }   }   %   b e g i n    d e f i n e    o r    f o r m a t  
 \ d e f \ A { \ n o t e { S e e   a l s o   s e c t i o n } }   %   x r e f   f o r   d o u b l y   d e f i n e d   s e c t i o n   n a m e 
 \ d e f \ A s { \ n o t e { S e e   a l s o   s e c t i o n s } }   %   x r e f   f o r   m u l t i p l y   d e f i n e d   s e c t i o n   n a m e 
 \ d e f \ B { \ r i g h t s k i p = 0 p t   p l u s   1 0 0 p t   m i n u s   1 0 p t   %   g o   i n t o   C   m o d e 
 \ s f c o d e  ; = 3 0 0 0 
 \ p r e t o l e r a n c e   1 0 0 0 0 
 \ h y p h e n p e n a l t y   1 0 0 0   %   s o   s t r i n g s   c a n   b e   b r o k e n   ( d i s c r e t i o n a r y   \   i s   i n s e r t e d ) 
 \ e x h y p h e n p e n a l t y   1 0 0 0 0 
 \ g l o b a l \ i n d = 2   \ 1 \   \ u n s k i p } 
 \ d e f \ C # 1 { \ 5 \ 5 \ q u a d $ / \ a s t \ , $ { \ c m n t f o n t   # 1 } $ \ , \ a s t / $ } 
 \ l e t \ S H C \ C   %   " / /   s h o r t   c o m m e n t s "   t r e a t e d   l i k e   " / *   o r d i n a r y   c o m m e n t s   * / " 
 % \ d e f \ C # 1 { \ 5 \ 5 \ q u a d $ \ t r i a n g l e r i g h t \ , $ { \ c m n t f o n t # 1 } $ \ , \ t r i a n g l e l e f t $ } 
 % \ d e f \ S H C # 1 { \ 5 \ 5 \ q u a d $ \ d i a m o n d \ , $ { \ c m n t f o n t # 1 } } 
 \ d e f \ D { \ d e f i n { \ # d e f i n e } }   %   m a c r o   d e f i n i t i o n 
 \ l e t \ E = \ e q u i v   %   e q u i v a l e n c e   s i g n 
 \ d e f \ E T {   a n d ~ }   %   c o n j u n c t i o n   b e t w e e n   t w o   s e c t i o n   n u m b e r s 
 \ d e f \ E T s { ,   a n d ~ }   %   c o n j u n c t i o n   b e t w e e n   t h e   l a s t   t w o   o f   s e v e r a l   s e c t i o n   n u m b e r s 
 \ d e f \ F { \ d e f i n { f o r m a t } }   %   f o r m a t   d e f i n i t i o n 
 \ l e t \ G = \ g e   %   g r e a t e r   t h a n   o r   e q u a l   s i g n 
 %   \ H   i s   l o n g   H u n g a r i a n   u m l a u t   a c c e n t 
 \ l e t \ I = \ n e   %   u n e q u a l   s i g n 
 \ d e f \ J { \ . { @ \ & } }   %   T A N G L E  s   j o i n   o p e r a t i o n 
 \ l e t \ K = =   %   a s s i g n m e n t   o p e r a t o r 
 % \ l e t \ K = \ l e f t a r r o w   %   " h o n e s t "   a l t e r n a t i v e   t o   s t a n d a r d   a s s i g n m e n t   o p e r a t o r 
 %   \ L   i s   P o l i s h   l e t t e r   s u p p r e s s e d - L 
 \ o u t e r \ d e f \ M # 1 { \ M N { # 1 } \ i f o n \ v f i l \ p e n a l t y - 1 0 0 \ v f i l n e g   %   b e g i n n i n g   o f   s e c t i o n 
 \ v s k i p \ i n t e r s e c s k i p \ s t a r t s e c t i o n \ i g n o r e s p a c e s } 
 \ o u t e r \ d e f \ N # 1 # 2 # 3 . { %   b e g i n n i n g   o f   s t a r r e d   s e c t i o n 
 \ i f a c r o { \ t o k s F = { } \ m a k e o u t l i n e t o k s # 3 \ o u t l i n e d o n e \ o u t l i n e d o n e } \ f i 
 \ g d e p t h = # 1 \ g t i t l e = { # 3 } \ M N { # 2 } % 
 \ i f o n \ i f n u m # 1 < \ s e c p a g e d e p t h   \ v f i l \ e j e c t   %   f o r c e   p a g e   b r e a k   i f   d e p t h   i s   s m a l l 
 \ e l s e \ v f i l \ p e n a l t y - 1 0 0 \ v f i l n e g \ v s k i p \ i n t e r s e c s k i p \ f i \ f i 
 \ m e s s a g e { * \ s e c n o }   %   p r o g r e s s   r e p o r t 
 \ d e f \ s t r i p p r e f i x # # 1 > { } \ d e f \ g t i t l e t o k s { # 3 } % 
 \ e d e f \ g t i t l e t o k s { \ e x p a n d a f t e r \ s t r i p p r e f i x \ m e a n i n g \ g t i t l e t o k s } % 
 \ e d e f \ n e x t { \ w r i t e \ c o n t { \ Z Z { \ g t i t l e t o k s } { # 1 } { \ s e c n o } %   w r i t e   t o   c o n t e n t s   f i l e 
 { \ n o e x p a n d \ t h e \ p a g e n o } { \ t h e \ t o k s E } } } \ n e x t   %   \ Z Z { t i t l e } { d e p t h } { s e c } { p a g e } { s s } 
 \ i f p d f t e x \ e x p a n d a f t e r \ x d e f \ c s n a m e   c u r r # 1 \ e n d c s n a m e { \ s e c n o } 
 \ i f n u m # 1 > 0 \ c o u n t B = # 1   \ a d v a n c e \ c o u n t B   b y - 1 
 \ a d v a n c e n u m b e r { c h u n k \ t h e \ c o u n t B . \ e x p n u m b e r { c u r r \ t h e \ c o u n t B } } \ f i \ f i 
 \ i f p d f \ s p e c i a l { p d f :   o u t l i n e   # 1   < <   / T i t l e   ( \ t h e \ t o k s E )   / D e s t 
 [   @ t h i s p a g e   / F i t H   @ y p o s   ]   > > } \ f i 
 \ i f o n \ s t a r t s e c t i o n { \ b f # 3 . \ q u a d } \ i g n o r e s p a c e s } 
 \ d e f \ M N # 1 { \ p a r   %   c o m m o n   c o d e   f o r   \ M ,   \ N 
 { \ x d e f \ s e c s t a r { # 1 } \ l e t \ * = \ e m p t y \ x d e f \ s e c n o { # 1 } } %   r e m o v e   \ *   f r o m   s e c t i o n   n a m e 
 \ i f x \ s e c n o \ s e c s t a r   \ o n m a y b e   \ e l s e \ o n t r u e   \ f i 
 \ m a r k { { { \ t e n s y   x } \ s e c n o } { \ t h e \ g d e p t h } { \ t h e \ g t i t l e } } } 
 %   e a c h   \ m a r k   i s   { s e c t i o n   r e f e r e n c e   o r   n u l l } { d e p t h   p l u s   1 } { g r o u p   t i t l e } 
 %   \ O   i s   S c a n d i n a v i a n   l e t t e r   O - w i t h - s l a s h 
 %   \ P   i s   p a r a g r a p h   s i g n 
 \ d e f \ Q { \ n o t e { T h i s   c o d e   i s   c i t e d   i n   s e c t i o n } }   %   x r e f   f o r   m e n t i o n   o f   a   s e c t i o n 
 \ d e f \ Q s { \ n o t e { T h i s   c o d e   i s   c i t e d   i n   s e c t i o n s } }   %   x r e f   f o r   m e n t i o n s   o f   a   s e c t i o n 
 \ l e t \ R = \ l n o t   %   l o g i c a l   n o t 
 %   \ S   i s   s e c t i o n   s i g n 
 \ d e f \ T # 1 { \ l e a v e v m o d e   %   o c t a l ,   h e x   o r   d e c i m a l   c o n s t a n t 
 \ h b o x { $ \ d e f \ ? { \ k e r n . 2 e m } % 
 \ d e f \ $ # # 1 { \ e g r o u p _ { \ , \ r m # # 1 } \ b g r o u p } %   s u f f i x   t o   c o n s t a n t 
 \ d e f \ _ { \ c d o t   1 0 ^ { \ a f t e r g r o u p } } %   p o w e r   o f   t e n   ( v i a   d i r t y   t r i c k ) 
 \ l e t \ ~ = \ o c t   \ l e t \ ^ = \ h e x   { # 1 } $ } } 
 \ d e f \ U { \ n o t e { T h i s   c o d e   i s   u s e d   i n   s e c t i o n } }   %   x r e f   f o r   u s e   o f   a   s e c t i o n 
 \ d e f \ U s { \ n o t e { T h i s   c o d e   i s   u s e d   i n   s e c t i o n s } }   %   x r e f   f o r   u s e s   o f   a   s e c t i o n 
 \ l e t \ V = \ l o r   %   l o g i c a l   o r 
 \ l e t \ W = \ l a n d   %   l o g i c a l   a n d 
 \ d e f \ X # 1 : # 2 \ X { \ i f m m o d e \ g d e f \ X X { \ n u l l $ \ n u l l } \ e l s e \ g d e f \ X X { } \ f i   % $ %   s e c t i o n   n a m e 
 \ X X $ \ l a n g l e \ , $ { \ l e t \ I = \ n e # 2 \ e i g h t r m \ k e r n . 5 e m 
 2 2   A P P E N D I X   B      M A C R O S   F O R   F O R M A T T I N G 
 \ i f a c r o { \ p d f n o t e # 1 . } \ e l s e # 1 \ f i } $ \ , \ r a n g l e $ \ X X } 
 \ d e f \ Y { \ p a r \ y s k i p } 
 \ l e t \ Z = \ l e 
 \ l e t \ Z Z = \ l e t   %   n o w   y o u   c a n   \ w r i t e   t h e   c o n t r o l   s e q u e n c e   \ Z Z 
 \ l e t \ * = * 
 \ d e f \ X a n d { \ W }   \ d e f \ X a n d x e q { \ M R L { { \ A N D } { \ K } } }   \ d e f \ X b i t a n d { \ A N D } 
 \ d e f \ X b i t o r { \ O R }   \ d e f \ X c o m p l { \ C M }   \ d e f \ X n o t { \ R }   \ d e f \ X n o t x e q { \ I }   \ d e f \ X o r { \ V } 
 \ d e f \ X o r x e q { \ M R L { { \ O R } { \ K } } }   \ d e f \ X x o r { \ X O R }   \ d e f \ X x o r x e q { \ M R L { { \ X O R } { \ K } } } 
 % \ d e f \ o c t { \ h b o x { \ r m \ c h a r  2 3 \ k e r n - . 2 e m \ i t \ a f t e r g r o u p \ ? \ a f t e r g r o u p } }   %   W E B   s t y l e 
 % \ d e f \ h e x { \ h b o x { \ r m \ c h a r " 7 D \ t t \ a f t e r g r o u p } }   %   W E B   s t y l e 
 \ d e f \ o c t { \ h b o x { $ ^ \ c i r c $ \ k e r n - . 1 e m \ i t \ a f t e r g r o u p \ ? \ a f t e r g r o u p } } %   C W E B   s t y l e 
 \ d e f \ h e x { \ h b o x { $ ^ { \ s c r i p t s c r i p t s t y l e \ # } $ \ t t \ a f t e r g r o u p } }   %   C W E B   s t y l e 
 \ d e f \ v b # 1 { \ l e a v e v m o d e \ h b o x { \ k e r n 2 p t \ v r u l e \ v t o p { \ v b o x { \ h r u l e 
 \ h b o x { \ s t r u t \ k e r n 2 p t \ . { # 1 } \ k e r n 2 p t } } 
 \ h r u l e } \ v r u l e \ k e r n 2 p t } }   %   v e r b a t i m   s t r i n g 
 \ d e f \ o n m a y b e { \ l e t \ i f o n = \ m a y b e }   \ l e t \ m a y b e = \ i f t r u e 
 \ n e w i f \ i f o n   \ n e w i f \ i f t i t l e   \ n e w i f \ i f p a g e s a v e d 
 \ n e w i f \ i f h e a d e r 
 \ d e f \ l h e a d e r { \ h e a d e r t r u e \ m a i n f o n t \ t h e \ p a g e n o \ e i g h t r m \ q q u a d \ g r o u p t i t l e 
 \ h f i l l \ t i t l e \ q q u a d \ m a i n f o n t \ t o p s e c n o }   %   t o p   l i n e   o n   l e f t - h a n d   p a g e s 
 \ d e f \ r h e a d e r { \ h e a d e r t r u e \ m a i n f o n t \ t o p s e c n o \ e i g h t r m \ q q u a d \ t i t l e \ h f i l l 
 \ g r o u p t i t l e \ q q u a d \ m a i n f o n t \ t h e \ p a g e n o }   %   t o p   l i n e   o n   r i g h t - h a n d   p a g e s 
 \ d e f \ g r o u p t i t l e { \ l e t \ i = I \ l e t \ j = J \ u p p e r c a s e \ e x p a n d a f t e r { \ e x p a n d a f t e r 
 \ t a k e t h r e e \ t o p m a r k } } 
 \ d e f \ t o p s e c n o { \ e x p a n d a f t e r \ t a k e o n e \ t o p m a r k } 
 \ d e f \ t a k e o n e # 1 # 2 # 3 { # 1 } 
 \ d e f \ t a k e t w o # 1 # 2 # 3 { # 2 } 
 \ d e f \ t a k e t h r e e # 1 # 2 # 3 { # 3 } 
 \ d e f \ n u l l s e c { \ e i g h t r m \ k e r n - 2 e m }   %   t h e   \ k e r n - 2 e m   c a n c e l s   \ q q u a d   i n   h e a d e r s 
 \ l e t \ p a g e = \ p a g e b o d y   \ r a g g e d b o t t o m 
 %   \ d e f \ p a g e { \ b o x 2 5 5   } \ n o r m a l b o t t o m   %   f a s t e r ,   b u t   l o s e s   p l a i n   T e X   f o o t n o t e s 
 \ d e f \ n o r m a l o u t p u t # 1 # 2 # 3 { \ i f o d d \ p a g e n o \ h o f f s e t = \ p a g e s h i f t \ f i 
 \ s h i p o u t \ v b o x { 
 \ v b o x   t o \ f u l l p a g e h e i g h t { 
 \ i f t i t l e \ g l o b a l \ t i t l e f a l s e 
 \ e l s e \ h b o x   t o \ p a g e w i d t h { \ v b o x   t o 1 0 p t { } \ i f o d d \ p a g e n o   # 3 \ e l s e # 2 \ f i } \ f i 
 \ v f i l l # 1 } }   %   p a r a m e t e r   # 1   i s   t h e   p a g e   i t s e l f 
 \ g l o b a l \ a d v a n c e \ p a g e n o   b y 1 } 
 \ g t i t l e = { \ . { C W E B }   o u t p u t }   %   t h i s   r u n n i n g   h e a d   i s   r e s e t   b y   s t a r r e d   s e c t i o n s 
 \ m a r k { \ n o e x p a n d \ n u l l s e c 0 { \ t h e \ g t i t l e } } 
 \ d e f \ t i t l e { \ e x p a n d a f t e r \ u p p e r c a s e \ e x p a n d a f t e r { \ j o b n a m e } } 
 \ d e f \ t o p o f c o n t e n t s { \ c e n t e r l i n e { \ t i t l e f o n t \ t i t l e } \ v s k i p . 7 i n 
 \ v f i l l }   %   t h i s   m a t e r i a l   w i l l   s t a r t   t h e   t a b l e   o f   c o n t e n t s   p a g e 
 \ d e f \ s t a r t p d f { \ i f p d f t e x \ p d f c a t a l o g { / P a g e M o d e   / U s e O u t l i n e s } \ e l s e 
 \ i f p d f { \ s p e c i a l { p d f :   d o c v i e w   < <   / P a g e M o d e   / U s e O u t l i n e s   > > } } \ f i \ f i } 
 \ d e f \ b o t o f c o n t e n t s { \ v f i l l 
 \ c e n t e r l i n e { \ c o v e r n o t e } }   %   t h i s   m a t e r i a l   w i l l   e n d   t h e   t a b l e   o f   c o n t e n t s   p a g e 
 \ d e f \ c o v e r n o t e { } 
 \ d e f \ c o n t e n t s p a g e n u m b e r { 0 }   %   d e f a u l t   p a g e   n u m b e r   f o r   t a b l e   o f   c o n t e n t s 
 \ n e w d i m e n \ p a g e w i d t h   \ p a g e w i d t h = 6 . 5 i n   %   t h e   w i d t h   o f   e a c h   p a g e 
 \ n e w d i m e n \ p a g e h e i g h t   \ p a g e h e i g h t = 8 . 7 i n   %   t h e   h e i g h t   o f   e a c h   p a g e 
 \ n e w d i m e n \ f u l l p a g e h e i g h t   \ f u l l p a g e h e i g h t = 9 i n   %   p a g e   h e i g h t   i n c l u d i n g   h e a d l i n e s 
 \ n e w d i m e n \ p a g e s h i f t   \ p a g e s h i f t = 0 i n   %   s h i f t   r i g h t h a n d   p a g e s   w r t   l e f t h a n d   o n e s 
 \ d e f \ m a g n i f y # 1 { \ m a g = # 1 \ p a g e w i d t h = 6 . 5 t r u e i n \ p a g e h e i g h t = 8 . 7 t r u e i n 
 \ f u l l p a g e h e i g h t = 9 t r u e i n \ s e t p a g e } 
 \ d e f \ s e t p a g e { \ h s i z e \ p a g e w i d t h \ v s i z e \ p a g e h e i g h t }   %   u s e   a f t e r   c h a n g i n g   p a g e   s i z e 
 \ d e f \ c o n t e n t s f i l e { \ j o b n a m e . t o c }   %   f i l e   t h a t   g e t s   t a b l e   o f   c o n t e n t s   i n f o 
 \ d e f \ r e a d c o n t e n t s { \ i n p u t   \ c o n t e n t s f i l e } 
 \ d e f \ r e a d i n d e x { \ i n p u t   \ j o b n a m e . i d x } 
 \ d e f \ r e a d s e c t i o n s { \ i n p u t   \ j o b n a m e . s c n } 
 \ n e w w r i t e \ c o n t 
 \ o u t p u t { \ s e t b o x 0 = \ p a g e   %   t h e   f i r s t   p a g e   i s   g a r b a g e 
 \ o p e n o u t \ c o n t = \ c o n t e n t s f i l e 
 \ w r i t e \ c o n t { \ c a t c o d e    \ n o e x p a n d \ @ = 1 1 \ r e l a x }   %   \ m a k e a t l e t t e r 
 A P P E N D I X   B      M A C R O S   F O R   F O R M A T T I N G   2 3 
 \ g l o b a l \ o u t p u t { \ n o r m a l o u t p u t \ p a g e \ l h e a d e r \ r h e a d e r } } 
 \ s e t p a g e 
 \ v b o x   t o   \ v s i z e { }   %   t h e   f i r s t   \ t o p m a r k   w o n  t   b e   n u l l 
 \ d e f \ c h { \ n o t e { T h e   f o l l o w i n g   s e c t i o n s   w e r e   c h a n g e d   b y   t h e   c h a n g e   f i l e : } 
 \ l e t \ * = \ r e l a x } 
 \ n e w b o x \ s b o x   %   s a v e d   b o x   p r e c e d i n g   t h e   i n d e x 
 \ n e w b o x \ l b o x   %   l e f t h a n d   c o l u m n   i n   t h e   i n d e x 
 \ d e f \ i n x { \ p a r \ v s k i p 6 p t   p l u s   1 f i l   %   w e   a r e   b e g i n n i n g   t h e   i n d e x 
 \ d e f \ p a g e { \ b o x 2 5 5   }   \ n o r m a l b o t t o m 
 \ w r i t e \ c o n t { }   %   e n s u r e   t h a t   t h e   c o n t e n t s   f i l e   i s n  t   e m p t y 
 \ w r i t e \ c o n t { \ c a t c o d e    \ n o e x p a n d \ @ = 1 2 \ r e l a x }   %   \ m a k e a t o t h e r 
 \ c l o s e o u t \ c o n t   %   t h e   c o n t e n t s   i n f o r m a t i o n   h a s   b e e n   f u l l y   g a t h e r e d 
 \ o u t p u t { \ i f p a g e s a v e d \ n o r m a l o u t p u t { \ b o x \ s b o x } \ l h e a d e r \ r h e a d e r \ f i 
 \ g l o b a l \ s e t b o x \ s b o x = \ p a g e   \ g l o b a l \ p a g e s a v e d t r u e } 
 \ p a g e s a v e d f a l s e   \ e j e c t   %   e j e c t   t h e   p a g e - s o - f a r   a n d   p r e d e c e s s o r s 
 \ s e t b o x \ s b o x \ v b o x { \ u n v b o x \ s b o x }   %   t a k e   i t   o u t   o f   i t s   b o x 
 \ v s i z e = \ p a g e h e i g h t   \ a d v a n c e \ v s i z e   b y   - \ h t \ s b o x   %   t h e   r e m a i n i n g   h e i g h t 
 \ h s i z e = . 5 \ p a g e w i d t h   \ a d v a n c e \ h s i z e   b y   - 1 0 p t 
 %   c o l u m n   w i d t h   f o r   t h e   i n d e x   ( 2 0 p t   b e t w e e n   c o l s ) 
 \ p a r f i l l s k i p   0 p t   p l u s   . 6 \ h s i z e   %   t r y   t o   a v o i d   a l m o s t   e m p t y   l i n e s 
 \ d e f \ l r { L }   %   t h i s   t e l l s   w h e t h e r   t h e   l e f t   o r   r i g h t   c o l u m n   i s   n e x t 
 \ o u t p u t { \ i f   L \ l r \ g l o b a l \ s e t b o x \ l b o x = \ p a g e   \ g d e f \ l r { R } 
 \ e l s e \ n o r m a l o u t p u t { \ v b o x   t o \ p a g e h e i g h t { \ b o x \ s b o x \ v s s 
 \ h b o x   t o \ p a g e w i d t h { \ b o x \ l b o x \ h f i l \ p a g e } } } \ l h e a d e r \ r h e a d e r 
 \ g l o b a l \ v s i z e \ p a g e h e i g h t \ g d e f \ l r { L } \ g l o b a l \ p a g e s a v e d f a l s e \ f i } 
 \ m e s s a g e { I n d e x : } 
 \ p a r s k i p   0 p t   p l u s   . 5 p t 
 \ o u t e r \ d e f \ I # # 1 ,   # # 2 . { \ p a r \ h a n g i n d e n t 2 e m \ n o i n d e n t # # 1 : \ k e r n 1 e m 
 \ i f a c r o \ p d f n o t e # # 2 . \ e l s e # # 2 \ f i . }   %   i n d e x   e n t r y 
 \ d e f \ [ # # 1 ] { $ \ u n d e r l i n e { # # 1 } $ }   %   u n d e r l i n e d   i n d e x   i t e m 
 \ r m   \ r i g h t s k i p 0 p t   p l u s   2 . 5 e m   \ t o l e r a n c e   1 0 0 0 0   \ l e t \ * = \ l a p s t a r 
 \ h y p h e n p e n a l t y   1 0 0 0 0   \ p a r i n d e n t 0 p t 
 \ r e a d i n d e x } 
 \ d e f \ f i n { \ p a r \ v f i l l \ e j e c t   %   t h i s   i s   d o n e   w h e n   w e   a r e   e n d i n g   t h e   i n d e x 
 \ i f p a g e s a v e d \ n u l l \ v f i l l \ e j e c t \ f i   %   o u t p u t   a   n u l l   i n d e x   c o l u m n 
 \ i f   L \ l r \ e l s e \ n u l l \ v f i l l \ e j e c t \ f i   %   f i n i s h   t h e   c u r r e n t   p a g e 
 \ p a r f i l l s k i p   0 p t   p l u s   1 f i l 
 \ d e f \ g r o u p t i t l e { N A M E S   O F   T H E   S E C T I O N S } 
 \ l e t \ t o p s e c n o = \ n u l l s e c 
 \ m e s s a g e { S e c t i o n   n a m e s : } 
 \ o u t p u t = { \ n o r m a l o u t p u t \ p a g e \ l h e a d e r \ r h e a d e r } 
 \ s e t p a g e 
 \ d e f \ n o t e # # 1 # # 2 . { \ q u a d { \ e i g h t r m # # 1 ~ \ i f a c r o { \ p d f n o t e # # 2 . } \ e l s e { # # 2 } \ f i . } } 
 \ d e f \ Q { \ n o t e { C i t e d   i n   s e c t i o n } }   %   c r o s s r e f   f o r   m e n t i o n   o f   a   s e c t i o n 
 \ d e f \ Q s { \ n o t e { C i t e d   i n   s e c t i o n s } }   %   c r o s s r e f   f o r   m e n t i o n s   o f   a   s e c t i o n 
 \ d e f \ U { \ n o t e { U s e d   i n   s e c t i o n } }   %   c r o s s r e f   f o r   u s e   o f   a   s e c t i o n 
 \ d e f \ U s { \ n o t e { U s e d   i n   s e c t i o n s } }   %   c r o s s r e f   f o r   u s e s   o f   a   s e c t i o n 
 \ d e f \ I { \ p a r \ h a n g i n d e n t   2 e m } \ l e t \ * = * 
 \ i f a c r o   \ d e f \ o u t s e c n a m e { N a m e s   o f   t h e   s e c t i o n s }   \ l e t \ X p d f \ X 
 \ i f p d f t e x   \ m a k e b o o k m a r k s   \ p d f d e s t   n a m e   { N O S }   f i t b 
 \ p d f o u t l i n e   g o t o   n a m e   { N O S }   c o u n t   - \ s e c n o   { \ o u t s e c n a m e } 
 \ d e f \ X # # 1 : # # 2 \ X { \ X p d f # # 1 : # # 2 \ X   \ f i r s t s e c n o # # 1 . % 
 { \ t o k s F = { } \ m a k e o u t l i n e t o k s # # 2 \ o u t l i n e d o n e \ o u t l i n e d o n e } % 
 \ p d f o u t l i n e   g o t o   n u m   \ t h e \ t o k s A   \ e x p a n d a f t e r { \ t h e \ t o k s E } } 
 \ e l s e \ i f p d f 
 \ s p e c i a l { p d f :   o u t l i n e   - 1   < <   / T i t l e   ( \ o u t s e c n a m e ) 
 / D e s t   [   @ t h i s p a g e   / F i t H   @ y p o s   ]   > > } 
 \ d e f \ X # # 1 : # # 2 \ X { \ X p d f # # 1 : # # 2 \ X   \ f i r s t s e c n o # # 1 . % 
 { \ t o k s F = { } \ m a k e o u t l i n e t o k s # # 2 \ o u t l i n e d o n e \ o u t l i n e d o n e } % 
 \ s p e c i a l { p d f :   o u t l i n e   0   < <   / T i t l e   ( \ t h e \ t o k s E ) 
 / A   < <   / S   / G o T o   / D   ( \ r o m a n n u m e r a l \ t h e \ t o k s A )   > >   > > } } 
 \ f i \ f i \ f i 
 \ r e a d s e c t i o n s } 
 \ d e f \ m a k e b o o k m a r k s { \ l e t \ Z Z = \ w r i t e b o o k m a r k l i n e   \ r e a d c o n t e n t s \ r e l a x } 
 \ d e f \ e x p n u m b e r # 1 { \ e x p a n d a f t e r \ i f x \ c s n a m e # 1 \ e n d c s n a m e \ r e l a x   0 % 
 \ e l s e   \ c s n a m e # 1 \ e n d c s n a m e   \ f i }   %   P e t r   O l s a k  s   m a c r o s   f r o m   t e x i n f o . t e x 
 \ d e f \ a d v a n c e n u m b e r # 1 { \ c o u n t A = \ e x p n u m b e r { # 1 } \ r e l a x   \ a d v a n c e \ c o u n t A   b y 1 
 \ e x p a n d a f t e r \ x d e f \ c s n a m e # 1 \ e n d c s n a m e { \ t h e \ c o u n t A } } 
 \ d e f \ w r i t e b o o k m a r k l i n e # 1 # 2 # 3 # 4 # 5 { { % 
 \ l e t \ ( = \ l e t   \ l e t \ ) = \ l e t   \ l e t \ [ = \ l e t   \ l e t \ ] = \ l e t   \ l e t \ / = \ l e t 
 2 4   A P P E N D I X   B      M A C R O S   F O R   F O R M A T T I N G 
 \ p d f o u t l i n e   g o t o   n u m   # 3   c o u n t   - \ e x p n u m b e r { c h u n k # 2 . # 3 }   { # 5 } } } 
 \ d e f \ c o n { \ p a r \ v f i l l \ e j e c t   %   f i n i s h   t h e   s e c t i o n   n a m e s 
 %   \ i f o d d \ p a g e n o \ e l s e \ t i t l e t r u e \ n u l l \ v f i l l \ e j e c t \ f i   %   f o r   d u p l e x   p r i n t e r s 
 \ r i g h t s k i p   0 p t   \ h y p h e n p e n a l t y   5 0   \ t o l e r a n c e   2 0 0 
 \ s e t p a g e   \ o u t p u t = { \ n o r m a l o u t p u t \ p a g e \ l h e a d e r \ r h e a d e r } 
 \ t i t l e t r u e   %   p r e p a r e   t o   o u t p u t   t h e   t a b l e   o f   c o n t e n t s 
 \ p a g e n o = \ c o n t e n t s p a g e n u m b e r 
 \ d e f \ g r o u p t i t l e { T A B L E   O F   C O N T E N T S } 
 \ m e s s a g e { T a b l e   o f   c o n t e n t s : } 
 \ t o p o f c o n t e n t s   \ s t a r t p d f 
 \ l i n e { \ h f i l   S e c t i o n \ h b o x   t o 3 e m { \ h s s   P a g e } } 
 \ l e t \ Z Z = \ c o n t e n t s l i n e 
 \ r e a d c o n t e n t s \ r e l a x   %   r e a d   t h e   c o n t e n t s   i n f o 
 \ b o t o f c o n t e n t s   \ e n d }   %   p r i n t   t h e   c o n t e n t s   p a g e ( s )   a n d   t e r m i n a t e 
 \ d e f \ c o n t e n t s l i n e # 1 # 2 # 3 # 4 # 5 { \ i f n u m # 2 = 0   \ s m a l l b r e a k \ f i 
 \ l i n e { \ c o n s e t u p { # 2 } # 1 
 \ r m \ l e a d e r s \ h b o x   t o   . 5 e m { . \ h f i l } \ h f i l 
 \   \ i f a c r o \ p d f l i n k { # 3 } { \ r o m a n n u m e r a l # 3 } \ e l s e # 3 \ f i \ h b o x   t o 3 e m { \ h s s # 4 } } } 
 \ d e f \ c o n s e t u p # 1 { \ i f c a s e # 1   \ b f   %   d e p t h   - 1   ( @ * * ) 
 \ o r   %   d e p t h   0   ( @ * ) 
 \ o r   \ h s k i p 2 e m   %   d e p t h   1   ( @ * 1 ) 
 \ o r   \ h s k i p 4 e m   \ o r   \ h s k i p 6 e m   \ o r   \ h s k i p 8 e m   \ o r   \ h s k i p 1 0 e m   %   d e p t h   2 , 3 , 4 , 5 
 \ e l s e   \ h s k i p 1 2 e m   \ f i }   %   d e p t h   6   o r   m o r e 
 \ d e f \ n o i n x { \ l e t \ i n x = \ e n d }   %   n o   i n d e x e s   o r   t a b l e   o f   c o n t e n t s 
 \ d e f \ n o s e c s { \ l e t \ F I N = \ f i n   \ d e f \ f i n { \ l e t \ p a r f i l l s k i p = \ e n d   \ F I N } } 
 %   n o   i n d e x   o f   s e c t i o n   n a m e s   o r   t a b l e   o f   c o n t e n t s 
 \ d e f \ n o c o n { \ l e t \ c o n = \ e n d }   %   n o   t a b l e   o f   c o n t e n t s 
 \ d e f \ t o d a y { \ i f c a s e \ m o n t h \ o r 
 J a n u a r y \ o r   F e b r u a r y \ o r   M a r c h \ o r   A p r i l \ o r   M a y \ o r   J u n e \ o r 
 J u l y \ o r   A u g u s t \ o r   S e p t e m b e r \ o r   O c t o b e r \ o r   N o v e m b e r \ o r   D e c e m b e r \ f i 
 \ s p a c e \ n u m b e r \ d a y ,   \ n u m b e r \ y e a r } 
 \ n e w c o u n t \ t w o d i g i t s 
 \ d e f \ h o u r s { \ t w o d i g i t s = \ t i m e   \ d i v i d e \ t w o d i g i t s   b y   6 0   \ p r i n t t w o d i g i t s 
 \ m u l t i p l y \ t w o d i g i t s   b y - 6 0   \ a d v a n c e \ t w o d i g i t s   b y \ t i m e   : \ p r i n t t w o d i g i t s } 
 \ d e f \ g o b b l e o n e 1 { } 
 \ d e f \ p r i n t t w o d i g i t s { \ a d v a n c e \ t w o d i g i t s 1 0 0 
 \ e x p a n d a f t e r \ g o b b l e o n e \ n u m b e r \ t w o d i g i t s 
 \ a d v a n c e \ t w o d i g i t s - 1 0 0   } 
 \ d e f \ T e X { { \ i f m m o d e \ i t \ f i 
 \ l e a v e v m o d e \ h b o x { T \ k e r n - . 1 6 6 7 e m \ l o w e r . 4 2 4 e x \ h b o x { E } \ h s k i p - . 1 2 5 e m   X } } } 
 \ d e f \ , { \ r e l a x \ i f m m o d e \ m s k i p \ t h i n m u s k i p \ e l s e \ t h i n s p a c e \ f i } 
 \ d e f \ d a t e t h i s { \ d e f \ s t a r t s e c t i o n { \ l e f t l i n e { \ s c \ t o d a y \   a t   \ h o u r s } \ b i g s k i p 
 \ l e t \ s t a r t s e c t i o n = \ s t s e c \ s t s e c } } 
 %   s a y    \ d a t e t h i s    i n   l i m b o ,   t o   g e t   y o u r   l i s t i n g   t i m e s t a m p e d   b e f o r e   s e c t i o n   1 
 \ d e f \ d a t e c o n t e n t s p a g e { % 
 \ d e f \ t o p o f c o n t e n t s { \ l e f t l i n e { \ s c \ t o d a y \   a t   \ h o u r s } \ b i g s k i p 
 \ c e n t e r l i n e { \ t i t l e f o n t \ t i t l e } \ v f i l l } }   %   t i m e s t a m p s   t h e   c o n t e n t s   p a g e 
 A P P E N D I X   C      N O T E S   O N   F O R M A T T I N G   2 5 
 A p p e n d i x   C :   H o w   t o   u s e   C W E B   m a c r o s 
 T h e   m a c r o s   i n   c w e b m a c   m a k e   i t   p o s s i b l e   t o   p r o d u c e   a   v a r i e t y   o f   f o r m a t s   w i t h o u t   e d i t i n g   t h e   o u t p u t   o f 
 C W E A V E ,   a n d   t h e   p u r p o s e   o f   t h i s   a p p e n d i x   i s   t o   e x p l a i n   s o m e   o f   t h e   p o s s i b i l i t i e s . 
 1 .   F o u r   f o n t s   h a v e   b e e n   d e c l a r e d   i n   a d d i t i o n   t o   t h e   s t a n d a r d   f o n t s   o f   P L A I N   f o r m a t :   Y o u   c a n   s a y 
  { \ m c   U N I X }    t o   g e t   U N I X   i n   m e d i u m - s i z e   c a p s ;   y o u   c a n   s a y    { \ s c   S T U F F }    t o   g e t   S T U F F   i n   s m a l l   c a p s ; 
 a n d   y o u   c a n   s e l e c t   t h e   l a r g i s h   f o n t s   \ t i t l e f o n t   a n d   \ t t i t l e f o n t   i n   t h e   t i t l e   o f   y o u r   d o c u m e n t ,   w h e r e 
 \ t t i t l e f o n t   i s   a   t y p e w r i t e r   s t y l e   o f   t y p e .   T h e r e   a r e   m a c r o s   \ U N I X /   a n d   \ C E E /   t o   r e f e r   t o   U N I X   a n d   C   w i t h 
 m e d i u m - s i z e   c a p s . 
 2 .   W h e n   y o u   m e n t i o n   a n   i d e n t i f i e r   i n   T E X   t e x t ,   y o u   n o r m a l l y   c a l l   i t    | i d e n t i f i e r |  .   B u t   y o u   c a n   a l s o 
 s a y    \ \ { i d e n t i f i e r }  .   T h e   o u t p u t   w i l l   l o o k   t h e   s a m e   i n   b o t h   c a s e s ,   b u t   t h e   s e c o n d   a l t e r n a t i v e   d o e s n  t   p u t 
 i d e n t i f i e r   i n t o   t h e   i n d e x ,   s i n c e   i t   b y p a s s e s   C W E A V E  s   t r a n s l a t i o n   f r o m   C   m o d e .   I n   t h e   s e c o n d   c a s e   y o u   m u s t 
 p u t   a   b a c k s l a s h   b e f o r e   e a c h   u n d e r l i n e   c h a r a c t e r   i n   t h e   i d e n t i f i e r . 
 3 .   T o   g e t   t y p e w r i t e r - l i k e   t y p e ,   a s   w h e n   r e f e r r i n g   t o    C W E B  ,   y o u   c a n   u s e   t h e    \ .    m a c r o   ( e . g . ,    \ . { C W E B }  ) . 
 I n   t h e   a r g u m e n t   t o   t h i s   m a c r o   y o u   s h o u l d   i n s e r t   a n   a d d i t i o n a l   b a c k s l a s h   b e f o r e   t h e   s y m b o l s   l i s t e d   a s    s p e c i a l 
 s t r i n g   c h a r a c t e r s    i n   t h e   i n d e x   t o   C W E A V E ,   i . e . ,   b e f o r e   b a c k s l a s h e s   a n d   d o l l a r   s i g n s   a n d   t h e   l i k e .   A    \      h e r e 
 w i l l   r e s u l t   i n   t h e   v i s i b l e   s p a c e   s y m b o l ;   t o   g e t   a n   i n v i s i b l e   s p a c e   f o l l o w i n g   a   c o n t r o l   s e q u e n c e   y o u   c a n   s a y 
  {   }  .   I f   t h e   s t r i n g   i s   l o n g ,   y o u   c a n   b r e a k   i t   u p   i n t o   s u b s t r i n g s   t h a t   a r e   s e p a r a t e d   b y    \ )    ;   t h e   l a t t e r   g i v e s   a 
 d i s c r e t i o n a r y   b a c k s l a s h   i f   T E X   h a s   t o   b r e a k   a   l i n e   h e r e . 
 4 .   T h e   t h r e e   c o n t r o l   s e q u e n c e s   \ p a g e w i d t h ,   \ p a g e h e i g h t ,   a n d   \ f u l l p a g e h e i g h t   c a n   b e   r e d e f i n e d   i n 
 t h e   l i m b o   s e c t i o n   a t   t h e   b e g i n n i n g   o f   y o u r   C W E B   f i l e ,   t o   c h a n g e   t h e   d i m e n s i o n s   o f   e a c h   p a g e .   T h e   d e f a u l t 
 s e t t i n g s 
 \ p a g e w i d t h = 6 . 5 i n 
 \ p a g e h e i g h t = 8 . 7 i n 
 \ f u l l p a g e h e i g h t = 9 i n 
 w e r e   u s e d   t o   p r e p a r e   t h i s   m a n u a l ;   \ f u l l p a g e h e i g h t   i s   \ p a g e h e i g h t   p l u s   r o o m   f o r   t h e   a d d i t i o n a l   h e a d i n g 
 a n d   p a g e   n u m b e r s   a t   t h e   t o p   o f   e a c h   p a g e .   I f   y o u   c h a n g e   a n y   o f   t h e s e   q u a n t i t i e s ,   y o u   s h o u l d   c a l l   t h e   m a c r o 
 \ s e t p a g e   i m m e d i a t e l y   a f t e r   m a k i n g   t h e   c h a n g e . 
 5 .   T h e   \ p a g e s h i f t   m a c r o   d e f i n e s   a n   a m o u n t   b y   w h i c h   r i g h t - h a n d   p a g e s   ( i . e . ,   o d d - n u m b e r e d   p a g e s )   a r e 
 s h i f t e d   r i g h t   w i t h   r e s p e c t   t o   l e f t - h a n d   ( e v e n - n u m b e r e d )   o n e s .   B y   a d j u s t i n g   t h i s   a m o u n t   y o u   m a y   b e   a b l e   t o 
 g e t   t w o - s i d e d   o u t p u t   i n   w h i c h   t h e   p a g e   n u m b e r s   l i n e   u p   o n   o p p o s i t e   s i d e s   o f   e a c h   s h e e t . 
 6 .   T h e   \ t i t l e   m a c r o   w i l l   a p p e a r   a t   t h e   t o p   o f   e a c h   p a g e   i n   s m a l l   c a p s ;   i t   i s   t h e   j o b   n a m e   u n l e s s   r e d e f i n e d . 
 7 .   T h e   f i r s t   p a g e   u s u a l l y   i s   a s s i g n e d   p a g e   n u m b e r   1 .   T o   s t a r t   o n   p a g e   1 6 ,   w i t h   c o n t e n t s   o n   p a g e   1 5 ,   s a y 
 t h i s :    \ d e f \ c o n t e n t s p a g e n u m b e r { 1 5 }   \ p a g e n o = \ c o n t e n t s p a g e n u m b e r   \ a d v a n c e \ p a g e n o   b y   1  . 
 8 .   T h e   m a c r o   \ i f t i t l e   w i l l   s u p p r e s s   t h e   h e a d e r   l i n e   i f   i t   i s   d e f i n e d   b y    \ t i t l e t r u e  .   T h e   n o r m a l   v a l u e 
 i s   \ t i t l e f a l s e   e x c e p t   f o r   t h e   t a b l e   o f   c o n t e n t s ;   t h u s ,   t h e   c o n t e n t s   p a g e   i s   u s u a l l y   u n n u m b e r e d . 
 T w o   m a c r o s   a r e   p r o v i d e d   t o   g i v e   f l e x i b i l i t y   t o   t h e   t a b l e   o f   c o n t e n t s :   \ t o p o f c o n t e n t s   i s   i n v o k e d   j u s t   b e f o r e 
 t h e   c o n t e n t s   i n f o   i s   r e a d ,   a n d   \ b o t o f c o n t e n t s   i s   i n v o k e d   j u s t   a f t e r .   H e r e  s   a   t y p i c a l   d e f i n i t i o n : 
 \ d e f \ t o p o f c o n t e n t s { \ n u l l \ v f i l l 
 \ t i t l e f a l s e   %   i n c l u d e   h e a d l i n e   o n   t h e   c o n t e n t s   p a g e 
 \ d e f \ r h e a d e r { \ m a i n f o n t   T h e   { \ t t   C W E A V E }   p r o c e s s o r \ h f i l } 
 \ c e n t e r l i n e { \ t i t l e f o n t   T h e   { \ t t i t l e f o n t   C W E A V E }   p r o c e s s o r } 
 \ v s k i p   1 5 p t   \ c e n t e r l i n e { ( V e r s i o n   3 . 6 4 ) }   \ v f i l l } 
 R e d e f i n i n g   \ r h e a d e r ,   w h i c h   i s   t h e   h e a d l i n e   f o r   r i g h t - h a n d   p a g e s ,   s u f f i c e s   i n   t h i s   c a s e   t o   p u t   t h e   d e s i r e d 
 i n f o r m a t i o n   a t   t h e   t o p   o f   t h e   c o n t e n t s   p a g e . 
 9 .   D a t a   f o r   t h e   t a b l e   o f   c o n t e n t s   i s   w r i t t e n   t o   a   f i l e   t h a t   i s   r e a d   a f t e r   t h e   i n d e x e s   h a v e   b e e n   T E X e d ; 
 t h e r e  s   o n e   l i n e   o f   d a t a   f o r   e v e r y   s t a r r e d   s e c t i o n .   T h e   f i l e   c o m m o n . t o c   m i g h t   l o o k   l i k e   t h i s : 
 \ Z Z   { I n t r o d u c t i o n } { 0 } { 1 } { 2 8 } { } 
 \ Z Z   { T h e   c h a r a c t e r   s e t } { 2 } { 5 } { 2 9 } { } 
 a n d   s o   o n .   T h e   \ t o p o f c o n t e n t s   m a c r o   c o u l d   r e d e f i n e   \ Z Z   s o   t h a t   t h e   i n f o r m a t i o n   a p p e a r s   i n   a n y   d e s i r e d 
 f o r m a t .   ( S e e   a l s o   p o i n t   1 9   b e l o w . ) 
 2 6   A P P E N D I X   C      N O T E S   O N   F O R M A T T I N G 
 1 0 .   S o m e t i m e s   i t   i s   n e c e s s a r y   o r   d e s i r a b l e   t o   d i v i d e   t h e   o u t p u t   o f   C W E A V E   i n t o   s u b f i l e s   t h a t   c a n   b e 
 p r o c e s s e d   s e p a r a t e l y .   F o r   e x a m p l e ,   t h e   l i s t i n g   o f   T E X   r u n s   t o   m o r e   t h a n   5 0 0   p a g e s ,   a n d   t h a t   i s   e n o u g h   t o 
 e x c e e d   t h e   c a p a c i t y   o f   m a n y   p r i n t i n g   d e v i c e s   a n d / o r   t h e i r   s o f t w a r e .   W h e n   a n   e x t r e m e l y   l a r g e   j o b   i s n  t   c u t 
 i n t o   s m a l l e r   p i e c e s ,   t h e   e n t i r e   p r o c e s s   m i g h t   b e   s p o i l e d   b y   a   s i n g l e   e r r o r   o f   s o m e   s o r t ,   m a k i n g   i t   n e c e s s a r y 
 t o   s t a r t   e v e r y t h i n g   o v e r . 
 H e r e  s   a   s a f e   w a y   t o   b r e a k   a   w o v e n   f i l e   i n t o   t h r e e   p a r t s :   S a y   t h e   p i e c e s   a r e   ,   ,   a n d   ,   w h e r e   e a c h   p i e c e 
 b e g i n s   w i t h   a   s t a r r e d   s e c t i o n .   A l l   m a c r o s   s h o u l d   b e   d e f i n e d   i n   t h e   o p e n i n g   l i m b o   s e c t i o n   o f   ,   a n d   c o p i e s   o f 
 t h i s   T E X   c o d e   s h o u l d   b e   p l a c e d   a t   t h e   b e g i n n i n g   o f     a n d   o f   .   I n   o r d e r   t o   p r o c e s s   t h e   p a r t s   s e p a r a t e l y ,   w e 
 n e e d   t o   t a k e   c a r e   o f   t w o   t h i n g s :   T h e   s t a r t i n g   p a g e   n u m b e r s   o f     a n d     n e e d   t o   b e   s e t   u p   p r o p e r l y ,   a n d   t h e 
 t a b l e   o f   c o n t e n t s   d a t a   f r o m   a l l   t h r e e   r u n s   n e e d s   t o   b e   a c c u m u l a t e d . 
 T h e   c w e b m a c   m a c r o s   i n c l u d e   t w o   c o n t r o l   s e q u e n c e s   \ c o n t e n t s f i l e   a n d   \ r e a d c o n t e n t s   t h a t   f a c i l i t a t e   t h e 
 n e c e s s a r y   p r o c e s s i n g .   W e   i n c l u d e    \ d e f \ c o n t e n t s f i l e { c o n t 1 }    i n   t h e   l i m b o   s e c t i o n   o f   ,   a n d   w e   i n c l u d e 
  \ d e f \ c o n t e n t s f i l e { c o n t 2 }    i n   t h e   l i m b o   s e c t i o n   o f   ;   t h i s   c a u s e s   T E X   t o   w r i t e   t h e   c o n t e n t s   d a t a   f o r   
 a n d     i n t o   c o n t 1 . t e x   a n d   c o n t 2 . t e x .   N o w   i n     w e   s a y 
 \ d e f \ r e a d c o n t e n t s { \ i n p u t   c o n t 1   \ i n p u t   c o n t 2   \ i n p u t   \ c o n t e n t s f i l e }   ; 
 t h i s   b r i n g s   i n   t h e   d a t a   f r o m   a l l   t h r e e   p i e c e s ,   i n   t h e   p r o p e r   o r d e r . 
 H o w e v e r ,   w e   s t i l l   n e e d   t o   s o l v e   t h e   p a g e - n u m b e r i n g   p r o b l e m .   O n e   w a y   t o   d o   i t   i s   t o   i n c l u d e   t h e   f o l l o w i n g 
 i n   t h e   l i m b o   m a t e r i a l   f o r   : 
 \ m e s s a g e { P l e a s e   t y p e   t h e   l a s t   p a g e   n u m b e r   o f   p a r t   1 :   } 
 \ r e a d   "1   t o   \ t e m p   \ p a g e n o = \ t e m p   \ a d v a n c e \ p a g e n o   b y   1 
 T h e n   y o u   s i m p l y   p r o v i d e   t h e   n e c e s s a r y   d a t a   w h e n   T E X   r e q u e s t s   i t ;   a   s i m i l a r   c o n s t r u c t i o n   i s   u s e d   a t   t h e 
 b e g i n n i n g   o f   . 
 T h i s   m e t h o d   c a n ,   o f   c o u r s e ,   b e   u s e d   t o   d i v i d e   a   w o v e n   f i l e   i n t o   a n y   n u m b e r   o f   p i e c e s . 
 1 1 .   S o m e t i m e s   i t   i s   n i c e   t o   i n c l u d e   t h i n g s   i n   t h e   i n d e x   t h a t   a r e   t y p e s e t   i n   a   s p e c i a l   w a y .   F o r   e x a m p l e ,   w e 
 m i g h t   w a n t   t o   h a v e   a n   i n d e x   e n t r y   f o r    T E X  .   C W E A V E   p r o v i d e s   t w o   s i m p l e   w a y s   t o   t y p e s e t   a n   i n d e x   e n t r y 
 ( u n l e s s   t h e   e n t r y   i s   a n   i d e n t i f i e r   o r   a   r e s e r v e d   w o r d ) :    @ ^    g i v e s   r o m a n   t y p e ,   a n d    @ .    g i v e s   t y p e w r i t e r   t y p e . 
 B u t   i f   w e   t r y   t o   t y p e s e t    T E X    i n   r o m a n   t y p e   b y   s a y i n g ,   e . g . ,    @ ^ \ T e X @ >  ,   t h e   b a c k s l a s h   c h a r a c t e r   g e t s   i n   t h e 
 w a y ,   a n d   t h i s   e n t r y   w o u l d n  t   a p p e a r   i n   t h e   i n d e x   w i t h   t h e   T  s . 
 T h e   s o l u t i o n   i s   t o   u s e   t h e    @ :    f e a t u r e ,   d e c l a r i n g   a   m a c r o   t h a t   s i m p l y   r e m o v e s   a   s o r t   k e y   a s   f o l l o w s : 
 \ d e f \ 9 # 1 { } 
 N o w   y o u   c a n   s a y ,   e . g . ,    @ : T e X } { \ T e X @ >    i n   y o u r   C W E B   f i l e ;   C W E A V E   p u t s   i t   i n t o   t h e   i n d e x   a l p h a b e t i c a l l y , 
 b a s e d   o n   t h e   s o r t   k e y ,   a n d   p r o d u c e s   t h e   m a c r o   c a l l    \ 9 { T e X } { \ T e X }    w h i c h   w i l l   e n s u r e   t h a t   t h e   s o r t   k e y   i s n  t 
 p r i n t e d . 
 A   s i m i l a r   i d e a   c a n   b e   u s e d   t o   i n s e r t   h i d d e n   m a t e r i a l   i n t o   s e c t i o n   n a m e s   s o   t h a t   t h e y   a r e   a l p h a b e t i z e d 
 i n   w h a t e v e r   w a y   y o u   m i g h t   w i s h .   S o m e   p e o p l e   c a l l   t h e s e   t r i c k s    s p e c i a l   r e f i n e m e n t s  ;   o t h e r s   c a l l   t h e m 
  k l u d g e s .  
 1 2 .   T h e   c o n t r o l   s e q u e n c e   \ s e c n o   i s   s e t   t o   t h e   n u m b e r   o f   t h e   s e c t i o n   b e i n g   t y p e s e t . 
 1 3 .   I f   y o u   w a n t   t o   l i s t   o n l y   t h e   s e c t i o n s   t h a t   h a v e   c h a n g e d ,   t o g e t h e r   w i t h   t h e   i n d e x ,   p u t   t h e   c o m m a n d 
  \ l e t \ m a y b e = \ i f f a l s e    i n   t h e   l i m b o   s e c t i o n   b e f o r e   t h e   f i r s t   s e c t i o n   o f   y o u r   C W E B   f i l e .   I t  s   c u s t o m a r y   t o 
 m a k e   t h i s   t h e   f i r s t   c h a n g e   i n   y o u r   c h a n g e   f i l e . 
 T h i s   f e a t u r e   h a s   a   T E X n i c a l   l i m i t a t i o n ,   h o w e v e r :   Y o u   c a n n o t   u s e   i t   t o g e t h e r   w i t h   c o n t r o l   s e q u e n c e s   l i k e 
 \ p r o c l a i m   o r   \ +   o r   \ n e w c o u n t   t h a t   p l a i n   T E X   h a s   d e c l a r e d   t o   b e    \ o u t e r  ,   b e c a u s e   T E X   r e f u s e s   t o   s k i p 
 s i l e n t l y   o v e r   s u c h   c o n t r o l   s e q u e n c e s .   O n e   w a y   t o   w o r k   a r o u n d   t h i s   l i m i t a t i o n   i s   t o   s a y 
 \ f i   \ l e t \ p r o c l a i m \ r e l a x   \ d e f \ p r o c l a i m { . . . }   \ i f o n 
 w h e r e   \ p r o c l a i m   i s   r e d e f i n e d   t o   b e   t h e   s a m e   a s   u s u a l   b u t   w i t h o u t   a n   \ o u t e r   q u a l i f i c a t i o n .   ( T h e   \ f i   h e r e 
 s t o p s   t h e   c o n d i t i o n a l   s k i p p i n g ,   a n d   t h e   \ i f o n   t u r n s   i t   b a c k   o n   a g a i n . )   S i m i l a r l y , 
 \ f i   \ n e w c o u n t \ n   \ i f o n 
 i s   a   s a f e   w a y   t o   u s e   \ n e w c o u n t .   P l a i n   T E X   a l r e a d y   p r o v i d e s   a   n o n - o u t e r   m a c r o   \ t a b a l i g n   t h a t   d o e s   t h e 
 A P P E N D I X   C      N O T E S   O N   F O R M A T T I N G   2 7 
 w o r k   o f   \ + ;   y o u   c a n   s a y 
 \ f i   \ l e t \ + \ t a b a l i g n   \ i f o n 
 i f   y o u   p r e f e r   t h e   s h o r t e r   n o t a t i o n   \ + . 
 1 4 .   T o   g e t   o u t p u t   i n   l a n g u a g e s   o t h e r   t h a n   E n g l i s h ,   r e d e f i n e   t h e   m a c r o s   \ A ,   \ A s ,   \ E T ,   \ E T s ,   \ Q ,   \ Q s ,   \ U , 
 \ U s ,   \ c h ,   \ f i n ,   \ c o n ,   \ t o d a y ,   \ d a t e t h i s ,   a n d   \ d a t e c o n t e n t s p a g e .   C W E A V E   i t s e l f   n e e d   n o t   b e   c h a n g e d . 
 1 5 .   S o m e   o u t p u t   c a n   b e   s e l e c t i v e l y   s u p p r e s s e d   w i t h   t h e   m a c r o s   \ n o a t l ,   \ n o i n x ,   \ n o s e c s ,   \ n o c o n . 
 1 6 .   A l l   a c c e n t s   a n d   s p e c i a l   t e x t   s y m b o l s   o f   p l a i n   T E X   f o r m a t   w i l l   w o r k   i n   C W E B   d o c u m e n t s   j u s t   a s   t h e y 
 a r e   d e s c r i b e d   i n   C h a p t e r   9   o f   T h e   T E X b o o k ,   w i t h   o n e   e x c e p t i o n .   T h e   d o t   a c c e n t   ( n o r m a l l y   \ . )   m u s t   b e 
 t y p e d   \ :   i n s t e a d . 
 1 7 .   S e v e r a l   c o m m e n t e d - o u t   l i n e s   i n   c w e b m a c . t e x   a r e   s u g g e s t i o n s   t h a t   u s e r s   m a y   w i s h   t o   a d o p t .   F o r 
 e x a m p l e ,   o n e   s u c h   l i n e   i n s e r t s   a   b l a n k   p a g e   i f   y o u   h a v e   a   d u p l e x   p r i n t e r .   A p p e n d i c e s   D ,   E ,   a n d   F   o f   t h e 
 c o m p l e t e   v e r s i o n   o f   t h i s   m a n u a l   a r e   p r i n t e d   u s i n g   a   c o m m e n t e d - o u t   o p t i o n   t h a t   s u b s t i t u t e s    !   f o r    =    i n 
 t h e   p r o g r a m   l i s t i n g s .   L o o k i n g   a t   t h o s e   a p p e n d i c e s   m i g h t   h e l p   y o u   d e c i d e   w h i c h   f o r m a t   y o u   l i k e   b e t t e r . 
 1 8 .   A n d r e a s   S c h e r e r   h a s   c o n t r i b u t e d   a   m a c r o   c a l l e d   \ p d f U R L   w i t h   w h i c h   o n e   c a n   s a y   t h i n g s   l i k e   t h e 
 f o l l o w i n g ,   a n y w h e r e   i n   t h e   T E X   p a r t s   o r   t h e   C   c o m m e n t s   o f   a   C W E B   f i l e : 
 Y o u   c a n   s e n d   e m a i l   t o   \ p d f U R L { t h e   a u t h o r } { m a i l t o : a n d r e a s . s c h e r e r @ @ p o b o x . c o m } 
 o r   v i s i t   \ p d f U R L { h i s   h o m e   p a g e } { h t t p : / / w w w . p o b o x . c o m / \ T I L D E / s c h e r e r } . 
 I n   a   P D F   d o c u m e n t ,   t h e   f i r s t   a r g u m e n t   w i l l   a p p e a r   i n   b l u e   a s   c l i c k a b l e   t e x t ;   t h e   A c r o b a t   r e a d e r ,   i f   c o r r e c t l y 
 c o n f i g u r e d ,   w i l l   t h e n   r e d i r e c t   t h o s e   l i n k s   t o   t h e   u s e r  s   b r o w s e r   a n d   o p e n   e i t h e r   t h e   e m a i l   c l i e n t   o r   t h e 
 H T M L   v i e w e r .   I n   a   h a r d c o p y   d o c u m e n t ,   b o t h   a r g u m e n t s   w i l l   b e   p r i n t e d   ( t h e   s e c o n d   i n   p a r e n t h e s e s 
 a n d   t y p e w r i t e r   t y p e ) .   C e r t a i n   s p e c i a l   c h a r a c t e r s   i n   a n   I n t e r n e t   a d d r e s s   n e e d   t o   b e   h a n d l e d   i n   a   s o m e w h a t 
 a w k w a r d   w a y ,   s o   t h a t   C W E A V E   a n d / o r   T E X   w i l l   n o t   c o n f u s e   t h e m   w i t h   f o r m a t t i n g   c o n t r o l s :   U s e   @ @   f o r   @   a n d 
 \ T I L D E /   f o r   ~   a n d   \ U N D E R /   f o r   _ . 
 1 9 .   P D F   d o c u m e n t s   c o n t a i n   b o o k m a r k s   t h a t   l i s t   a l l   t h e   m a j o r   g r o u p   t i t l e s   i n   t h e   t a b l e   o f   c o n t e n t s ,   s o m e 
 o f   w h i c h   w i l l   b e   s u b s i d i a r y   t o   o t h e r s   i f   t h e   d e p t h   f e a t u r e   o f   @ *   h a s   b e e n   u s e d .   S u c h   b o o k m a r k   e n t r i e s   a r e 
 a l s o   k n o w n   a s    o u t l i n e s .    M o r e o v e r ,   t h e   f i n a l   g r o u p   t i t l e ,    N a m e s   o f   t h e   s e c t i o n s  ,   c a n   b e   o p e n e d   u p   t o   l i s t 
 e v e r y   s e c t i o n   n a m e ;   A c r o b a t   u s e r s   c a n   t h e r e f o r e   n a v i g a t e   e a s i l y   t o   a n y   d e s i r e d   s e c t i o n . 
 T h e   m a c r o s   o f   c w e b m a c . t e x   a r e   c a r e f u l   t o    s a n i t i z e    a l l   t h e   n a m e s   t h a t   a p p e a r   a s   b o o k m a r k s ,   b y   r e m o v i n g 
 s p e c i a l   c h a r a c t e r s   a n d   f o r m a t t i n g   c o d e s   t h a t   a r e   i n a p p r o p r i a t e   f o r   t h e   l i m i t e d   t y p o g r a p h i c   c a p a b i l i t i e s   o f 
 P D F   o u t l i n e s .   F o r   e x a m p l e ,   o n e   s e c t i o n   o f   C W E A V E   i s   n a m e d    C a s e s   f o r   c a s e   l i k e    ,   w h i c h   i s   r e p r e s e n t e d   b y 
 t h e   T E X   c o d e    C a s e s   f o r   \ P B { \ \ { c a s e \ _ l i k e } }    i n   c w e a v e . t e x ;   i t s   s a n i t i z e d   n a m e   i s   s i m p l y    C a s e s   f o r 
 c a s e _ l i k e  .   ( W h e n   . p d f   f i l e s   a r e   p r o d u c e d ,   t h e   f i f t h   p a r a m e t e r   o f   e v e r y   \ Z Z   i n   t h e   . t o c   f i l e   i s   s e t   t o   t h e 
 s a n i t i z e d   f o r m   o f   t h e   f i r s t   p a r a m e t e r ;   s e e   p o i n t   9   a b o v e   a n d   p o i n t   2 0   b e l o w . ) 
 I n   g e n e r a l ,   s a n i t i z a t i o n   r e m o v e s   T E X   c o n t r o l   s e q u e n c e s   a n d   b r a c e s ,   e x c e p t   f o r   c o n t r o l   s e q u e n c e s   d e f i n e d 
 b y   C W E B   i t s e l f .   S u c h   a   t r a n s l a t i o n   w o r k s   m o s t   o f   t h e   t i m e ,   b u t   y o u   c a n   o v e r r i d e   t h e   d e f a u l t s   a n d   o b t a i n   a n y 
 t r a n s l a t i o n   t h a t   y o u   w a n t   b y   u s i n g   T E X n i c a l   t r i c k s .   F o r   e x a m p l e ,   a f t e r 
 \ s a n i t i z e c o m m a n d \ f o o { b a r } 
 t h e   c o n t r o l   s e q u e n c e   \ f o o   w i l l   s a n i t i z e   t o    b a r  .   A n d   a f t e r 
 \ d e f \ k l u j # 1 \ \ { f o o } 
 t h e   T E X   c o d e    \ k l u j   b a r \ \    w i l l   p r i n t   a s    f o o    b u t   s a n i t i z e   t o    b a r  ,   b e c a u s e   t h e   c o n t r o l   s e q u e n c e s   \ k l u j 
 a n d   \ \   a r e   r e m o v e d   b y   s a n i t i z a t i o n . 
 2 0 .   F u r t h e r m o r e ,   g r o u p   t i t l e s   c a n   b e   c o n v e r t e d   t o   a n   a r b i t r a r y   s a n i t i z e d   t e x t   w h i l e   a l s o   c h a n g i n g   t h e i r 
 f o r m   i n   r u n n i n g   h e a d l i n e s ,   b y   u s i n g   \ i f h e a d e r .   C o n s i d e r ,   f o r   e x a m p l e ,   a   C W E B   s o u r c e   f i l e   t h a t   b e g i n s   w i t h 
 t h e   t w o   l i n e s 
 \ d e f \ k l u j j # 1 \ \ { \ i f h e a d e r   F O O \ e l s e   f o o \ f i } 
 @ * C h i n e s e   \ k l u j j   b a r \ . 
 T h i s   c o d i n g   i n t r o d u c e s   a   m a j o r   g r o u p   e n t i t l e d    C h i n e s e   f o o  ,   w i t h   r u n n i n g   h e a d l i n e    C H I N E S E   F O O    a n d 
 t a b l e - o f - c o n t e n t s   e n t r y    C h i n e s e   f o o  .   T h e   c o r r e s p o n d i n g   b o o k m a r k   i s ,   h o w e v e r ,    C h i n e s e   b a r  .   A n d   t h e 
 c o r r e s p o n d i n g   . t o c   f i l e   e n t r y   i s    \ Z Z   { C h i n e s e   \ k l u j j   b a r \ \ } { 1 } { 1 } { 1 } { C h i n e s e   b a r }  . 
 