# AFT Output Elements.
# !!DO NOT EDIT!! This file was automatically generated by aft-compile v2.05a on Fri Jan  9 22:44:14 2004
# See http://www.maplefish.com/todd/aft.html for details.
package AFT_OUTPUT;

use vars qw ($filePreamble $filePostamble %elem %pragma_postvar);

$filePreamble = '';	# Holds preamble for output file.
$filePostamble = '';	# Holds postamble for output file.
%elem = ();		# Element commands for producing output file.%pragma_postvar = ();	# Variables for substitution post-filtering.


sub initElements {
	%pragma_postvar = (
	);
	%elem = (
		'StartFilteredVerbatim' =>	 '\begin{alltt}',
		'^****' =>	 '\paragraph*{%section%}\label{%section%}',
		'Image-center' =>	 '\begin{center}\epsfig{figure=%image%}\end{center}',
		'StrikeLine' =>	 '%%--- %line%',
		'StartTeletype' =>	 '{\tt ',
		'StartSmall' =>	 '{\rm\small ',
		'StartStrong' =>	 '{\bf ',
		'TableHeader' =>	 '%stuff% \=\=',
		'StartBulletList' =>	 '\begin{itemize}',
		'StartQuote' =>	 '\begin{quotation}',
		'EndBulletListElement' =>	 '',
		'NumberedListElement' =>	 '\item',
		'EndEmphasis' =>	 '}',
		'URL' =>	 '{\tt %text%}',
		'EndNamedList' =>	 '\end{itemize}',
		'^**' =>	 '\subsection*{%section%}\addcontentsline{toc}{subsection}{%section%}\label{%section%}',
		'TableRowStart' =>	 '',
		'EndBulletList' =>	 '\end{itemize}',
		'****' =>	 '\paragraph{%section%}\label{%section%}',
		'NBSPACE' =>	 '',
		'^*' =>	 '\section*{%section%}\addcontentsline{toc}{section}{%section%}\label{%section%}',
		'Target' =>	 '%text%\label{%target%}',
		'*' =>	 '\section{%section%}\label{%section%}',
		'EndTeletype' =>	 '}',
		'Image-right' =>	 '\begin{flushright}\epsfig{figure=%image%}\end{flushright}',
		'Title' =>	 '\title{%title%}',
		'EndParagraph' =>	 '',
		'interpolate' =>	 'no',
		'Author' =>	 '\author{%author%}\maketitle',
		'TableRowEnd' =>	 '\\\\ \hrulefill',
		'FullFilterFilteredVerbatim?' =>	 'Yes',
		'**' =>	 '\subsection{%section%}\label{%section%}',
		'EndNumberedListElement' =>	 '',
		'Image-left' =>	 '\begin{flushleft}\epsfig{figure=%image%}\end{flushleft}',
		'EndStrong' =>	 '}',
		'TOC' =>	 '\tableofcontents',
		'EndBlockedVerbatim' =>	 '\end{verbatim}',
		'Image' =>	 '\epsfig{figure=%image%}',
		'NamedListElement' =>	 '\item[] {\bf %name%} -',
		'StartNumberedList' =>	 '\begin{enumerate}',
		'TableCaption' =>	 '{\bf %caption%} \\\\',
		'InternalReference' =>	 '{\bf %text%}($\S$\ref{%target%})',
		'StartNamedList' =>	 '\begin{itemize}',
		'StartVerbatim' =>	 '\begin{verbatim}',
		'HorizontalLine' =>	 '\hrulefill',
		'EndNumberedList' =>	 '\end{enumerate}',
		'CommentLine' =>	 '%%--- %line%',
		'StartBlockedVerbatim' =>	 '\begin{verbatim}',
		'EndTable' =>	 '\end{tabbing} \hrulefill',
		'StartParagraph' =>	 '',
		'PreFilterVerbatim?' =>	 'No',
		'EndSect1' =>	 '',
		'Center' =>	 '\begin{center} %center% \end{center}',
		'EndSect2' =>	 '',
		'EndFilteredVerbatim' =>	 '\end{alltt}',
		'EndSect3' =>	 '',
		'EndSect4' =>	 '',
		'EndNamedListElement' =>	 '',
		'EndVerbatim' =>	 '\end{verbatim}',
		'StartEmphasis' =>	 '{\em ',
		'EndSmall' =>	 '}',
		'BulletListElement' =>	 '\item[$\bullet$]',
		'StartTable' =>	 '\hrulefill \\\\ \begin{tabbing}',
		'^***' =>	 '\subsubsection*{%section%}\addcontentsline{toc}{subsubsection}{%section%}\label{%section%}',
		'ID' =>	 'LaTeX',
		'EndQuote' =>	 '\end{quotation}',
		'TableElement' =>	 '%stuff%\>\>',
		'***' =>	 '\subsubsection{%section%}\label{%section%}',
	);

## Preamble:

$filePreamble = '%LaTeX 2.e output generated byt AFT
\documentclass{article}
\usepackage{epsfig}
\usepackage{alltt}
\usepackage{latexsym}
\parskip 5pt
\parindent 0pt
%\addtolength{\textwidth}{0.5in}
%\addtolength{\textheight}{0.75in}
\setlength{\evensidemargin}{0pt}
\setlength{\oddsidemargin}{0pt}
\setlength{\topmargin}{14pt}
\setlength{\headsep}{20pt}
\setlength{\marginparwidth}{5pt}
\setlength{\footskip}{1pt}
\setlength{\hoffset}{0pt}
\addtolength{\textwidth}{1.75in}
\addtolength{\textheight}{1.00in}
\pagestyle{headings}
\begin{document}
';

## Postamble:

$filePostamble = '\end{document}

';
}


