Index: doc/refrat/predefined.sed
===================================================================
--- doc/refrat/predefined.sed	(revision 41b3ddd04624d97d5e1685d41a9a93eb856d9e64)
+++ doc/refrat/predefined.sed	(revision bfee4484ec1bf80d775fb8ea3b6ec84c12bf8496)
@@ -1,4 +1,5 @@
-/\\begin{predefined}/,/\\end{predefined}/ !d
-/\\begin{predefined}/,/\\end{predefined}/ s/\\use{.*}//g
-/\\begin{predefined}/ d
-/\\end{predefined}/ d
+/\\predefined/,/\\end{lstlisting}/ !d
+/\\begin{lstlisting}/,/\\end{lstlisting}/ s/\\use{.*}//g
+/\\predefined/ d
+/\\begin{lstlisting}/ d
+/\\end{lstlisting}/ d
Index: doc/refrat/refrat.tex
===================================================================
--- doc/refrat/refrat.tex	(revision 41b3ddd04624d97d5e1685d41a9a93eb856d9e64)
+++ doc/refrat/refrat.tex	(revision bfee4484ec1bf80d775fb8ea3b6ec84c12bf8496)
@@ -30,11 +30,12 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-% Specialized macros used in the document.
-
+% Bespoke macros used in the document.
+
+\makeatletter
+% index macros
 \newcommand{\italic}[1]{\emph{\hyperpage{#1}}}
 \newcommand{\definition}[1]{\textbf{\hyperpage{#1}}}
 \newcommand{\see}[1]{\emph{see} #1}
 
-\makeatletter
 % Define some commands that produce formatted index entries suitable for cross-references.
 % ``\spec'' produces entries for specifications of entities.  ``\impl'' produces entries for their
@@ -56,8 +57,16 @@
     \indexentry{#2@{\lstinline$#2$}#1}{\thepage}}}\endgroup\@gtempa
     \if@nobreak \ifvmode\nobreak\fi\fi\@esphack}
-\makeatother
 %\newcommand{\use}[1]{\index{#1@{\lstinline$#1$}}}
 %\newcommand{\impl}[1]{\index{\protect#1@{\lstinline$\protect#1$}|definition}}
 
+% text inline and lowercase index: \Index{Inline and index text}
+% text inline and as-in index: \Index{Inline and Index text}
+% text inline but index with different as-is text: \Index[index text]{inline text}
+\newcommand{\Index}{\@ifstar\@sIndex\@Index}
+\newcommand{\@Index}[2][\@empty]{\lowercase{\def\temp{#2}}#2\ifx#1\@empty\index{\temp}\else\index{#1@{\protect#2}}\fi}
+\newcommand{\@sIndex}[2][\@empty]{#2\ifx#1\@empty\index{#2}\else\index{#1@{\protect#2}}\fi}
+\makeatother
+
+% blocks and titles
 \newcommand{\define}[1]{\emph{#1\/}\index{#1}}
 \newenvironment{rationale}{%
@@ -67,15 +76,11 @@
 }%
 \newcommand{\rewrite}{\(\Rightarrow\)}
-\newcommand{\rewriterules}{\paragraph{Rewrite Rules}\hskip1em\par\noindent}
-\newcommand{\examples}{\paragraph{Examples}\hskip1em\par\noindent}
-\newcommand{\semantics}{\paragraph{Semantics}\hskip1em\par\noindent}
-\newcommand{\constraints}{\paragraph{Constraints}\hskip1em\par\noindent}
-\newenvironment{predefined}{%
-  \paragraph{Predefined Identifiers}%
-%  \begin{code}%
-}{%
-%  \end{code}
-}%
-
+\newcommand{\rewriterules}{\paragraph{Rewrite Rules}~\par\noindent}
+\newcommand{\examples}{\paragraph{Examples}~\par\noindent}
+\newcommand{\semantics}{\paragraph{Semantics}~\par\noindent}
+\newcommand{\constraints}{\paragraph{Constraints}~\par\noindent}
+\newcommand{\predefined}{\paragraph{Predefined Identifiers}~\par\noindent}
+
+% BNF macros
 \def\syntax{\paragraph{Syntax}\trivlist\parindent=.5in\item[\hskip.5in]}
 \let\endsyntax=\endtrivlist
@@ -86,4 +91,7 @@
 \newcommand{\opt}{$_{opt}$\ }
 
+% adjust varioref package with default "section" and "page" titles, and optional title with faraway page numbers
+% \VRef{label} => Section 2.7, \VPageref{label} => page 17
+% \VRef[Figure]{label} => Figure 3.4, \VPageref{label} => page 17
 \renewcommand{\reftextfaceafter}{\unskip}
 \renewcommand{\reftextfacebefore}{\unskip}
@@ -95,25 +103,9 @@
 \newcommand{\VPageref}[2][page]{\ifx#1\@empty\else{#1}\nobreakspace\fi\pageref{#2}}
 
-% replace/adjust characters that look bad in sanserif
-\makeatletter
-\lst@CCPutMacro
-\lst@ProcessOther{"2D}{\lst@ttfamily{-{}}{{\ttfamily\upshape -}}} % replace minus
-\lst@ProcessOther{"3C}{\lst@ttfamily{<}{\texttt{<}}} % replace less than
-\lst@ProcessOther{"3E}{\lst@ttfamily{<}{\texttt{>}}} % replace greater than
-\lst@ProcessOther{"5E}{\raisebox{0.4ex}{$\scriptstyle\land\,$}} % circumflex
-\lst@ProcessLetter{"5F}{\lst@ttfamily{\char95}{{\makebox[1.2ex][c]{\rule{1ex}{0.1ex}}}}} % replace underscore
-%\lst@ProcessOther{"7E}{\raisebox{-.4ex}[1ex][0pt]{\textasciitilde}} % lower tilde
-\lst@ProcessOther{"7E}{\raisebox{0.3ex}{$\scriptstyle\sim\,$}} % lower tilde
-\@empty\z@\@empty
-
-\newcommand{\Index}{\@ifstar\@sIndex\@Index}
-\newcommand{\@Index}[2][\@empty]{\lowercase{\def\temp{#2}}#2\ifx#1\@empty\index{\temp}\else\index{#1@{\protect#2}}\fi}
-\newcommand{\@sIndex}[2][\@empty]{#2\ifx#1\@empty\index{#2}\else\index{#1@{\protect#2}}\fi}
-\makeatother
-
+% adjust listings macros
 \lstdefinelanguage{CFA}[ANSI]{C}%
-  {morekeywords={asm,_At,_Atomic,catch,catchResume,choose,_Complex,context,disable,dtype,enable,
-	fallthru,finally,forall,ftype,_Imaginary,lvalue,restrict,throw,throwResume,try,type,},
-}
+{morekeywords={asm,_At,_Atomic,catch,catchResume,choose,_Complex,context,disable,dtype,enable,
+fallthru,finally,forall,ftype,_Imaginary,lvalue,restrict,throw,throwResume,try,type,},
+}%
 
 \lstset{
@@ -129,5 +121,18 @@
 showtabs=true,
 tab=,
-}
+}%
+
+\makeatletter
+% replace/adjust listings characters that look bad in sanserif
+\lst@CCPutMacro
+\lst@ProcessOther{"2D}{\lst@ttfamily{-{}}{{\ttfamily\upshape -}}} % replace minus
+\lst@ProcessOther{"3C}{\lst@ttfamily{<}{\texttt{<}}} % replace less than
+\lst@ProcessOther{"3E}{\lst@ttfamily{<}{\texttt{>}}} % replace greater than
+\lst@ProcessOther{"5E}{\raisebox{0.4ex}{$\scriptstyle\land\,$}} % replace circumflex
+\lst@ProcessLetter{"5F}{\lst@ttfamily{\char95}{{\makebox[1.2ex][c]{\rule{1ex}{0.1ex}}}}} % replace underscore
+\lst@ProcessOther{"7E}{\raisebox{0.3ex}{$\scriptstyle\sim\,$}} % replace tilde
+%\lst@ProcessOther{"7E}{\raisebox{-.4ex}[1ex][0pt]{\textasciitilde}} % lower tilde
+\@empty\z@\@empty
+\makeatother
 
 \setcounter{secnumdepth}{3}     % number subsubsections
@@ -174,8 +179,8 @@
 
 The manual deliberately imitates the ordering of the {\c11} standard (although the section numbering
-differs). Unfortunately, this means that the manual contains more ``forward references'' than
-usual, and that it will be hard to follow if the reader does not have a copy of the {\c11} standard
-near-by. For a gentle introduction to \CFA, see the companion document ``An Overview of
-\CFA'' \cite{Ditchfield96:Overview}.
+differs). Unfortunately, this means the manual contains more ``forward references'' than usual,
+making it harder to follow if the reader does not have a copy of the {\c11} standard. For a simple
+introduction to \CFA, see the companion document ``An Overview of \CFA''
+\cite{Ditchfield96:Overview}.
 
 \begin{rationale}
@@ -201,8 +206,7 @@
 
 \section{Notation}
-The syntax notation used in this document is the same as is used in the {\c11} standard, with one
-exception: ellipsis in the definition of a nonterminal, as in ``\emph{declaration:} \ldots'',
-indicates that these rules extend a previous definition, which occurs in this document or in the
-{\c11} standard.
+The syntax notation used in this document is the same as in the {\c11} standard, with one exception:
+ellipsis in the definition of a nonterminal, as in ``\emph{declaration:} \ldots'', indicates that
+these rules extend a previous definition, which occurs in this document or in the {\c11} standard.
 
 
@@ -651,8 +655,8 @@
 
 \begin{rationale}
-The use of ``\lstinline$?$'' in identifiers means that some C programs are not \CFA programs.
-For instance, the sequence of characters ``\lstinline$(i < 0)?--i:i$'' is legal in a C program, but
-a \CFA compiler will detect a syntax error because it will treat ``\lstinline$?--$'' as an
-identifier, not as the two tokens ``\lstinline$?$'' and ``\lstinline$--$''.
+The use of ``\lstinline$?$'' in identifiers means that some C programs are not \CFA programs.  For
+instance, the sequence of characters ``\lstinline$(i < 0)?--i:i$'' is legal in a C program, but a
+\CFA compiler detects a syntax error because it treats ``\lstinline$?--$'' as an identifier, not
+as the two tokens ``\lstinline$?$'' and ``\lstinline$--$''.
 \end{rationale}
 
@@ -796,5 +800,5 @@
 \end{syntax}
 
-\paragraph{Predefined Identifiers}%
+\predefined
 \begin{lstlisting}
 const int 1;@\use{1}@
@@ -892,4 +896,5 @@
 \subsubsection{Array subscripting}
 
+\predefined
 \begin{lstlisting}
 forall( type T ) lvalue T ?[?]( T *, ptrdiff_t );@\use{ptrdiff_t}@
@@ -1132,4 +1137,5 @@
 \subsubsection{Postfix increment and decrement operators}
 
+\predefined
 \begin{lstlisting}
 _Bool ?++( volatile _Bool * ),
@@ -1464,4 +1470,5 @@
 \subsubsection{Prefix increment and decrement operators}
 
+\predefined
 \begin{lstlisting}
 _Bool ++?( volatile _Bool * ),
@@ -1648,4 +1655,5 @@
 \subsubsection{Address and indirection operators}
 
+\predefined
 \begin{lstlisting}
 forall( type T ) lvalue T *?( T * );
@@ -1683,4 +1691,5 @@
 \subsubsection{Unary arithmetic operators}
 
+\predefined
 \begin{lstlisting}
 int
@@ -1891,4 +1900,5 @@
 \end{lstlisting}
 
+\predefined
 \begin{lstlisting}
 int?*?( int, int ),
@@ -2034,4 +2044,5 @@
 \end{lstlisting}
 
+\predefined
 \begin{lstlisting}
 int?+?( int, int ),
@@ -2174,4 +2185,5 @@
 \end{lstlisting}
 
+\predefined
 \begin{lstlisting}
 int ?<<?( int, int ),
@@ -2224,4 +2236,5 @@
 \end{lstlisting}
 
+\predefined
 \begin{lstlisting}
 int ?<?( int, int ),
@@ -2302,4 +2315,5 @@
 \end{lstlisting}
 
+\predefined
 \begin{lstlisting}
 int ?==?( int, int ),
@@ -2419,4 +2433,5 @@
 \end{lstlisting}
 
+\predefined
 \begin{lstlisting}
 int ?&?( int, int );
@@ -2452,4 +2467,5 @@
 \end{lstlisting}
 
+\predefined
 \begin{lstlisting}
 int ?^?( int, int );
@@ -2485,4 +2501,5 @@
 \end{lstlisting}
 
+\predefined
 \begin{lstlisting}
 int ?|?( int, int );
@@ -2716,4 +2733,5 @@
 \subsubsection{Simple assignment}
 
+\predefined
 \begin{lstlisting}
 _Bool
@@ -3003,4 +3021,5 @@
 \subsubsection{Compound assignment}
 
+\predefined
 \begin{lstlisting}
 forall( type T ) T