## Prefilter subroutine:

sub prefilter {
   my ($line) = @_;
   $line=~s/\\.gif/\.eps/g;
   $line=~s/\$/\\\$/g;
   $line=~s/\\\\/%LiNeBrEaK%/g;
   $line=~s/\\([^\$])/\\(\\backslash\\)$1/g;
   $line=~s/\{\+(.*?)\+\}/%LeFtB%PlUs$1%PlUs%RiGhTB/g;
   $line=~s/\}\+(.*?)\+\{/%RiGhTB%PlUs$1%PlUs%LeFtB/g;
   $line=~s/\{\-(.*?)\-\}/%LeFtB%NeG$1%NeG%RiGhTB/g;
   $line=~s/\}\-(.*?)\-\{/%RiGhTB%NeG$1%NeG%LeFtB/g;
   $line=~s/[\{\}]/\\(\\$&\\)/g;
   $line=~s/%LeFtB/{/g;
   $line=~s/%RiGhTB/}/g;
   $line=~s/%PlUs/+/g;
   $line=~s/%NeG/-/g;
   $line=~s/%LiNeBrEaK%/\\\\/g;
   return $line;
}

## Postfilter subroutine:

sub postfilter {
   my ($line) = @_;
   $line=~s/LaTeX/\\LaTeX{}/g;
   $line=~s/[^a]TeX/\\TeX{}/g;
   $line=~s/"(.*?)"/``$1''/g;
   $line=~s/\014/\\newpage/g;
   $line=~s/[\^\~]/\\$&\{\}/g;
   $line=~s/\[/\\lbrack{}/g;
   $line=~s/\]/\\rbrack{}/g;
   $line=~s/\|/\\(\\\vert\\)/g;
   $line=~s/[\#\%\_\&]/\\$&/g;
   $line=~s/<([^>]+?)>\+=/\\(\\langle\\)$1\\(\\rangle\\)+\\(\\equiv\\)/g;
   $line=~s/<([^>]+?)>=/\\(\\langle\\)$1\\(\\rangle\\)\\(\\equiv\\)/g;
   $line=~s/<([^>]+\s+\d+\s*?)>/{\\em\\(\\langle\\)$1\\(\\rangle\\)}/g;
   $line=~s/[\<\>]/\\($&\\)/g;
   return $line;
}

1;
