--- /dev/null
+comm.tar.gz Communication Toolbox Documentation
+internals.tar.gz Scilab's internals Documentation
+intersci.tar.gz Intersci interface generator documentation
+intro.tar.gz Introduction to Scilab
+lmi.tar.gz Lmitool: Linear Matrix Inequalities Optimization Toolbox Documentation
+LaTeX-doc.tar.gz On line Manual
+metanet.tar.gz Metanet User's Guide and Tutorial
+scicos.tar.gz Scicos: a Dynamic System Builder and Simulator
+signal.tar.gz Signal Processing Toolbox Documentation
--- /dev/null
+\documentclass[11pt]{book}
+\usepackage{verbatim}
+\usepackage{makeidx}
+
+ \textheight=660pt
+ \textwidth=15cm
+ \topmargin=-27pt
+ \oddsidemargin=0.7cm
+ \evensidemargin=0.7cm
+ \marginparwidth=60pt
+\hbadness=10000 % do not want underfull box messages--there are
+ % usually lots in man pages
+\hfuzz=\maxdimen % no overfull box messages either
+
+\newcommand{\bs}{$\backslash$}
+\def\under{\underline}
+\def\dotdot{\ddot}
+\def\nwl{\hfill\break} % similar to LaTex's \newline but does not
+ % complain if there is no line to break
+\def\ind#1{\par\everypar{\hangindent=#1\hangafter=0\hskip-\parindent}}
+\def\tmpind#1{\par\hskip#1}
+\newenvironment{SEPcntr}{\begin{center}}{\end{center}}
+\def\cntr#1{\begin{SEPcntr} #1 \end{SEPcntr}}
+% displayed text, indented, justification off
+\def\displaybegin{\par\begingroup\medskip\narrower\narrower\noindent
+ \obeylines\obeyspaces}
+\def\displayend{\endgroup\smallskip\noindent}
+
+% try this TPlist environment
+\newcommand{\TPlistlabel}[1]{\mbox{#1}\hfil}
+\newenvironment{TPlist}[1]{
+\begin{list}{}
+ {
+ \let\makelabel\TPlistlabel
+ \settowidth{\labelwidth}{#1mm}
+ \setlength{\leftmargin}{\parmargin} % all paragraphs have this much
+ \addtolength{\leftmargin}{\labelwidth} % space for label
+ }
+ }{
+\end{list}}
+\def\trait{\begin{flushleft}\mbox{\hbox to \textwidth{\hrulefill}}
+ \end{flushleft}}
+
+
+\def\phead#1#2#3#4#5{\section{#1}}
+
+\setcounter{secnumdepth}{3}
+
+\def\Sdoc#1#2{#1 - #2}
+
+\def\Shead#1{\subsection{#1}}
+\def\Seealso#1{\subsection{See Also}}
+\def\Sauthor#1{\subsection{Author}}
+
+% For stuff to ignore
+\def\ignore#1{}
+
+%% Changing the default description Mode
+
+\def\scitemlabel#1{#1}
+
+\def\scitem{\list{}{\labelwidth\z@ \itemindent-\leftmargin
+ \itemsep=-\parsep \let\makelabel\scitemlabel}}
+
+\let\endscitem\endlist
+
+\let\undertext=\underline
+
+
+
+
+\def\vector#1{\left( \begin{array}{c} #1 \end{array}\right)}
+\def\matrixq#1{\left( \begin{array}{cc} #1 \end{array}\right)}
+\def\sciverb#1{\mbox{\tt #1}}
+\makeindex
+\includeonly{Chap1,Chap2,Chap3,Chap4,Chap5,Chap5-1,Chap5-2,Chap5-3,Chap6,Chap7,Chap8,Chap9,Chap10,Chap11,Chap12,Chap13,Chap14,Chap15,Chap16,Chap17,Chap19,Chap20,Chap21}
+\includeonly{Chap1}
+
+\begin{document}
+
+\input{couvert.tex}
+
+\chapter{Programming}
+ \include{Chap1}
+\chapter{Graphic Library }
+ \include{Chap2}
+\chapter{Utilities and Elementary Functions}
+ \include{Chap3}
+\chapter{Input/Output functions}
+ \include{Chap4}
+\chapter{Handling of function and libraries}
+ \include{Chap5}
+\chapter{Strings manipulations}
+ \include{Chap5-1}
+\chapter{Dialogs}
+ \include{Chap5-2}
+\chapter{Utilities}
+ \include{Chap5-3}
+\chapter{General System and Control macros}
+ \include{Chap6}
+\chapter{Robust control toolbox}
+ \include{Chap7}
+\chapter{Non-linear tools (optimization and simulation) }
+ \include{Chap8}
+\chapter{Signal Processing toolbox}
+ \include{Chap9}
+ \include{Chap14}
+\chapter{Polynomial calculations}
+ \include{Chap10}
+\chapter{Linear Algebra}
+ \include{Chap11}
+\chapter{Metanet}
+ \include{Chap12}
+\chapter{Scicos}
+ \include{Chap15}
+\chapter{Sound}
+ \include{Chap16}
+\chapter{Cumulative Distribution Functions, Inverses, Random variables}
+ \include{Chap17}
+\chapter{Tools for dynamical systems}
+ \include{Chap13}
+\chapter{TCL/Tk interface}
+ \include{Chap19}
+\chapter{Language and data translation tools}
+ \include{Chap20}
+\chapter{Interprocess communication toolbox}
+ \include{Chap21}
+\printindex
+\end{document}
--- /dev/null
+heading_prefix "{\\bf \\large "
+heading_suffix "}"
+headings_flag 1
--- /dev/null
+\documentstyle[verbatim,tr2latex/troffman,makeidx]{book}
+ \textheight=660pt
+ \textwidth=15cm
+ \topmargin=-27pt
+ \oddsidemargin=0.7cm
+ \evensidemargin=0.7cm
+ \marginparwidth=60pt
+\def\vector#1{\left( \begin{array}{c} #1 \end{array}\right)}
+\def\matrixq#1{\left( \begin{array}{cc} #1 \end{array}\right)}
+
+\makeindex
+\includeonly{Chap1,Chap2,Chap3,Chap4,Chap5,Chap5-1,Chap5-2,Chap5-3,Chap6,Chap7,Chap8,Chap9,Chap10,Chap11,Chap12,Chap13,Chap14,Chap15,Chap16,Chap17,Chap19,Chap20,Chap21}
+\includeonly{Chap3}
+
+\begin{document}
+
+\input{couvert.tex}
+
+\chapter{Programming}
+ \include{Chap1}
+\chapter{Graphic Library }
+ \include{Chap2}
+\chapter{Utilities and Elementary Functions}
+ \include{Chap3}
+\chapter{Input/Output functions}
+ \include{Chap4}
+\chapter{Handling of function and libraries}
+ \include{Chap5}
+\chapter{Strings manipulations}
+ \include{Chap5-1}
+\chapter{Dialogs}
+ \include{Chap5-2}
+\chapter{Utilities}
+ \include{Chap5-3}
+\chapter{General System and Control macros}
+ \include{Chap6}
+\chapter{Robust control toolbox}
+ \include{Chap7}
+\chapter{Non-linear tools (optimization and simulation) }
+ \include{Chap8}
+\chapter{Signal Processing toolbox}
+ \include{Chap9}
+ \include{Chap14}
+\chapter{Polynomial calculations}
+ \include{Chap10}
+\chapter{Linear Algebra}
+ \include{Chap11}
+\chapter{Metanet}
+ \include{Chap12}
+\chapter{Scicos}
+ \include{Chap15}
+\chapter{Sound}
+ \include{Chap16}
+\chapter{Cumulative Distribution Functions, Inverses, Random variables}
+ \include{Chap17}
+\chapter{Tools for dynamical systems}
+ \include{Chap13}
+\chapter{TCL/Tk interface}
+ \include{Chap19}
+\chapter{Language and data translation tools}
+ \include{Chap20}
+\chapter{Interprocess communication toolbox}
+ \include{Chap21}
+\printindex
+\end{document}
--- /dev/null
+\documentstyle[tr2latex/troffman,makeidx]{book}
+ \textheight=660pt
+ \textwidth=15cm
+ \topmargin=-27pt
+ \oddsidemargin=0.7cm
+ \evensidemargin=0.7cm
+ \marginparwidth=60pt
+\def\vector#1{\left( \begin{array}{c} #1 \end{array}\right)}
+\def\matrixq#1{\left( \begin{array}{cc} #1 \end{array}\right)}
+
+\makeindex
+%\includeonly{Chap1,Chap2,Chap3,Chap4,Chap5,Chap6,Chap7,Chap8,Chap2-1,Chap2-2,Chap2-3,Chap2-4,Chap2-5}
+%\includeonly{Chap2-5}
+
+\begin{document}
+
+%\input{couvert.tex}
+
+
+\chapter{Scicos}
+ \include{Chap2-5}
+
+\printindex
+\end{document}
--- /dev/null
+SHELL = /bin/sh
+
+include ../../Version.incl
+SCIDIR=../..
+SCIDOC=$(SCIDIR)/../$(SCIVERSION)/doc
+include ../../Makefile.incl
+
+FILES = Chap1.tex Chap2.tex Chap3.tex Chap4.tex Chap5.tex \
+ Chap6.tex Chap7.tex Chap8.tex Chap9.tex Chap10.tex \
+ Chap11.tex Chap12.tex Chap13.tex Chap14.tex Chap15.tex \
+ Chap16.tex Chap17.tex Chap19.tex Chap20.tex \
+ Chap21.tex Chap5-1.tex Chap5-2.tex Chap5-3.tex
+
+MAN = $(SCIDIR)/man/
+
+
+TR2TEX = tr2latex/translate
+LATEX = latex
+
+all:: $(SCIDOC)/Manual.ps
+
+SUBDIRS = tr2latex
+
+clean::
+ @case '${MFLAGS}' in *[ik]*) set +e;; esac; \
+ for i in $(SUBDIRS) ;\
+ do \
+ (cd $$i ; echo "making" clean "in LaTeX-doc/$$i..."; \
+ $(MAKE) $(MFLAGS) clean); \
+ done
+
+distclean::
+ @case '${MFLAGS}' in *[ik]*) set +e;; esac; \
+ for i in $(SUBDIRS) ;\
+ do \
+ (cd $$i ; echo "making" distclean "in LaTeX-doc/$$i..."; \
+ $(MAKE) $(MFLAGS) distclean); \
+ done
+
+$(SCIDOC)/Manual.ps: Tr2tex chapters couvert.tex couv2.ps
+ $(LATEX) Docu.tex
+ $(LATEX) Docu.tex
+ $(LATEX) Docu.tex
+ makeindex -s Docu.isty Docu
+ $(LATEX) Docu.tex
+ $(RM) $@
+ dvips -o $@ Docu.dvi
+
+pdf: Tr2tex chapters couvert.tex couv2.ps
+ awk '{if ($$1~"documentstyle") \
+ {printf "\\documentstyle[verbatim,tr2latex/troffman,makeidx,hyperref,times]{book}\n"} else {print $$0} }' \
+ Docu.tex > Docu_pdf.tex
+ $(LATEX) Docu_pdf.tex
+ $(LATEX) Docu_pdf.tex
+ $(LATEX) Docu_pdf.tex
+ makeindex -s Docu.isty Docu_pdf
+ $(LATEX) Docu_pdf.tex
+ dvips -z -o Manual_pdf.ps Docu_pdf.dvi
+ ps2pdf Manual_pdf.ps
+ mv Manual_pdf.pdf ../Manual.pdf
+
+couv2.ps: couv2.tex
+ $(LATEX) couv2
+ dvips -o couv2.ps couv2.dvi
+
+chapters: $(FILES)
+
+Tr2tex : tr2latex/*.c tr2latex/*.h
+ cd tr2latex ; $(MAKE) $(MFLAGS)
+
+Chap1.tex : $(TR2TEX) $(MAN)/programming/*.man
+ $(TR2TEX) -m $(MAN)/programming/?*.man > /tmp/Chap1.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap1.tex > Chap1.tex
+ $(RM) /tmp/Chap1.tex
+
+Chap2.tex : $(TR2TEX) $(MAN)/graphics/?*.man
+ $(TR2TEX) -m $(MAN)/graphics/?*.man > /tmp/Chap2.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap2.tex > Chap2.tex
+ $(RM) /tmp/Chap2.tex
+
+Chap3.tex : $(TR2TEX) $(MAN)/elementary/?*.man
+ $(TR2TEX) -m $(MAN)/elementary/?*.man > /tmp/Chap3.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap3.tex > Chap3.tex
+ $(RM) /tmp/Chap3.tex
+
+Chap4.tex : $(TR2TEX) $(MAN)/fileio/?*.man
+ $(TR2TEX) -m $(MAN)/fileio/?*.man > /tmp/Chap4.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap4.tex > Chap4.tex
+ $(RM) /tmp/Chap4.tex
+
+Chap5.tex : $(TR2TEX) $(MAN)/functions/?*.man
+ $(TR2TEX) -m $(MAN)/functions/?*.man > /tmp/Chap5.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap5.tex > Chap5.tex
+ $(RM) /tmp/Chap5.tex
+
+Chap5-1.tex : $(TR2TEX) $(MAN)/strings/?*.man
+ $(TR2TEX) -m $(MAN)/strings/?*.man > /tmp/Chap5-1.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap5-1.tex > Chap5-1.tex
+ $(RM) /tmp/Chap5-1.tex
+
+Chap5-2.tex : $(TR2TEX) $(MAN)/gui/?*.man
+ $(TR2TEX) -m $(MAN)/gui/?*.man > /tmp/Chap5-2.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap5-2.tex > Chap5-2.tex
+ $(RM) /tmp/Chap5-2.tex
+
+Chap5-3.tex : $(TR2TEX) $(MAN)/utilities/?*.man
+ $(TR2TEX) -m $(MAN)/utilities/?*.man > /tmp/Chap5-3.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap5-3.tex > Chap5-3.tex
+ $(RM) /tmp/Chap5-3.tex
+
+Chap6.tex : $(TR2TEX) $(MAN)/control/?*.man
+ $(TR2TEX) -m $(MAN)/control/?*.man > /tmp/Chap6.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap6.tex > Chap6.tex
+ $(RM) /tmp/Chap6.tex
+
+Chap7.tex : $(TR2TEX) $(MAN)/robust/?*.man
+ $(TR2TEX) -m $(MAN)/robust/?*.man > /tmp/Chap7.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap7.tex > Chap7.tex
+ $(RM) /tmp/Chap7.tex
+
+Chap8.tex : $(TR2TEX) $(MAN)/nonlinear/?*.man
+ $(TR2TEX) -m $(MAN)/nonlinear/?*.man > /tmp/Chap8.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap8.tex > Chap8.tex
+ $(RM) /tmp/Chap8.tex
+
+Chap9.tex : $(TR2TEX) $(MAN)/signal/?*.man
+ $(TR2TEX) -m $(MAN)/signal/?*.man > /tmp/Chap9.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap9.tex > Chap9.tex
+ $(RM) /tmp/Chap9.tex
+
+Chap10.tex : $(TR2TEX) $(MAN)/polynomials/?*.man
+ $(TR2TEX) -m $(MAN)/polynomials/?*.man > /tmp/Chap10.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap10.tex > Chap10.tex
+ $(RM) /tmp/Chap10.tex
+
+Chap11.tex : $(TR2TEX) $(MAN)/linear/?*.man
+ $(TR2TEX) -m $(MAN)/linear/?*.man > /tmp/Chap11.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap11.tex > Chap11.tex
+ $(RM) /tmp/Chap11.tex
+
+Chap12.tex : $(TR2TEX) $(MAN)/metanet/?*.man
+ $(TR2TEX) -m $(MAN)/metanet/?*.man > /tmp/Chap12.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap12.tex > Chap12.tex
+ $(RM) /tmp/Chap12.tex
+
+Chap13.tex : $(TR2TEX) $(MAN)/arma/?*.man
+ $(TR2TEX) -m $(MAN)/arma/?*.man > /tmp/Chap13.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap13.tex > Chap13.tex
+ $(RM) /tmp/Chap13.tex
+
+Chap14.tex : $(TR2TEX) $(MAN)/tdcs/?*.man
+ $(TR2TEX) -m $(MAN)/tdcs/?*.man > /tmp/Chap14.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap14.tex > Chap14.tex
+ $(RM) /tmp/Chap14.tex
+
+Chap15.tex : $(TR2TEX) $(MAN)/scicos/?*.man
+ @echo "\section{Scicos editor}" > /tmp/Chap15.tex
+ $(TR2TEX) -m $(MAN)/scicos/scicos.man >> /tmp/Chap15.tex
+ $(TR2TEX) -m $(MAN)/scicos/scicos_menus.man >> /tmp/Chap15.tex
+ @echo "\section{Blocks}" >> /tmp/Chap15.tex
+ $(TR2TEX) -m $(MAN)/scicos/?*_f.man >> /tmp/Chap15.tex
+ $(TR2TEX) -m $(MAN)/scicos/scifunc_block.man >> /tmp/Chap15.tex
+ @echo "\section{Data Structures}" >> /tmp/Chap15.tex
+ $(TR2TEX) -m $(MAN)/scicos/scicos_main.man >> /tmp/Chap15.tex
+ $(TR2TEX) -m $(MAN)/scicos/scicos_block.man >> /tmp/Chap15.tex
+ $(TR2TEX) -m $(MAN)/scicos/scicos_graphics.man >> /tmp/Chap15.tex
+ $(TR2TEX) -m $(MAN)/scicos/scicos_model.man >> /tmp/Chap15.tex
+ $(TR2TEX) -m $(MAN)/scicos/scicos_link.man >> /tmp/Chap15.tex
+ $(TR2TEX) -m $(MAN)/scicos/scicos_cpr.man >> /tmp/Chap15.tex
+ @echo "\section{Useful Functions}" >> /tmp/Chap15.tex
+ $(TR2TEX) -m $(MAN)/scicos/standard_*.man >> /tmp/Chap15.tex
+ $(TR2TEX) -m $(MAN)/scicos/scicosim.man >> /tmp/Chap15.tex
+ $(TR2TEX) -m $(MAN)/scicos/curblock.man >> /tmp/Chap15.tex
+ $(TR2TEX) -m $(MAN)/scicos/getblocklabel.man >> /tmp/Chap15.tex
+ $(TR2TEX) -m $(MAN)/scicos/?*scicosvars.man >> /tmp/Chap15.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap15.tex > Chap15.tex
+ $(RM) /tmp/Chap15.tex
+
+Chap16.tex : $(TR2TEX) $(MAN)/sound/?*.man
+ $(TR2TEX) -m $(MAN)/sound/?*.man > /tmp/Chap16.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap16.tex > Chap16.tex
+ $(RM) /tmp/Chap16.tex
+
+Chap17.tex : $(TR2TEX) $(MAN)/dcd/?*.man
+ $(TR2TEX) -m $(MAN)/dcd/?*.man > /tmp/Chap17.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap17.tex > Chap17.tex
+ $(RM) /tmp/Chap17.tex
+
+Chap19.tex : $(TR2TEX) $(MAN)/tksci/?*.man
+ $(TR2TEX) -m $(MAN)/tksci/?*.man > /tmp/Chap19.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap19.tex > Chap19.tex
+ $(RM) /tmp/Chap19.tex
+Chap20.tex : $(TR2TEX) $(MAN)/translation/?*.man
+ $(TR2TEX) -m $(MAN)/translation/?*.man > /tmp/Chap20.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap20.tex > Chap20.tex
+ $(RM) /tmp/Chap20.tex
+Chap21.tex : $(TR2TEX) $(MAN)/pvm/?*.man $(MAN)/comm/?*.man
+ $(TR2TEX) -m $(MAN)/pvm/?*.man > /tmp/Chap21.tex
+ $(TR2TEX) -m $(MAN)/comm/?*.man >> /tmp/Chap21.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/Chap21.tex > Chap21.tex
+ $(RM) /tmp/Chap21.tex
+
+clean::
+ $(RM) *.aux *.log Chap*.tex *.dvi *.ind *.idx *.ilg *.toc *.lot \
+ Docu_pdf.* *.tmp Manual_pdf.ps Warnings *.haux *.hind *.html
+
+distclean:: clean
--- /dev/null
+SHELL = /bin/sh
+
+include ../../../Makefile.incl
+
+TR2TEX = ../tr2latex/tr2tex
+
+all:: Readme.dvi
+
+Readme.dvi: example.tex
+ latex Readme.tex
+
+$(TR2TEX):
+ cd ../tr2latex ; $(MAKE) $(MFLAGS)
+
+example.tex: $(TR2TEX) example.1
+ $(TR2TEX) -m example.1 > /tmp/example.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/example.tex > example.tex
+ $(RM) /tmp/example.tex
+
+clean::
+ $(RM) *.aux *.log example.tex *.dvi
+distclean::
+ $(RM) *.aux *.log example.tex *.dvi
--- /dev/null
+\documentstyle[11pt,verbatim,../tr2latex/troffman]{article}
+ \textheight=660pt
+ \textwidth=15cm
+ \topmargin=-27pt
+ \oddsidemargin=0.7cm
+ \evensidemargin=0.7cm
+ \marginparwidth=60pt
+ \title{Tr2Tex for Scilab}
+ \author{J.Ph. Chancelier\thanks{Cergrene. Ecole Nationale des Ponts et Chauss\'ees, La Courtine 93167 Noisy le Grand C\'{e}dex }}
+
+\begin{document}\maketitle
+\def\verbatok#1{\expandafter\begin{verbatim}
+\input{#1}}
+
+\section{Modifications from the original tr2tex}
+I've slightly modified the tr2tex program as follows~:
+\begin{itemize}
+\item The translation for \verb+.TH+ and \verb+.SH+ have been modified.
+\verb+.SH NAME+ has a special translation, the line following this
+statement must be of type
+\begin{verbatim}
+<one-word> - <sentence>
+\end{verbatim}
+\item \verb+.TP+ and \verb+.IP+ are translated so as to obtain
+description or itemize list in \LaTeX. The tag for \verb+.TP+
+is by default in verb mode (tt font). One can't mix \verb+.TP+ and
+\verb+.IP+ in the same enumeration ( the resulting code would not be
+properly indented )
+\item \verb+.RS+ and \verb+.RE+ are used to produce indented sequences
+of description or itemize~:
+\begin{verbatim}
+ .TP
+ x
+ 1234567890
+ .TP
+ x
+ 1234567890
+ .RS
+ .IP x
+ 1234567890
+ .IP y
+ 1234567890
+ .RE
+ .TP
+ z
+ 1234567890
+\end{verbatim}
+\item troff Comments beginning with \verb+\"LaTeX+ are recognized and the
+rest of the line is transmitted verbatim to \LaTeX. This allows the
+ writer to provide his own translations for the \LaTeX version of
+the documentation and to add whatever statement he wants to the LaTeX
+documentation. \verb+.LA+ behaves like \verb+\"LaTeX+~:
+\begin{verbatim}
+ \"LaTeX \[ x=\sum_{k=0}^n \alpha_k^2 \]
+ .LA \[ x=\sum_{k=0}^n \alpha_k^2 \]
+\end{verbatim}
+\item lines between \verb+.nf+ and \verb+.ni+ are supposed to be verbatim
+statements and are translated as such. If the region surrounded with
+\verb+.nf+ and \verb+.ni+ is too large tr2tex can fail,
+just cut your region into pieces.
+\item \verb+.HR.+ is ignored in nroff and will produce an horizontal
+line in \LaTeX
+\item \verb+\fV+ will switch to \verb+tt+ font inside text \verb+.Vb+
+will put is argument in \verb+tt+ font.
+\end{itemize}
+\section{An example : \LaTeX translation}
+\input{example}
+\section{An example : Troff code}
+\verbatok{example.1}
+\end{verbatim}
+
+
+\end{document}
--- /dev/null
+.TH macroname 2 "April 1993" "Scilab Group" "Scilab Function"
+.so sci.an
+.SH NAME
+macroname - keywords for whatis
+.SH CALLING SEQUENCE
+.nf
+[out1,out2] = macroname(input1,input2, [optional])
+.fi
+.SH PARAMETERS
+.TP 10
+input1
+: real matrix, meaning.
+.TP 10
+input2
+: character string, meaning.
+.TP
+out1
+: polynomial matrix
+.SH DESCRIPTION
+This is an example of a documentation item.
+Here, what the macro is doing. \fVX\fR (will appear in verb mode in Latex)
+is something ... \fVout1\fR is something else
+and the result is again something else. If \fVinput1\fR is a list then
+something else is made and blablabla.
+\"LaTeX \ignore{
+.nf
+ --n
+ \\
+ x= | alpha(k)**2
+ /
+ --k=0
+.fi
+\"LaTeX }
+.IG
+.nf
+ --n
+ \\
+ x= | alpha(k)**2
+ /
+ --k=0
+.fi
+.FI
+\"LaTeX \[ x=\sum_{k=0}^n \alpha_k^2 \]
+.LA \[ x=\sum_{k=0}^n \alpha_k^2 \]
+.PP
+.ul 1
+underline text
+.PP
+.B bold text
+.PP
+.I italic text
+.PP
+.PP
+.Vb verb in Latex x\y*%pi
+.PP
+Here a new paragraph which is indented in latex.
+This paragraph contains various comments.
+.LP
+Here a new paragraph which is not indented in latex.
+.SH USING TP AND IP
+IP and TP are used to produce description or itemize or enumerate in
+\"LaTeX \LaTeX.
+The tag for TP is translated in verb mode. One can mix sequences
+of TP or IP and indented levels are obtained with .RS
+in verb mode.
+.TP 20
+verb-tag
+: the item description in TP
+.TP
+verb-tag
+: the item description in TP
+.RS
+.IP 1
+an IP-list inserted in TP and surrounded with RS,RE.
+.IP 2
+second IP-item description. IP is used to produce enumerate itemize or
+description
+.RE
+.TP
+verb-tag
+: the item description in TP
+.LP
+.IP Roman
+: the item description of an IP-list
+.IP \fIItalic
+: the item description of an IP-list
+.IP \fBBod
+: the item description of an IP-list
+.IP \fVVerb
+: the item description of an IP-list
+.LP
+.SH REMARK
+Note that ...
+.SH SEE ALSO
+name1,name2,nam_e3
+.SH AUTHOR
+your name
--- /dev/null
+.de IG
+\"LaTeX \ignore{
+..
+.de FI
+\"LaTeX }
+..
+.de LA
+\"LaTeX
+..
+\" ignored in nroff
+.de HR
+\"LaTeX \barre
+..
+\" for verb in LaTeX, ignored in nroff
+.de Vb
+.it 1 }N
+.if !"\\$1"" \&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6
+..
+
--- /dev/null
+heading_prefix "{\\bf \\large "
+heading_suffix "}"
+headings_flag 1
--- /dev/null
+
+\documentstyle[verbatim,../tr2latex/troffman,makeidx]{book}
+ \title{Scilab 1.0 \\ On line doc }
+ \author{Scilab Group}
+ \textheight=660pt
+ \textwidth=470pt
+ \topmargin=-27pt
+ \oddsidemargin=0.7cm
+ \evensidemargin=0.7cm
+ \marginparwidth=60pt
+\def\vector#1{\left( \begin{array}{c} #1 \end{array}\right)}
+\def\matrixq#1{\left( \begin{array}{cc} #1 \end{array}\right)}
+
+\makeindex
+
+\begin{document}\maketitle
+
+\chapter{Test}
+\input{example}
+\printindex
+\end{document}
--- /dev/null
+SHELL = /bin/sh
+
+SCIDIR=../../..
+include ../../../Makefile.incl
+
+TR2TEX = ../tr2latex/tr2tex
+
+EX = binary
+
+all:: Docu.dvi
+
+Docu.dvi: example.tex
+ $(RM) example.1
+ latex Docu.tex
+ makeindex -s Docu.isty Docu
+ latex Docu
+
+$(TR2TEX):
+ cd ../tr2latex ; $(MAKE) $(MFLAGS)
+
+example.tex : $(TR2TEX) example.1
+ $(TR2TEX) -m example.1 > /tmp/example.tex
+ @sed -e 's/\\documentstyle/%\\documentstyle/' -e 's/\\end{document}//' -e 's/\\begin{document}//' /tmp/example.tex > example.tex
+ $(RM) /tmp/example.tex
+
+example.1:
+ cp $(SCIDIR)/man/*/$(EX).man example.1
+
+clean::
+ $(RM) *.aux *.log example.tex *.dvi *.ilg *.ind *.idx example.1
+distclean::
+ $(RM) *.aux *.log example.tex *.dvi *.ilg *.ind *.idx example.1
--- /dev/null
+
+\pagestyle{empty}
+
+\fbox{\hspace*{-2.cm}\begin{picture}(530.0,660.0)
+\hspace*{0.2cm}
+\special{psfile=toto.ps}
+\hspace*{-0.2cm}
+\special{psfile=slides.ps}
+
+\end{picture}}
+
+\newpage
+
+\vspace{8.cm}
+
+{\Huge\bf {SCILAB}}
+
+\bigskip
+
+{\Huge\bf {LIBRARY}}
+
+\bigskip
+
+{\Huge\bf {REFERENCE}}
+
+\bigskip
+
+{\Huge\bf {MANUAL}}
+
+\vspace{3.cm}
+
+{\Huge\bf {Scilab Group}}
+
+
+{\Large\bf
+INRIA Meta2 Project/ENPC Cergrene}
+
+\normalsize
+
+\vspace{12.cm}
+
+INRIA - Unit\'e de recherche de Rocquencourt - Projet Meta2
+
+Domaine de Voluceau - Rocquencourt - B.P. 105 - 78153 Le Chesnay Cedex (France)
+
+E-mail : scilab@inria.fr
+
+\pagenumbering{roman}
+\normalsize
+
+\tableofcontents
+
+\pagestyle{headings}
+
--- /dev/null
+cd tr2latex ; make
+cc -g -c tr2tex.c
+cc -g -c tr.c
+cc -g -c subs.c
+rm -f tr2tex
+cc -o tr2tex tr2tex.o tr.o subs.o -call_shared
+tr2latex/tr2tex -m ../../man/Man-Part1/man1/?*.1 > /tmp/Chap1.tex
+End of Processing ../../man/Man-Part1/man6/ode.6 file
+I cannot translate troff macro .Tp
+End of Processing ../../man/Man-Part1/man6/odedc.6 file
+
+tr2latex/tr2tex -m ../../man/Man-Part2/man1/?*.1 > /tmp/Chap2-1.tex
+End of Processing ../../man/Man-Part2/man1/aff2ab.1 file
+End of Processing ../../man/Man-Part2/man1/balanc.1 file
+End of Processing ../../man/Man-Part2/man1/bdiag.1 file
+End of Processing ../../man/Man-Part2/man1/chol.1 file
+End of Processing ../../man/Man-Part2/man1/coff.1 file
+End of Processing ../../man/Man-Part2/man1/colcomp.1 file
+End of Processing ../../man/Man-Part2/man1/cond.1 file
+End of Processing ../../man/Man-Part2/man1/det.1 file
+End of Processing ../../man/Man-Part2/man1/epsfin.1 file
+End of Processing ../../man/Man-Part2/man1/exp.1 file
+End of Processing ../../man/Man-Part2/man1/fineta.1 file
+End of Processing ../../man/Man-Part2/man1/fullrf.1 file
+End of Processing ../../man/Man-Part2/man1/fullrfk.1 file
+End of Processing ../../man/Man-Part2/man1/givens.1 file
+End of Processing ../../man/Man-Part2/man1/glever.1 file
+End of Processing ../../man/Man-Part2/man1/gschur.1 file
+End of Processing ../../man/Man-Part2/man1/gspec.1 file
+End of Processing ../../man/Man-Part2/man1/hess.1 file
+End of Processing ../../man/Man-Part2/man1/im_inv.1 file
+End of Processing ../../man/Man-Part2/man1/inv.1 file
+End of Processing ../../man/Man-Part2/man1/kernel.1 file
+End of Processing ../../man/Man-Part2/man1/kroneck.1 file
+End of Processing ../../man/Man-Part2/man1/leverrier.1 file
+End of Processing ../../man/Man-Part2/man1/linsolve.1 file
+End of Processing ../../man/Man-Part2/man1/lu.1 file
+End of Processing ../../man/Man-Part2/man1/ludel.1 file
+End of Processing ../../man/Man-Part2/man1/lufact.1 file
+End of Processing ../../man/Man-Part2/man1/luget.1 file
+End of Processing ../../man/Man-Part2/man1/lusolve.1 file
+End of Processing ../../man/Man-Part2/man1/lyap.1 file
+End of Processing ../../man/Man-Part2/man1/nlev.1 file
+End of Processing ../../man/Man-Part2/man1/orth.1 file
+End of Processing ../../man/Man-Part2/man1/pbig.1 file
+End of Processing ../../man/Man-Part2/man1/pencan.1 file
+End of Processing ../../man/Man-Part2/man1/penlaur.1 file
+End of Processing ../../man/Man-Part2/man1/pinv.1 file
+End of Processing ../../man/Man-Part2/man1/polar.1 file
+End of Processing ../../man/Man-Part2/man1/proj.1 file
+End of Processing ../../man/Man-Part2/man1/projspec.1 file
+End of Processing ../../man/Man-Part2/man1/psmall.1 file
+End of Processing ../../man/Man-Part2/man1/qr.1 file
+End of Processing ../../man/Man-Part2/man1/quaskro.1 file
+End of Processing ../../man/Man-Part2/man1/range.1 file
+End of Processing ../../man/Man-Part2/man1/rank.1 file
+End of Processing ../../man/Man-Part2/man1/rcond.1 file
+End of Processing ../../man/Man-Part2/man1/rowcomp.1 file
+End of Processing ../../man/Man-Part2/man1/rowshuff.1 file
+End of Processing ../../man/Man-Part2/man1/schur.1 file
+End of Processing ../../man/Man-Part2/man1/spaninter.1 file
+End of Processing ../../man/Man-Part2/man1/spanplus.1 file
+End of Processing ../../man/Man-Part2/man1/spantwo.1 file
+End of Processing ../../man/Man-Part2/man1/spclean.1 file
+End of Processing ../../man/Man-Part2/man1/spec.1 file
+End of Processing ../../man/Man-Part2/man1/sqroot.1 file
+End of Processing ../../man/Man-Part2/man1/sva.1 file
+End of Processing ../../man/Man-Part2/man1/svd.1 file
+End of Processing ../../man/Man-Part2/man1/sylv.1 file
+End of Processing ../../man/Man-Part2/man1/trace.1 file
+rm -f /tmp/Chap2-1.tex
+tr2latex/tr2tex -m ../../man/Man-Part2/man2/?*.2 > /tmp/Chap2-2.tex
+End of Processing ../../man/Man-Part2/man2/adj_lists.2 file
+End of Processing ../../man/Man-Part2/man2/check_graph.2 file
+End of Processing ../../man/Man-Part2/man2/circuit.2 file
+End of Processing ../../man/Man-Part2/man2/con_nodes.2 file
+End of Processing ../../man/Man-Part2/man2/connex.2 file
+End of Processing ../../man/Man-Part2/man2/find_path.2 file
+End of Processing ../../man/Man-Part2/man2/graph-list.2 file
+End of Processing ../../man/Man-Part2/man2/graph_2_mat.2 file
+End of Processing ../../man/Man-Part2/man2/is_connex.2 file
+End of Processing ../../man/Man-Part2/man2/load_graph.2 file
+End of Processing ../../man/Man-Part2/man2/make_graph.2 file
+End of Processing ../../man/Man-Part2/man2/mat_2_graph.2 file
+End of Processing ../../man/Man-Part2/man2/max_cap_path.2 file
+End of Processing ../../man/Man-Part2/man2/max_flow.2 file
+End of Processing ../../man/Man-Part2/man2/metanet.2 file
+End of Processing ../../man/Man-Part2/man2/min_lcost_cflow.2 file
+End of Processing ../../man/Man-Part2/man2/min_lcost_flow1.2 file
+End of Processing ../../man/Man-Part2/man2/min_lcost_flow2.2 file
+End of Processing ../../man/Man-Part2/man2/min_qcost_flow.2 file
+End of Processing ../../man/Man-Part2/man2/min_weight_tree.2 file
+End of Processing ../../man/Man-Part2/man2/netwindow.2 file
+End of Processing ../../man/Man-Part2/man2/netwindows.2 file
+End of Processing ../../man/Man-Part2/man2/nodes_2_path.2 file
+End of Processing ../../man/Man-Part2/man2/path_2_nodes.2 file
+End of Processing ../../man/Man-Part2/man2/plot_graph.2 file
+End of Processing ../../man/Man-Part2/man2/plot_graph1.2 file
+End of Processing ../../man/Man-Part2/man2/plot_graph2.2 file
+End of Processing ../../man/Man-Part2/man2/save_graph.2 file
+End of Processing ../../man/Man-Part2/man2/shortest_path.2 file
+End of Processing ../../man/Man-Part2/man2/show_arcs.2 file
+End of Processing ../../man/Man-Part2/man2/show_graph.2 file
+End of Processing ../../man/Man-Part2/man2/show_nodes.2 file
+End of Processing ../../man/Man-Part2/man2/strong_con_nodes.2 file
+End of Processing ../../man/Man-Part2/man2/strong_connex.2 file
+End of Processing ../../man/Man-Part2/man2/trans_closure.2 file
+rm -f /tmp/Chap2-2.tex
+tr2latex/tr2tex -m ../../man/Man-Part2/man2/?*.2 > /tmp/Chap2-3.tex
+End of Processing ../../man/Man-Part2/man2/adj_lists.2 file
+End of Processing ../../man/Man-Part2/man2/check_graph.2 file
+End of Processing ../../man/Man-Part2/man2/circuit.2 file
+End of Processing ../../man/Man-Part2/man2/con_nodes.2 file
+End of Processing ../../man/Man-Part2/man2/connex.2 file
+End of Processing ../../man/Man-Part2/man2/find_path.2 file
+End of Processing ../../man/Man-Part2/man2/graph-list.2 file
+End of Processing ../../man/Man-Part2/man2/graph_2_mat.2 file
+End of Processing ../../man/Man-Part2/man2/is_connex.2 file
+End of Processing ../../man/Man-Part2/man2/load_graph.2 file
+End of Processing ../../man/Man-Part2/man2/make_graph.2 file
+End of Processing ../../man/Man-Part2/man2/mat_2_graph.2 file
+End of Processing ../../man/Man-Part2/man2/max_cap_path.2 file
+End of Processing ../../man/Man-Part2/man2/max_flow.2 file
+End of Processing ../../man/Man-Part2/man2/metanet.2 file
+End of Processing ../../man/Man-Part2/man2/min_lcost_cflow.2 file
+End of Processing ../../man/Man-Part2/man2/min_lcost_flow1.2 file
+End of Processing ../../man/Man-Part2/man2/min_lcost_flow2.2 file
+End of Processing ../../man/Man-Part2/man2/min_qcost_flow.2 file
+End of Processing ../../man/Man-Part2/man2/min_weight_tree.2 file
+End of Processing ../../man/Man-Part2/man2/netwindow.2 file
+End of Processing ../../man/Man-Part2/man2/netwindows.2 file
+End of Processing ../../man/Man-Part2/man2/nodes_2_path.2 file
+End of Processing ../../man/Man-Part2/man2/path_2_nodes.2 file
+End of Processing ../../man/Man-Part2/man2/plot_graph.2 file
+End of Processing ../../man/Man-Part2/man2/plot_graph1.2 file
+End of Processing ../../man/Man-Part2/man2/plot_graph2.2 file
+End of Processing ../../man/Man-Part2/man2/save_graph.2 file
+End of Processing ../../man/Man-Part2/man2/shortest_path.2 file
+End of Processing ../../man/Man-Part2/man2/show_arcs.2 file
+End of Processing ../../man/Man-Part2/man2/show_graph.2 file
+End of Processing ../../man/Man-Part2/man2/show_nodes.2 file
+End of Processing ../../man/Man-Part2/man2/strong_con_nodes.2 file
+End of Processing ../../man/Man-Part2/man2/strong_connex.2 file
+End of Processing ../../man/Man-Part2/man2/trans_closure.2 file
+rm -f /tmp/Chap2-3.tex
+tr2latex/tr2tex -m ../../man/Man-Part2/man2/?*.2 > /tmp/Chap2-4.tex
+End of Processing ../../man/Man-Part2/man2/adj_lists.2 file
+End of Processing ../../man/Man-Part2/man2/check_graph.2 file
+End of Processing ../../man/Man-Part2/man2/circuit.2 file
+End of Processing ../../man/Man-Part2/man2/con_nodes.2 file
+End of Processing ../../man/Man-Part2/man2/connex.2 file
+End of Processing ../../man/Man-Part2/man2/find_path.2 file
+End of Processing ../../man/Man-Part2/man2/graph-list.2 file
+End of Processing ../../man/Man-Part2/man2/graph_2_mat.2 file
+End of Processing ../../man/Man-Part2/man2/is_connex.2 file
+End of Processing ../../man/Man-Part2/man2/load_graph.2 file
+End of Processing ../../man/Man-Part2/man2/make_graph.2 file
+End of Processing ../../man/Man-Part2/man2/mat_2_graph.2 file
+End of Processing ../../man/Man-Part2/man2/max_cap_path.2 file
+End of Processing ../../man/Man-Part2/man2/max_flow.2 file
+End of Processing ../../man/Man-Part2/man2/metanet.2 file
+End of Processing ../../man/Man-Part2/man2/min_lcost_cflow.2 file
+End of Processing ../../man/Man-Part2/man2/min_lcost_flow1.2 file
+End of Processing ../../man/Man-Part2/man2/min_lcost_flow2.2 file
+End of Processing ../../man/Man-Part2/man2/min_qcost_flow.2 file
+End of Processing ../../man/Man-Part2/man2/min_weight_tree.2 file
+End of Processing ../../man/Man-Part2/man2/netwindow.2 file
+End of Processing ../../man/Man-Part2/man2/netwindows.2 file
+End of Processing ../../man/Man-Part2/man2/nodes_2_path.2 file
+End of Processing ../../man/Man-Part2/man2/path_2_nodes.2 file
+End of Processing ../../man/Man-Part2/man2/plot_graph.2 file
+End of Processing ../../man/Man-Part2/man2/plot_graph1.2 file
+End of Processing ../../man/Man-Part2/man2/plot_graph2.2 file
+End of Processing ../../man/Man-Part2/man2/save_graph.2 file
+End of Processing ../../man/Man-Part2/man2/shortest_path.2 file
+End of Processing ../../man/Man-Part2/man2/show_arcs.2 file
+End of Processing ../../man/Man-Part2/man2/show_graph.2 file
+End of Processing ../../man/Man-Part2/man2/show_nodes.2 file
+End of Processing ../../man/Man-Part2/man2/strong_con_nodes.2 file
+End of Processing ../../man/Man-Part2/man2/strong_connex.2 file
+End of Processing ../../man/Man-Part2/man2/trans_closure.2 file
+rm -f /tmp/Chap2-4.tex
+tr2latex/tr2tex -m ../../man/Man-Part2/man2/?*.2 > /tmp/Chap2-5.tex
+End of Processing ../../man/Man-Part2/man2/adj_lists.2 file
+End of Processing ../../man/Man-Part2/man2/check_graph.2 file
+End of Processing ../../man/Man-Part2/man2/circuit.2 file
+End of Processing ../../man/Man-Part2/man2/con_nodes.2 file
+End of Processing ../../man/Man-Part2/man2/connex.2 file
+End of Processing ../../man/Man-Part2/man2/find_path.2 file
+End of Processing ../../man/Man-Part2/man2/graph-list.2 file
+End of Processing ../../man/Man-Part2/man2/graph_2_mat.2 file
+End of Processing ../../man/Man-Part2/man2/is_connex.2 file
+End of Processing ../../man/Man-Part2/man2/load_graph.2 file
+End of Processing ../../man/Man-Part2/man2/make_graph.2 file
+End of Processing ../../man/Man-Part2/man2/mat_2_graph.2 file
+End of Processing ../../man/Man-Part2/man2/max_cap_path.2 file
+End of Processing ../../man/Man-Part2/man2/max_flow.2 file
+End of Processing ../../man/Man-Part2/man2/metanet.2 file
+End of Processing ../../man/Man-Part2/man2/min_lcost_cflow.2 file
+End of Processing ../../man/Man-Part2/man2/min_lcost_flow1.2 file
+End of Processing ../../man/Man-Part2/man2/min_lcost_flow2.2 file
+End of Processing ../../man/Man-Part2/man2/min_qcost_flow.2 file
+End of Processing ../../man/Man-Part2/man2/min_weight_tree.2 file
+End of Processing ../../man/Man-Part2/man2/netwindow.2 file
+End of Processing ../../man/Man-Part2/man2/netwindows.2 file
+End of Processing ../../man/Man-Part2/man2/nodes_2_path.2 file
+End of Processing ../../man/Man-Part2/man2/path_2_nodes.2 file
+End of Processing ../../man/Man-Part2/man2/plot_graph.2 file
+End of Processing ../../man/Man-Part2/man2/plot_graph1.2 file
+End of Processing ../../man/Man-Part2/man2/plot_graph2.2 file
+End of Processing ../../man/Man-Part2/man2/save_graph.2 file
+End of Processing ../../man/Man-Part2/man2/shortest_path.2 file
+End of Processing ../../man/Man-Part2/man2/show_arcs.2 file
+End of Processing ../../man/Man-Part2/man2/show_graph.2 file
+End of Processing ../../man/Man-Part2/man2/show_nodes.2 file
+End of Processing ../../man/Man-Part2/man2/strong_con_nodes.2 file
+End of Processing ../../man/Man-Part2/man2/strong_connex.2 file
+End of Processing ../../man/Man-Part2/man2/trans_closure.2 file
+rm -f /tmp/Chap2-5.tex
--- /dev/null
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: toto.ps
+%%Creator: XV Version 3.01 Rev: 3/30/93 - by John Bradley
+%%BoundingBox: 306 39 520 642
+%%Pages: 1
+%%DocumentFonts:
+%%EndComments
+%%EndProlog
+
+%%Page: 1 1
+
+% remember original state
+/origstate save def
+
+% build a temporary dictionary
+20 dict begin
+
+% define string to hold a scanline's worth of data
+/pix 27 string def
+
+% lower left corner
+306 39 translate
+
+% size of image (on paper, in 1/72inch coords)
+213.98400 603.00000 scale
+
+% dimensions of data
+214 603 1
+
+% mapping matrix
+[214 0 0 -603 0 603]
+
+{currentfile pix readhexstring pop}
+image
+555554d55555555555555555555555555555555555555555555554
+aaaaa8eaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa8
+000000400000000000000000000000000000000000000000000000
+000004c00000000000000000000000000000000000000000000000
+7ffffefffffffffffffffffffffffffffffffffffffffffffffffc
+7ffffcfffffffffffffffffffffffffffffffffffffffffffffffc
+600000c00000000000000000000000000000000001111111111110
+655550caaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa7ababababab8
+680008c1f0006600300060600180003f80000000317e7e7e7e7e7c
+62aaa4d7fd5576aabaaaeaeaabaaaabfeaaaaaaab8b9b9b9b9b9b8
+692490c71c9246927124646491924930e4924924b5955959595958
+644924d6ad3cee7eb74972f3e5db927aebe778bd33ab8babababa8
+611088c7927e677f3f90ffe7f59fc8b167f3fe7e79d7efcfcfcfc4
+6a7c40d7f4e7ee637bc57fee19dde434ee3b9ccb33aba3a3a3a3b4
+613128c0f9d4669734e86067fdba72bfd1734dffb5535b5b5b5b50
+68b084d53cd2f67fb1c57577fb98e47f87fb2cff303a3a7a3a3a3c
+652128c68ec867773ad0e26649ba693257738ed0bafd7d7d7d7d7c
+604040d73ce7ee6379ca69773b9de2748e375ce771bcfabafafaf8
+6a8a94c7fafe66ff3fa164e7f1bfd43227f30d7f35331555191914
+612020d1f13eee3bf74a7269f59b817893bf5cbcb38bdb9bcbcbd8
+6a1548c5145022aa1221489242ba54824aa1252a49efc7c7d7d7c4
+60a210d0a20a904149141241141912292014808125a3b3b7ababb0
+6a1148ca09510a942242a114a15c491215422a54935b5551535554
+614a24c15224510291284a4214392244a0949109083a3b3e3a3b38
+6a2088d4248924544a451094828488910a4924a252fd7cfd7efcfc
+400000808000000000000000100000000000000000000000000000
+000200000000000000000000000000000000000000000000000000
+fffffffffffffffffffffffffffffffffffffffffffffffffffffc
+fffffffffffffffffffffffffffffffffffffffffffffffffffffc
+7ffffffffffffffffffffffffffffffffffffffffffffffffffffc
+7ffffffffffffffffffffffffffffffffffffffffffffffffffffc
+7ffffffffffffffffffffffffffffffffffffffffffffffffffffc
+7ffffffffffffffffffffffffffffffffffffffffffffffffffffc
+7ffffffffffffffffffffffffffffffffffffffffffffffffffffc
+7efeffdeeeffffffffffffffffffffffffffdffffefffffffffffc
+7feff77ffff7bdf7deeefbef777bfffffff77eeeeff77ff7bfdf7c
+7fffffffffffffdfffffffffffffdddddddffffffffff77ffdfffc
+7ffffffffffffffffffffffffffffffffffffffffffffffffffffc
+7dffffffffffffffffffefbffffffffffffffffffffffffffffdf4
+7ffeeffddddef7ff7bfffffeffefffffffffffffff7fffff7ffffc
+7feffff7ffffffffffddfffffbbf7ffffffffbbbbbf77ff7fbeffc
+7fffff7fffffff7ffffffffffffffbbbbbfeeffffffffbbffffffc
+7ffffffffffffffbfffffdf7efffffffffbbffffffffffffffffdc
+7efffffffffbdffff7ffdfffffffffffffffffffffffffffffbffc
+7ffdeffffbdfffffdfbf7fffffffdfffffffffffffffefffdefefc
+7fefff7fbffffefffffdffdf7ffdffffffffffeef7bbbfff7ffffc
+7ffffffbfffffff7ffffffffff77feeeefffff7ffffffff7fffffc
+7dfffffffffffbfffffffffffdfffffffeeff7ffffffff7ffffffc
+7ffffbffff7f7fffbff7fefff7ffffffffff7ffffffffffffffdf4
+7fff7ffffdfdfffffefffffbfffff7ffffffffffef7ffffffef7fc
+7fddffdfbfffffeffffffbffdfffdfffffffffff7ffdfffff7fffc
+705ffffdfffff7bf9fffe3ffffe3ffd97b7ff8f78fffeefbbffffc
+7ddfdefff7fff6ff5bffadffffddff7dff6ef73f7ff7ffffffffec
+7ddffbfffff7f3ffdfeeefef7fdefffdff7ff57f7ffffffffffffc
+7d539e3fe68fd4e3dc3fef8d3fd78e7de30ff77ffeffffefffefbc
+7dcddddff777f35ddddfc374df637775fd741effefffdfffffbffc
+7dddde7de79ff741dddfef75fdfd7d5da177fdff9fff7f7ffbfffc
+7ddd5fbff7ef775fdddfef75fffd7f7ddd57fbfdbfefffff7ffffc
+7ddddddff777f75dd437ef75ffdd777ddd7777f77dffffffffff7c
+7cd98a37e38bf7630ddfef8dbfe38e38e10ff0630ffffffffffffc
+7ffffffffffffffffdffbf7bfffff7fffeffffe7fffffdf7f7fbfc
+7fffffffbeeffffffdfffdfffbff7ffffbfff7bffff77fffdfbffc
+7fefffdffffff777ffffffffffddffff7ffbdfffff7fffff7ffff4
+7dffdf7fffffdfffff7fffffffffffbbffffffffefffffdffffffc
+7ffffffffbffffffbbfeffffbffffeffffffffffbffff7ffffffbc
+7fff7ffefffffffffffff7f7ff7ffffffffffffefffffffffffefc
+7ffdffffffeefffffffbfffffdfff7fff7deffbffff77f7fff77fc
+7fbffdffffbfffddffffffbffffffffffffffdffff7ffffdfffffc
+7effffffeffffeffffffffffeffbbfff7ffff7ffffffffffeffffc
+7fffffefbffff7ffef7ffffefffffff7ff7ffffdfffffbfffffffc
+7ffffffeffffffffffffbbffffffffdffffdfffffbffffeffffffc
+7ffdf7ffff7fbffffff7ffffffffff7ffbfffffffff7bfffbeefdc
+7ff7ffbffffefffeffffffdfffbffbffefffdff7ffdffffffffefc
+7dfffffffffffff7fbfffffefbfbbffffff7ffdfdfffff7ffffffc
+7ffffffffffbffbfffdfbeffffffffffffffff7ffffffdfdfffffc
+7fdfdffdfbeffefffffeffffffffffff7ffffdfffefff7fff7fffc
+7ffffef7ffffffffefffffffefffffffffbfffffffff7fffffbbfc
+7ffffffffffffbfffffffff7bfdffffbfffeeffffffdffffffffec
+7effffffefbfffffff7ffdfffffef77ffbffffff77f7fffbdffffc
+7ffdf7ffffffefff7ffbffffffffffffffffffffffdffffffffffc
+7fffdfffffffbffdfffff7ffff7fffffdff7ffffffffffdffeff7c
+7fefffbf7ffffff7fbffdfef7fffffffffdfffeffffffefffff7fc
+7dfffffbfdfbfffffffffffffffbdfddffffdeff7efff7fffffffc
+7fffffffffefffdfffdffffffbfffefffefffffffbffffff77fffc
+7fffffffffffff7ffffeffffffffffffffffffffffffffffffdfec
+780000000000000000000000000000000000000000000000000000
+784003fffffffffffffffffffffffffffffffffffffffffffffffc
+7b5ff3fffffffffffffffffffffffffffffffffffffffffffffffc
+78a013fffffffffffffffffffffffffffffffffffffffffffffffc
+795fdbfffffffffffffffffffffffffffffffffffffffffffffffc
+7aa043fffffffffffffffffffffffffff3fffffffffffffff1fffc
+795ebbfffffffffdfffffffffffffffffbffffbfbfffffffeefffc
+7942a3fffffffffdfffffffffffffffffbffffbfffffffffeffffc
+795aabffff86ee18747ffffffffe1bb87bdec30f3e1a3ff0efff84
+7aaaabffff7aededfbbfffff03fdebbfbbdefdbfbde9dfef43ff78
+795553ffff02ee7dfbfffffffffc0bb83bdec1bfbdebdfef6fff00
+795553ffff7f5f9dfbfffffffffdfd77bbdebdbfbdebdfef6fff7c
+795553ffff7b5deddbfffffffffded773bdcb9bbbdebdfef6fff78
+7aaaabffff87be1e3bfffffffffe1ef8a0e2c5c60e1bdff0efff84
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7952abfffffffffffffffffffffffffffffffffffffffffffffffc
+794d53ffffffffffffffffffffffffffffffffc7fe7ffffffffffc
+7ab2abfffffffffffffffffffffffffdffefffbbbf7ffffffffffc
+794a93ffffffffffffffffffffffffffffefffbfff7ffffffffffc
+795553ffff86f61c3fffffffff0e1a39e8c3ffbf3f7c3ff0dec384
+795553ffff7b6debdfffff81fef5eddde76fff0fbf7bdfef6dbd78
+7aaaabffff039c0bffffffffff3dfdfdef6fffbfbf781fe073817c
+795553ffff7f9dfbffffffffffcdfdfde76fffbfbf7bffeff3bf7c
+795553ffff7b6debdffffffffef5edfde8eeffbfbf7bdfef6dbd78
+795553ffff86f61c3fffffffff0e1df06ff1ffbe0c1c3ff0dec384
+7aaaabffffffffffffffffffffffffffeffffffffffffffffffffc
+795553ffffffffffffffffffffffffffeffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7952abfffffffffffffffffffffffff7ffffbfffffffffffffbf9c
+795553ffffffff7ffbfffffffffffff7ffffbffffffffffbffbfdc
+7aaaabfffffffffffbfffffffffffff7ffffbfffffffffffffbfdc
+795553ffff86f67c30f0fffffffffc3470e1bb87fddc3473e1a3dc
+79554bffff7b6f7bdbef7ffffe07fbd3af5eb77bfddfdbbbfe9ddc
+795553ffff039f7cfbf3fffffffffbf7a05f8f9ffddc1bfbe0bddc
+7aaaabffff7f9f7f3bfcfffffffffbf7afdfb7e7febbdbfbdebddc
+795553ffff7b6f7bdbaf7ffffffffbd7af5ebb7bfebb9bfbdc9ddc
+7952abffff86f41c3c70fffffffffc37b0e1bd87ff7c5be0e2a304
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+79554bfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffe1ffff3ffbffffffffffffffffc
+7952abffffffff7dfffffffffffdeffdfbffbffffffefbfffffffc
+795553fffffffffdfffffffffffdfffffbffbffffffffbfffffffc
+7aaaabffff86f6787ffffffffffdfc39fbe1a3ff15ecf0fffffffc
+795553ffff7b6f7dffffff81fffe1bddfbfe9dfee5eefbfffffffc
+79554bffff039f7dffffffffffffebfdfbe0bdfef5eefbfffffffc
+795553ffff7f9f7dffffffffffffebfdfbdebdfee5eefbfffffffc
+7aaaabffff7b6f7ddffffffffffdebddfbdc9dff15cefbbffffffc
+795553ffff86f41e3ffffffffffe1c3060e2a3fff6283c7ffffffc
+7952abfffffffffffffffffffffffffffffffffff7fffffffffffc
+795553fffffffffffffffffffffffffffffffffff7fffffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+79554bfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabffffffffffffffffcffffffffff0ffff9ffdfff86ffffffc
+795553fffffffeffffffffefffffffffef7fefdffdfff7affdfffc
+7952abfffffffeffffffffefffffffffefffffdffdfff7affffffc
+795553ffff86f43c3468e1efffffffffefe1cfdf0d1ff7a8f9c384
+7aaaabffff7b6efbdba77eeffffff81ff0deefdff4eff7a77dbd78
+795553ffff039ef81bef60efffffffffff5fefdf05eff7af7d817c
+79554bffff7f9efbfbef5eefffffffffff5fefdef5eff7af7dbf7c
+795553ffff7b6eebdbef5cefffffffffef5eefdee4eff7a77dbd78
+7aaaabffff86f71c3bef6283fffffffff0e18307151ff868ddc384
+795553ffffffffffffffffffffffffffffffffffffffffffddfffc
+7952abffffffffffffffffffffffffffffffffffffffffffe3fffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+79554bfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffff7fffffffffffffffffffffffffc
+7aaaabffffffffffffffffffdff7fffbfbeffffffffdfffbfffffc
+795553fffffffffffffffffffff7fffbffeffffffffdfffffffffc
+7952abffff86f61fffffffff9f161a30f3c3bdfe5e187473defffc
+790413ffff7af5efffffc0ffdee5e9dbfbefbdfeafedfbbbedfffc
+7a28a3ffff02f40fffffffffdef40bdbfbefbdfeae0dfbfbf3fffc
+79410bffff7ee5ffffffffffdef5fbdbfbefb9feadedfbfbf3fffc
+780a23ffff7b15efffffffffdee5ebdbbbeec5feadcddbfbedfffc
+7a504bffff87f61fffffffff07161bdc60f1fdfeee2e3be0defffc
+78828bfffffef7ffffffffffffffffffffffbdfffffffffffffffc
+7a1413ffffff0fffffffffffffffffffffffc3fffffffffffffffc
+78a0a3fffffffffffffffffffffffffffffffffffffffffffffffc
+7a050bfffffffffffffffffffffffffffffffffffffffffffffffc
+78a823fffffffffffffffffffffffffffffffffffffffffffffffc
+79014bfffffffffffffffffffffffffffffffffffffffffffffffc
+7a2a0bffffc7fffff9fffffffffffff9ffffff9fffffffffe7fffc
+790053ffffbbfffffdfffffffffffffdf7f7ffdffffffffff7fffc
+78aa83ffffbffffffdfffffffffffffdf7ffffdffffffffff7fffc
+7a001bffffbf0ddc3dfffffffffcbbdde1e7a3df0ffc3770f7bd84
+78aaa3ffff0ef5dfddffffff03fd5bddf7f79ddef7fbd77f77bdf8
+79000bffffbe05dc1dfffffffffd5bddf7f7bdde07f8177077bd80
+7a2aa3ffffbefebbddfffffffffd5bddf7f79ddefffbfaef77bd78
+78400bffffbef6bb9dfffffffffd5b9df777a3def7fbdaee77b970
+7a8aa3ffffbf0f7c507ffffffffddc5078c1bf070ffc3df141c588
+781013ffffffffffffffffffffffffffffffbffffffffffffffffc
+7aa28bffffffffffffffffffffffffffffffbffffffffffffffffc
+780413fffffffffffffffffffffffffffffffffffffffffffffffc
+7aa8a3fffffffffffffffffffffffffffffffffffffffffffffffc
+78010bfffffffffffffffffffffffffffffffffffffffffffffffc
+7aaa23fffffffffffffffffffffffffffffffffffffffffffffffc
+78004bffffc7fe7fffffffffff8ffcfffffffffffffffffffffffc
+7aaa8bffffbbbf7fffffffffff777effffffffffffffffffffdffc
+780013ffffbfff7fffffffffff7ffeffffffffffffffffffffdffc
+7aaaa3ffffbf3f7c3fffffffff7e7ef87fcbc3470e2c32f0d187fc
+78000bffff0fbf7bdfffff81fe1f7ef7bfd5fd3bf5dbd56f4edffc
+7aaaa3ffffbfbf781fffffffff7f7ef03fd5c17b05d815605edffc
+780013ffffbfbf7bffffffffff7f7ef7ffd5bd7af63bf56fdedffc
+7aaa8bffffbfbf7bdfffffffff7f7ef7bfd5b97ae5fbd56f5eddfc
+78004bffffbe0c1c3fffffffff7c18387fddc57b161c3770dee3fc
+7aaa23fffffffffffffffffffffffffffffffffffdeffffffffffc
+78010bfffffffffffffffffffffffffffffffffffe1ffffffffffc
+7aa8a3fffffffffffffffffffffffffffffffffffffffffffffffc
+780413fffffffffffffffffffffffffffffffffffffffffffffffc
+7aa28bfffffffffffffffffffffffffffffffffffffffffffffffc
+78104bfffffffffffffffffffffffffffffffffffffffffffffffc
+7a8a23ffffc7ffffdfffffffff8fffffbffffffbffffffffffe3fc
+78410bffffbbbfffdfffffffff777fffbff7fffbbfffffffffddfc
+7a28a3ffffbfffffdfffffffff7fffffbffffffbffffffffffdffc
+790413ffffbf3d1c5fffffffff7e7a38bfe7a38b3e1c387fe1dffc
+78a28bffff0fbceb9fffff81fe1f79d73ff79d73bdebd7bfde87fc
+7a104bffffbfbdebdfffffffff7f7bd7bff7bd7bbdf819ffdedffc
+788a23ffffbfbdebdfffffffff7f7bd7bff7bd7bbdfbfe7fdedffc
+79104bffffbfbdeb9fffffffff7f7bd73ff7bd73bdebd7bfdedffc
+7a2283ffffbe0dec5fffffffff7c1bd8bfc1bd8a0e1c387fe1dffc
+78441bfffffffffffffffffffffffffffffffffffffffffffffffc
+7a88a3fffffffffffffffffffffffffffffffffffffffffffffffc
+78110bfffffffffffffffffffffffffffffffffffffffffffffffc
+7aa223fffffffffffffffffffffffffffffffffffffffffffffffc
+78044bfffffffffffffffffffffffffffffffffffffffffffffffc
+7aa883fffffffffffffffffffffffffffffffffffffffffffffffc
+78011bffffc7ffffffffffffffffffffbffffffffffffffffefffc
+7aa823ffffbbbfffffffffffffffffffbbffffff7ffffffffefffc
+78054bffffbfffffffffffffffffffffbfffffff7ffffffffefffc
+7aa003ffffbf3defffffffff470dea38b3d1c5fe1e1bb868e2c3fc
+781553ffff0fbedfffffc0ffbaf5e9d73bcebbff7debbfb75cbdfc
+7ac92bffffbfbf3fffffffffbef5ebd7bbdebbff7deab837decffc
+792aabffffbfbf3fffffffffbef5ebd7bbdec7ff7deab7b7def3fc
+795553ffffbfbedfffffffffbef5cbd73bdebfff75eab737dcbdfc
+795553ffffbe0defffffffffbf0e2bd8a0dec3ff8e1d78b7e2c3fc
+7aaaabffffffffffffffffffffffffffffffbdfffffffffffffffc
+795553ffffffffffffffffffffffffffffffc3fffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+795553ffffc73ffffffffffffffffffffffeffffffffdffffffffc
+795553ffffbbbffffffffffffffffffffffeefffffffdffffffffc
+7aaaabffffbfbffffffffffffffffffffffeffffffffdffffffffc
+795553ffffbfbe1c347ffffffffd1c37a8e2cf4717fc586ed1fffc
+7954abffff0fbdebdbbfffff03feebd7a75cef3aeffb97aecefffc
+795353ffffbfbdebdbfffffffffefbd7af5eef7aeffbd7aadefffc
+7aacabffffbfbdebdbfffffffffefbd7af5eef7b1ffbd7aadefffc
+7952a3ffffbfbdebdbfffffffffefbd72f5cef7afffb97aadefffc
+79555bffffbe0e1c3bfffffffffefc38af62837b0ffc5875defffc
+79554bfffffffffffffffffffffffffffffffffef7fffffffffffc
+7aaaabffffffffffffffffffffffffffffffffff0ffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553ffffc7ffffffffffff9ffffffffffffffefffffffffffdfc
+7952abffffbbffffffffffffdffffffffffffffefffffffffffdfc
+795553ffffbfffffffffffffdffffffffffffffefffffffffffdfc
+7aaaabffffbf0d1fffffffffdf0d1c57b0e2c3feee1bd770d1c5fc
+795553ffff0ef6efffffc0ffdff4ebb7bf5dbdfeddebd76f6eb9fc
+79554bffffbef6ffffffffffdf05ebb7b05d81fe3c0bd56f6fbdfc
+795553ffffbef6ffffffffffdef5ec77af63bffeddfb956f6fbdfc
+7aaaabffffbef6ffffffffffdee5ebf72e5fbdfeedec556f6fb9fc
+795553ffffbf0effffffffff0715ec38b161c3fef61fdaf0efc5fc
+7952abfffffffffffffffffffffffbdfffdefffffffbdffffffffc
+795553fffffffffffffffffffffffc3fffe1fffffffc3ffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+79554bfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabffffc7fffffffffffffffffffffffffffffffffc7ffffffc
+795553ffffbbfffffff7fffffffffffffbffdfdffffffbbffffffc
+7952abffffbffffffff7ffffffffffffffffdffffffffbfffffffc
+795553ffffbf0d197861fffffffffa3473d1879e8e2ffbf0d19784
+7aaaabffff0ef6eabfb7fffffe07f9dbbbcedfde75dff0ef6eabf8
+795553ffffbef6fab837fffffffffbdbfbdedfdef5dffbef6fab80
+79554bffffbef6fab7b7fffffffff9dbfbdedfdef63ffbef6fab78
+795553ffffbef6fab7377ffffffffa3bfbdedddef5fffbef6fab70
+7aaaabffffbf0efbb8b8fffffffffbfbe0dee306f61ffbf0efbb88
+795553fffffffffffffffffffffffbfffffffffffdeffffffffffc
+7952abfffffffffffffffffffffffbfffffffffffe1ffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+79554bfffffffffffffffffffffffffffffffffffffffffffffffc
+795553ffffc7ffffffffffffff8ffffffffffffffffff87ffffffc
+7aaaabffffbbfffdffffffffff77fffbfffffffffffff7bffffffc
+795553ffffbffffdffffffffff7ffffbfffffffffffff7fffffffc
+7952abffffbf0d187fffffffff7e1a30e8e1a3ff0d1ff7ffdec384
+795553ffff0ef6edffffff81fe1deddbf77e9dfef6eff7ffdebd78
+7aaaabffffbef6fdffffffffff7dedfbf7e0bdfef6fff7ffdecf00
+795553ffffbef6fdffffffffff7dedfbf7debdfef6fff7ffdef37c
+79554bffffbef6fddfffffffff7dedfbb7dcbdfef6fff7bfdcbd78
+795553ffffbf0efe3fffffffff7e1dfc77e2bdff0efff87fe2c384
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7952abfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+79554bfffffffffffff8ffe3fffffffff8fffffffffffff8fffffc
+795553ffffffff7ffbf77fddffff7ffbf77fffffff7ffbf77ffffc
+7aaaabfffffffffffbf7ffdffffffffbf7fffffffffffbf7fffffc
+795553ffff468e7a30f7ffdf468e7a30f7ffc3468e7a30f7fffffc
+7952abffff3b7779dbe1ff873b7779dbe1ffbd3b7779dbe1fffffc
+795553ffff7b7f7bdbf7ffdf7b7f7bdbf7ffcf7b7f7bdbf7fffffc
+7aaaabffff3b7f7bdbf7ffdf3b7f7bdbf7fff33b7f7bdbf7fffffc
+795553ffff477f7bdbb7f1df477f7bdbb7f1bd477f7bdbb7fffffc
+79554bffff7f7c1bdc77f3df7f7c1bdc77f3c37f7c1bdc77fffffc
+795553ffff7fffffffffefff7fffffffffefff7ffffffffffffffc
+7aaaabffff7fffffffffffff7fffffffffffff7ffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7952abfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffc7fffe3fffffffc7ffffffffffffc7ffffffc
+79554bfffffffffffbbfffddfffffffbbffffffffffffbbffffffc
+795553fffffffffffbffffdffffffffbfffffffffffffbfffffffc
+7aaaabffff870e1a3bffffdf870e1a3bffffc3870e1a3bfffffffc
+795553ffff7af7e9d0ffff877af7e9d0ffffbd7af7e9d0ffffff00
+7952abffff9efe0bdbffffdf9efe0bdbffffcf9efe0bdbfffffffc
+795553ffffe6fdebdbffffdfe6fdebdbfffff3e6fdebdbfffffffc
+7aaaabffff7af5cbdbf8ffdf7af5cbdbf8ffbd7af5cbdbfffffffc
+795553ffff870e2bdbf9ffdf870e2bdbf9ffc3870e2bdbfffffffc
+79554bfffffffffffff7fffffffffffff7fffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7952abfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabffff87fffcffefffff7fffffffffffffc7fffffffffffffc
+795553ffff7bff7effefffff7feffffbffffffbbfffffbfbfffffc
+79554bffff7ffffeffefffff7ffffffbfffbffbffffffbfffffffc
+795553ffff7f0e7ef868ffc347ce1c30fff1ffbef51c30f3e1a3fc
+7aaaabffff86f77effa77fbd3bedebdbfffbff0ef4ebdbfbde9dfc
+795553fffffaff7ef82f7fbd7bec0bfbffffffbef5ebfbfbdebdfc
+7952abfffffaff7ef7af7fbd7bedfbfbffffffbef5ebfbfbdebdfc
+795553ffff7af77ef7277fbd3bedebdbbffbffbee5ebdbbbdebdfc
+7aaaabffff870c1838a8ffc346ee1c3c7ff1ffbf15ec3c60e1bdfc
+795553fffffffffffffffffffeeffffffffbfffffffffffffffffc
+79554bffffffffffffffffffff1ffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7952abfffffffffffffffffffffffffffffffffffffffffffffffc
+795553ffffc7ffffffffffffffffffffff7ffffffffe3ffffffffc
+7aaaabffffbbfffffbffffffffffffffff77fffffffddfffffffdc
+795553ffffbffffffbffffffffffffffff7ffffffffdfffffffffc
+79554bffffbef51a30e8fffffffffc387167a38bfe1dffffd1a39c
+795553ffff0ef4e9dbf77ffffe07fbd7ae779d77fde87fffcedddc
+7aaaabffffbef5ebdbf7fffffffffbf7af77bd77fdedffffdedfdc
+795553ffffbef5e9dbf7fffffffffbf7af77bd8ffdedffffcedfdc
+7952abffffbee5ea3bb7fffffffffbd7ae77bd7ffdedffffd1dfdc
+795553ffffbf15ebfc77fffffffffc387141bd87fe1dffffdfdf04
+7aaaabfffffffffbffffffffffffffffffffff7bffffffffdffffc
+795553fffffffffbffffffffffffffffffffff87ffffffffdffffc
+79554bfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7952abffffffffffffffffffffffffffffffff7ffffffff3fffffc
+795553fffffffefffffffffffffffffff7ffdf7ffffffffbfffffc
+7aaaabfffffffefffffffffffffffffff7ffdf7ffffffffbfffffc
+795553ffff8b0c3c346efffffffffc5861ff87470ffbb87bdec3fc
+79554bffff76f6fbd3aefffffe07fbb7b7ffdf3af7fbbfbbdebdfc
+795553ffff7606f817aefffffffffbb037ffdf7a07fbb83bde81fc
+7aaaabffff8efefbf7b5fffffffffc77f7ffdf7afffd77bbdebffc
+795553ffff7ef6ebd7b5fffffffffbf7b77fdd7af7fd773bdcbdfc
+7952abffff870f1c37bbfffffffffc3878ffe37b0ffef8a0e2c3fc
+795553ffff7bfffffffffffffffffbdffffffffffffffffffffffc
+7aaaabffff87fffffffffffffffffc3ffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+79554bfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffe3fffffffff3fffffbfffffffff1ffc7ffffffc
+7952abfffffffefddfffffffffbfffffbbfffffffeeffbbfffffbc
+795553fffffffefdffffffffffbfffffbffffffffefffbffffffbc
+7aaaabffff8b0c3dffffffffffbe1c38b3d1c5ff0efffbef51c30c
+795553ffff76f6f87fffff81ffbdefd73bcebbfef43ff0ef4ebdbc
+79554bffff7606fdffffffffffbdec17bbdebbfef6fffbef5ebfbc
+795553ffff8efefdffffffffffbdebd7bbdec7fef6fffbef5ebfbc
+7aaaabffff7ef6edffffffffffbdeb973bdebffef6fffbee5ebdb8
+795553ffff870f1dfffffffffe0e1c58a0dec3ff0efffbf15ec3c4
+7952abffff7bffffffffffffffffffffffffbdfffffffffffffffc
+795553ffff87ffffffffffffffffffffffffc3fffffffffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+79554bfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabffffffffffffff7fffffffffffffffc3fffe7ff7fffffffc
+795553fffffffefffdff7ffffffffffff7ffbdffbf7ff7fffffffc
+7952abfffffffeffffff7ffffffffffff7ffbfffff7ff7fffffffc
+795553ffff8b0c3a39f17ffffffffc5861ffbf873f7c347fd1a384
+7aaaabffff76f6f9ddee7ffffe07fbb7b7ffc37bbf7fd3bfcedd78
+795553ffff7606fbddef7ffffffffbb037fffd7fbf7c17bfdedf78
+79554bffff8efef9ddef7ffffffffc77f7fffd7fbf7bd7bfcedf78
+795553ffff7ef6ea3dee7ffffffffbf7b77fbd7bbf7b93bfd1df78
+7aaaabffff870f1bf0717ffffffffc3878ffc3860c1c547fdfdf84
+795553ffff7bfffbfffffffffffffbdfffffffffffffffffdffffc
+7952abffff87fffbfffffffffffffc3fffffffffffffffffdffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+79554bfffffffffffffffffffffffffffffffffffffffffffffffc
+795553ffffeffffffffffffffffffffffffffffffffffffffffffc
+7aaaabffffd7ffffffffffffffffffffffffffff7f7ffbfbfffffc
+795553ffffbbffffffffffffffffffffffffffff7ffffbfffffffc
+7952abfffffffe1bd47ffffffffe1bd470d1c3461e7c30f3e1a3fc
+795553fffffffdedb3bfffff03fdedb3af4ebd3b7f7fdbfbde9dfc
+7aaaabfffffffc0e77bffffffffc0e77af5e817b7f7c1bfbdebdfc
+795553fffffffdfe73bffffffffdfe73af5ebf7b7f7bdbfbdebdfc
+79554bffffff8dedb47ffffffffdedb46f5ebd7b777b9bbbdebdfc
+795553ffffff9e1bd7fffffffffe1bd7f0dec37b8c1c5c60e1bdfc
+7aaaabffffff7ffff7fffffffffffff7fffffffffffffffffffffc
+795553fffffffffff7fffffffffffff7fffffffffffffffffffffc
+7952abfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+79554bffff7ffe7ffffffffffffffff9fffffffefffcfffffffffc
+795553ffff7fff7ffffffffffffffffdfbfffffefffefffffffffc
+7aaaabffff7fff7ffffffffffffffffdfffffffefffefffffffffc
+795553ffff470f7a3fffffffff0d1ffdf3d1c3fe8e1ef47fe1c32c
+7952abffff3af779dfffff81fef4e81dfbcebdfe75eef3bfdebd54
+795553ffff7a077bdffffffffef5effdfbde81fef40ef7bfdfbd54
+7aaaabffff7aff79dffffffffef5effdfbdebffef5fef3bfdfbd54
+795553ffff7af77a3ffffffffef5effdfbdebdfef5eef47fdebd54
+79554bffff7b0c1bffffffffff0deff060dec3fef61837ffe1c374
+795553fffffffffbfffffffffffffffffffffffffffff7fffffffc
+7aaaabfffffffffbfffffffffffffffffffffffffffff7fffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7952abfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553ffff7fffffffffffffffffffffffffff9f3ffffffffffffc
+79554bffff7ffffdfffffffffffffeffffffffdfbffffffffffffc
+795553ffff7ffffdffffffffffffffffffffffdfbffffffffffffc
+7aaaabffff470e187ffffffffef51cf7bfe1c3dfbffffffffffffc
+795553ffff3af5edffffff81fef4eefb7fdefddfbffffffffffffc
+7952abffff7af67dfffffffffef5eefcffdfc1dfbffffffffffffc
+780000000000000000000000000000000000000000000000000000
+7ffffffffffffffffffffffffffffffffffffffffffffffffffffc
+7ffffffffffffffffffffffffffffffffffffffffffffffffffffc
+7ffffffffffffffffffffffffffffffffffffffffffffffffffffc
+7ffffffffffffffffffffffffffffffffffffffffffffffffffffc
+7ffffffffffffffffffffffffffffffffffffffffffffffffffffc
+7eef777befbefbefbefbefbefbefbefbefbefbefbefbefbefbefbc
+7ffffffffffffffffffffffffffffffffffffffffffffffffffffc
+7ffffffffffffffffffffffffffffffffffffffffffffffffffffc
+7fffffffbefbefbefbefbefbefbefbefbefbefbefbefbefbefbefc
+7dfbffeffffffffffffffffffffffffffffffffffffffffffffffc
+780000000000000000000000000000000000000000000000000000
+780003fffffffffffffffffffffffffffffffffffffffffffffffc
+7a5512000000000000000000000000000000001ffffffffffffffc
+7880a2000000000000000000000000000000001ffffffffffffffc
+7a140a000000000000000000000000000000001ffffffffffffffc
+78a2a21e0000c004001f0000000000000000001ffffffffffffffc
+790412210020400400108000000000000400001ffffffffffffffc
+7a208a200000400400108000000000000000001ffffffffffffffc
+79144a203c6041e5c010ae3c7571e68d0c2e3a1ffffffffffffffc
+7882221e42204016201f11428888154a8431441ffffffffffffffc
+7a511201402041f4201010428881f54a8421441ffffffffffffffc
+78088a0140204214201010427082154a8421381ffffffffffffffc
+79444a2142204236201010428082354a8421401ffffffffffffffc
+7a22221e3cf9f1d5c010103c7881d4489f213c1ffffffffffffffc
+79110a000000000000000000840000000000421ffffffffffffffc
+7888a20000000000000000007800000000003c1ffffffffffffffc
+7a110a000000000000000000000000000000001ffffffffffffffc
+78a222000000000000000000000000000000001ffffffffffffffc
+79044a000000000000000000000000000000001ffffffffffffffc
+7a288bfffffffffffffffffffffffffffffffffffffffffffffffc
+784113e1fffffdffffffdfff7ffffffffffffffffffffffffffffc
+7a8a23defffffdfeffffdfef7ffffffffffffffffffffffffffffc
+78104bdffffffdffffffdfff7ffffffffffffffffffffffffffffc
+7aa20bdfa3868d1cf87fdfcf468e1a37bffffffffffffffffffffc
+780453dfddfa74eef7bfdfef3b77edd7bffffffffffffffffffffc
+7aa883d8df82f5eef7ffdfef7b7e0df7bffffffffffffffffffffc
+78011bdedf7a75eef7ffdfef7b7dedf73ffffffffffffffffffffc
+7aaa23dcdf728deef7bfdfef3b7dcdf8bffffffffffffffffffffc
+78004be2df8afde8387fc083477e2dffbffffffffffffffffffffc
+7aaa83fffffefffffffffffffffffff7bffffffffffffffffffffc
+78001bfffffefffffffffffffffffff87ffffffffffffffffffffc
+7aaaa3fffffffffffffffffffffffffffffffffffffffffffffffc
+78000bfffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaa3fffffffffffffffffffffffffffffffffffffffffffffffc
+78000bfffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaa3deffff3fffffffffffffffeff033ffffffffffffffff81fc
+780013dedfdfbf7dfdffffffffffeff7fbfffffffeffffffffbffc
+7aaa8bdedfffbffdffffffffffffeff7fbfffffffeffffffffbffc
+78004bde879fbe7879f0e1ff868e2ff7fbe197868c3c346f7fbf78
+7aaa23dedfdfbf7dfdef5efffa75cff0fbdeab7a76ffdbaf7f8778
+78010bdedfdfbf7dfde067ff82f5eff7fbc0ab02f6fc1bef7fbf78
+7aa8a3dedfdfbf7dfdeff9ff7af5eff7fbdfab7ef6fbdbee7fbf78
+780413dedddfbf7dddef5eff72f5cff7fbdeab7af6eb9bf17fbf70
+7aa28be1e3060c1e3070e1ff8af62ff020e1bb86f71c5bff7fbf88
+78104bffffffffffffffffffffffffffffffffffffffffef7ffffc
+7a8a23fffffffffffffffffffffffffffffffffffffffff0fffffc
+78410bfffffffffffffffffffffffffffffffffffffffffffffffc
+7a28a3fffffffffffffffffffffffffffffffffffffffffffffffc
+790413fffffffffffffffffffffffffffffffffffffffffffffffc
+78a28bfffffffffffffffffffffffffffffffffffffffffffffffc
+7a104be1fffffffff9ffe1fffffffffffffffdff0fffffffffcffc
+788a23defffffffffdffdeffff7ffffffffffdfef7fffbffffeffc
+79104bdffffffffffdffdfffff7ffffffffffdfefffffbffffeffc
+7a2283dfc3470d1c3dffdfbd861e197ff0d1c5fefe1a30e8e1effc
+78441bdfbd3af6efddffe1bd7b7deabfff4eb9fefde9dbf75eeffc
+7a88a3d8817a06fc1dfffebd9f7c0abff05ebdfefdebdbf7deeffc
+78110bdebf7afefbddfffeb9e77dfabfef5ebdfefdebdbf7deeffc
+7aa223dcbd7af6fb9dffdec57b75eabfee5eb9fef5ebdbb7deeffc
+78044be2c37b0efc507fe1fd878e1bbff15ec5ff0e1bdc77e183fc
+7aa883ffffffffffffffffbdfffffffffffffffffffffffffffffc
+78011bffffffffffffffffc3fffffffffffffffffffffffffffffc
+7aa823fffffffffffffffffffffffffffffffffffffffffffffffc
+78054bfffffffffffffffffffffffffffffffffffffffffffffffc
+7aa003fffffffffffffffffffffffffffffffffffffffffffffffc
+781553fffffffffffffffffffffffffffffffffffffffffffffffc
+7a800bc1ff7ffffffffffffffffffcffffffff9efffffffffffffc
+78554bdeff7ffffdffffffffbffffefff7ffffdefffffffffffffc
+7a0023deff7ffffdffffffffbffffefff7ffffdefffffffffffffc
+79550bdec346f6187ff0e1a30e8e1effe1e1c3de8e1bdffffffffc
+7800a3c1bd3af5edffef5e9dbf75eefff7debdde75edbffffffffc
+7a5413d7bd7af67dffefdebdbf7deefff7debddef5ee7ffffffffc
+78828bdbbd7af79dffefdebdbf7deefff7debddef5ee7ffffffffc
+7a104bddbd3ae5eddfef5ebdbb7deefff75ebdde75edbffffffffc
+78a223dec347161e3ff0e1bdc77e183ff8e1c3068e1bdffffffffc
+79044bfffffffffffffffffffffffffffffffffffffffffffffffc
+7a2883fffffffffffffffffffffffffffffffffffffffffffffffc
+79011bfffffffffffffffffffffffffffffffffffffffffffffffc
+78aa23fffffffffffffffffffffffffffffffffffffffffffffffc
+7a004bfffffffffffffffffffffffffffffffffffffffffffffffc
+78aa83fffffffffffffffffffffffffffffffffffffffffffffffc
+79245bdefffffe7ffffffffffffffff9fffffbfffffffffffffffc
+7aab53deffffff7effffffffff7ffffdfffff7fffefefffbffffbc
+795553ceffffff7fffffffffff7ffffdfffff7fffeffffffffffbc
+795553d6c347ff7cf470e1a3fe1e1c3df0ffef868c3cf2f3c0c30c
+795553dabd3a077ef3af7eddff7debddef7fef7a76fef57bfdfdbc
+7aaaabdcbd7bff7ef7a060dfff7debddf3ffef7af6fef57bfbc1bc
+795553debd7bff7ef7afdedfff7debddfcfff77a76fef57bf7bdbc
+795553debd7bff7ef7af5cdfff75ebddef7ff77a8eeef57befb9b8
+795553dec37bfc1837b0e2dfff8e1c3070fffb86ff183760c0c5c4
+7aaaabfffffffffffffffffffffffffffffffffefffffffffffffc
+795553fffffffffffffffffffffffffffffffffefffffffffffffc
+7954abfffffffffffffffffffffffffffffffffffffffffffffffc
+795353fffffffffffffffffffffffffffffffffffffffffffffffc
+7aacabfffffffffffffffffffffffffffffffffffffffffffffffc
+7952a3fffffffffffffffffffffffffffffffffffffffffffffffc
+79555be1fffffffcffe0fffffffffffffffffffffffcf7fffffffc
+79554bdeeffffffeffef7ffffffffffdffffffbffffef7fffffffc
+7aaaabdffffffffeffef7fffffffffffffffffbffffef7fffffffc
+795553dfcf8a8e1effef51c3870e1c39e8e2ff0f0e1ef470defffc
+795553e1ef7677eeffe0eebd7af5ebdde75dffbef5eef3af6dfffc
+795553feef76f60effefefbd7e067cfdef5dffbef5eef7af73fffc
+7aaaabfeef8ef5eeffefefbd7eff9f3def63ffbef5eef7af73fffc
+795553deef7ef5ceffefefbd7af5ebddef5fffbaf5eef3af6dfffc
+7952abe18386f6283fefefc3870e1c306f61ffc70e183470defffc
+795553ffff7bffffffffffffffffffffffdefffffffffffffffffc
+7aaaabffff87ffffffffffffffffffffffe1fffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+79554bfffffffffffffffffffffffffffffffffffffffffffffffc
+795553fffffffffffffffffffffffffffffffffffffffffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+795553c1ff9fffffffffffcffffffcffffe7fffffffffffffffffc
+7952abdeffdffffffffbffeffffffefffff7ffbfbffffffffffffc
+795553deffdfffffffffffeffffffefffff7ffbffffffffffffffc
+7aaaabdec3def51c32f3e1efff0e1ef86f77c30f3e1a387ffffffc
+795553c1bddef4ebd57bfeeffef7eef7af77fdbfbde9d7bffffffc
+79554bdfbddef5ebd57be0effefe0ef7ef77c1bfbdebd9fffffffc
+795553dfbddee5ebd57bdeeffefdeef7ef77bdbfbdebde7ffffffc
+7aaaabdfbddf15ebd57bdceffef5cef7ae77b9bbbdebd7bffffffc
+795553dfc307f5ec3760e283ff0e28387141c5c60e1bd87ffffffc
+7952abfffffef7fffffffffffffffffffffffffffffffffffffffc
+795553ffffff0ffffffffffffffffffffffffffffffffffffffffc
+7aaaabfffffffffffffffffffffffffffffffffffffffffffffffc
+780000000000000000000000000000000000000000000000000000
+7ffffffffffffffffffffffffffffffffffffffffffffffffffffc
+7ffffffffffffffffffffffffffffffffffffffffffffffffffffc
+7ffffffffffffffffffffffffffffffffffffffffffffffffffffc
+7ffffffffffffffffffffffffffffffffffffffffffffffffffffc
+7deff7fffffffffffffffffffffffffffffffffffffffffffffffc
+7fff7fbdf7df7df7df7df7df7df7df7df7df7df7df7df7df7df7dc
+7ffffffffffffffffffffffffffffffffffffffffffffffffffffc
+7ffffffffffffffffffffffffffffffffffffffffffffffffffffc
+7fbfffffdf7df7df7df7df7df7df7df7df7df7df7df7df7df7df7c
+7000000003fffffffffffffffffffffffffffffffffffffffffffc
+77fffffffbfffffffffffffffffffffffffffffffffffffffffffc
+77fffffffbfffffffffffffffffffffffffffffffffffffffffffc
+77fffefffbefbefbefbefbefbefbefbefbefbefbefbefbefbefbf4
+77fffbfffbbfffffffffffffffffffffffffffffffffffffffffdc
+77ffeffefbfffffffffffffffffffffffffffffffffffffffffffc
+77fffffffbfffbefbefbefbefbefbefbefbefbefbefbefbefbeffc
+77fffffffafefffffffffffffffffffffffffffffffffffffffffc
+77fffffffbffffffffffffffffffffffffffffffffffffffffff7c
+77fffffffbfffffffffffffffffffffffffffffffffffffffffffc
+77fffffffbffef7df7df7df7df7df7df7df7df7df7df7df7df7ffc
+77ff7ffffbefbffffffffffffffffffffffffffffffffffffffbfc
+77fffffffbbeffffffffffffffffffffffffffffffffffffffffec
+77fffffffafffff7df7df7df7df7df7df7df7df7df7df7df7dfffc
+77fffffffbffffdffffffffffffffffffffffffffffffffffffffc
+77fffffffbffff7fffffffffffffffffffffffffffffffffffef7c
+77fbfffffbfffffffffffffffffffffffffffffffffffffffffffc
+77fffffffbfffbfffbefbefbefbefbefbefbefbefbefbefbefbffc
+7787fffffbfeffff7ffffffffffffffffffffffffffffffffffffc
+
+
+showpage
+
+% stop using temporary dictionary
+end
+
+% restore original state
+origstate restore
+
+%%Trailer
--- /dev/null
+%!PS-Adobe-2.0
+%%Creator: dvipsk 5.55a Copyright 1986, 1994 Radical Eye Software
+%%Title: couv2.dvi
+%%Pages: 1
+%%PageOrder: Ascend
+%%BoundingBox: 0 0 596 842
+%%EndComments
+%DVIPSCommandLine: dvips -o couv2.ps couv2.dvi
+%DVIPSParameters: dpi=300, compressed, comments removed
+%DVIPSSource: TeX output 1997.02.19:1958
+%%BeginProcSet: texc.pro
+/TeXDict 250 dict def TeXDict begin /N{def}def /B{bind def}N /S{exch}N
+/X{S N}B /TR{translate}N /isls false N /vsize 11 72 mul N /hsize 8.5 72
+mul N /landplus90{false}def /@rigin{isls{[0 landplus90{1 -1}{-1 1}
+ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale
+isls{landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div
+hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul
+TR matrix currentmatrix dup dup 4 get round 4 exch put dup dup 5 get
+round 5 exch put setmatrix}N /@landscape{/isls true N}B /@manualfeed{
+statusdict /manualfeed true put}B /@copies{/#copies X}B /FMat[1 0 0 -1 0
+0]N /FBB[0 0 0 0]N /nn 0 N /IE 0 N /ctr 0 N /df-tail{/nn 8 dict N nn
+begin /FontType 3 N /FontMatrix fntrx N /FontBBox FBB N string /base X
+array /BitMaps X /BuildChar{CharBuilder}N /Encoding IE N end dup{/foo
+setfont}2 array copy cvx N load 0 nn put /ctr 0 N[}B /df{/sf 1 N /fntrx
+FMat N df-tail}B /dfs{div /sf X /fntrx[sf 0 0 sf neg 0 0]N df-tail}B /E{
+pop nn dup definefont setfont}B /ch-width{ch-data dup length 5 sub get}
+B /ch-height{ch-data dup length 4 sub get}B /ch-xoff{128 ch-data dup
+length 3 sub get sub}B /ch-yoff{ch-data dup length 2 sub get 127 sub}B
+/ch-dx{ch-data dup length 1 sub get}B /ch-image{ch-data dup type
+/stringtype ne{ctr get /ctr ctr 1 add N}if}B /id 0 N /rw 0 N /rc 0 N /gp
+0 N /cp 0 N /G 0 N /sf 0 N /CharBuilder{save 3 1 roll S dup /base get 2
+index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx 0 ch-xoff
+ch-yoff ch-height sub ch-xoff ch-width add ch-yoff setcachedevice
+ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff .1 add]/id
+ch-image N /rw ch-width 7 add 8 idiv string N /rc 0 N /gp 0 N /cp 0 N{
+rc 0 ne{rc 1 sub /rc X rw}{G}ifelse}imagemask restore}B /G{{id gp get
+/gp gp 1 add N dup 18 mod S 18 idiv pl S get exec}loop}B /adv{cp add /cp
+X}B /chg{rw cp id gp 4 index getinterval putinterval dup gp add /gp X
+adv}B /nd{/cp 0 N rw exit}B /lsh{rw cp 2 copy get dup 0 eq{pop 1}{dup
+255 eq{pop 254}{dup dup add 255 and S 1 and or}ifelse}ifelse put 1 adv}
+B /rsh{rw cp 2 copy get dup 0 eq{pop 128}{dup 255 eq{pop 127}{dup 2 idiv
+S 128 and or}ifelse}ifelse put 1 adv}B /clr{rw cp 2 index string
+putinterval adv}B /set{rw cp fillstr 0 4 index getinterval putinterval
+adv}B /fillstr 18 string 0 1 17{2 copy 255 put pop}for N /pl[{adv 1 chg}
+{adv 1 chg nd}{1 add chg}{1 add chg nd}{adv lsh}{adv lsh nd}{adv rsh}{
+adv rsh nd}{1 add adv}{/rc X nd}{1 add set}{1 add clr}{adv 2 chg}{adv 2
+chg nd}{pop nd}]dup{bind pop}forall N /D{/cc X dup type /stringtype ne{]
+}if nn /base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{dup dup
+length 1 sub dup 2 index S get sf div put}if put /ctr ctr 1 add N}B /I{
+cc 1 add D}B /bop{userdict /bop-hook known{bop-hook}if /SI save N @rigin
+0 0 moveto /V matrix currentmatrix dup 1 get dup mul exch 0 get dup mul
+add .99 lt{/QV}{/RV}ifelse load def pop pop}N /eop{SI restore showpage
+userdict /eop-hook known{eop-hook}if}N /@start{userdict /start-hook
+known{start-hook}if pop /VResolution X /Resolution X 1000 div /DVImag X
+/IE 256 array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for
+65781.76 div /vsize X 65781.76 div /hsize X}N /p{show}N /RMat[1 0 0 -1 0
+0]N /BDot 260 string N /rulex 0 N /ruley 0 N /v{/ruley X /rulex X V}B /V
+{}B /RV statusdict begin /product where{pop product dup length 7 ge{0 7
+getinterval dup(Display)eq exch 0 4 getinterval(NeXT)eq or}{pop false}
+ifelse}{false}ifelse end{{gsave TR -.1 -.1 TR 1 1 scale rulex ruley
+false RMat{BDot}imagemask grestore}}{{gsave TR -.1 -.1 TR rulex ruley
+scale 1 1 false RMat{BDot}imagemask grestore}}ifelse B /QV{gsave
+transform round exch round exch itransform moveto rulex 0 rlineto 0
+ruley neg rlineto rulex neg 0 rlineto fill grestore}B /a{moveto}B /delta
+0 N /tail{dup /delta X 0 rmoveto}B /M{S p delta add tail}B /b{S p tail}
+B /c{-4 M}B /d{-3 M}B /e{-2 M}B /f{-1 M}B /g{0 M}B /h{1 M}B /i{2 M}B /j{
+3 M}B /k{4 M}B /w{0 rmoveto}B /l{p -4 w}B /m{p -3 w}B /n{p -2 w}B /o{p
+-1 w}B /q{p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{p 4 w}B /x{0 S rmoveto}B /y{
+3 2 roll p a}B /bos{/SS save N}B /eos{SS restore}B end
+%%EndProcSet
+TeXDict begin 39158280 55380996 1000 300 300 (couv2.dvi)
+@start /Fa 11 118 df<0503B5FC94B612FE040FEDFFE093B812FE0303EFFFC0031F18
+F0037F18FE4ABAFC14075C023FDB000714FC4A02E0EB003F91B6C8120F010302FC150149
+02F0814902C0163F494AEE1FF84949CA120F4949170790B54817015D484A1700484A1870
+4B18204891CDFC5A5C5A5C5A5CA2485BA24EB7FC60B55AA895C71201A36C7FA46C7FA280
+7E807E807E6C80816C806C80816D7F6D7F6D6D7E6D806D14F06D14FC010002FF5D6E02E0
+141F6E02FF0107B6FC020F92B8FC8014016E7E031F18F8030318C00300EFFE00040F16E0
+040003FCC7FC050391C8FC585377D16D>71 D<4BB5FC033F14FC0203B712C0020F16F802
+7F16FF49B912C04918F8130F5B5B90BA5AA2489138FE00074802E0EB007F4891C8120F02
+FC15034801F003005B4A167F48181F4A160F4818071903735A6E705A97C7FC14F880ECFF
+806C14F0EDFFC016FE6CEDFFF8EFFFC06C17F818FF6C18C06C18F019FC6C84013F717E6D
+846D84010384010084023F83140F020183EC001F0300821603DC000F15801700181F0607
+14C0180184851208001C84123E123F6D198013E06D5F01FC190048B494B5FC02C04B5B02
+F0150702FE031F5BDAFFC0027F5B03FE010FB5FCBB5A626262001F4EC7FC000760C618F0
+013F17C0010394C8FCD9007F15F8020315C0DA000701F8C9FC4A5379D15B>83
+D<92B5FC021F14F049B612FE010F6F7E017F16E048B812F8488384DBF80F7F9126FE0001
+148002F06D14C002C06E13E06C90C87E496F13F001F86F13F85B5B496F13FCCAFCA8173F
+4BB6FC157F0207B7FC143F49B612E70107ECF007011FEBFE00017F13F048B512C04891C7
+FC485B4813F8485B5A5C485BA2B55AA65F806C5E6E5C6C6D5C6E49B5FC6C6D13079139FF
+803FF76C91B512E76C16C717876CEDFE07C615FC6D14F0011FDAC00313F8010749C66C13
+F0010001E090C8FC3E437BC14D>97 D<EA3FFE487EB57EB0EEFFC0030F13FC037F13FF02
+81B612C0028715F0028F8102BF8191B77E84DBC01F809126FC00018002F06D804A023F7F
+028080717F717F838583A2717FA31A80A284A21AC0AC1A80A295B5FCA21A00A24D5BA25F
+614D5B5F4D5B6E5C6E4A5B02F891B55A6E01075C9126FF803F91C7FC92B65A6002BF5D02
+9F15E002875D028392C8FC6C010014FC6C48013F13E0C8D807FEC9FC425477D251>I<92
+3803FFFC037FEBFFE00203B612FC020FEDFF80023F16E091B812FC5B13075B499026FE00
+0F13F84901F013004901C0143F90B548140F4891C812034A15014849ED00F04849163019
+00485B5C5AA2485BA25AA35CB5FCAB7EA280A27EA2807E19186C6D16386E16786C18F86C
+6D15016E15076C6D150F6C6EEC3FFC6D6D14FF6D01F013036D01FE133F6D90B7FC6D17F8
+010117F06D17C0023F1600020F15FC020315E0DA007F91C7FC030713E03E437BC149>I<
+383FFF804813C0B5FC14E0A414C0A26C1380C8FCAAEA1FFF4813804813C0B3B3B3A66C13
+806C1300135478D324>105 D<EA3FFE487EB51280B3B3B3B3A76C13006C5A115377D224>
+108 D<923807FFC0037F13FC0203B67E020F15E0023F15F891B712FE4982010717C04983
+4949C6804901F0011F7F49018001037F90B5C76C7F48496E7F4A8148496F138048496F13
+C0A248496F13E0A248496F13F0A24819F8A24A814819FCA4B518FEAB6C19FCA26E5DA26C
+19F8A26C6D4B13F0A26C19E06E5D6C19C06E5D6C6D4B13806C6D92B512006C6D4A5B03C0
+13076D01F0011F5B6D01FE90B55A010F90B712E06D5F6D5F01004CC7FC6E5D021F15F002
+031580DA007F01FCC8FC030713C047437BC152>111 D<EEFFC0D83FFE010F13FC486C01
+7F13FFB50081B612C0028715F0028F8102BF8191B77E84DBC03F809126FC00078002F001
+01804A6D80028080717F717F83717FA2838583A2711480A47213C0AB95B5FC1A80A35F1A
+00A24D5BA25F4D5B615F4D5B6E5C6E49B55A02F8495C6E010F5C9126FF807F91C7FC92B6
+5A6002BF5D029F15E002875D028392C8FC028014FC033F13E0DB07FEC9FC92CBFCAE6C90
+CCFC6C5A425277C051>I<EE0FC0D83FFC14FF486C1303B5130F153F5D92B5FC5C5C5C5C
+A25C4AEBC00003FCC7FCEC7FE015804AC8FC14FC5C5C5CA25CA25CB3B3A26C90C9FC6C5A
+2A4177C036>114 D<D83FFE923801FFF0486C4B13F8B56C4A13FCB3B3A65FA35FA25F6C
+5EA217F76E13016CED07E76E130F6C01FCEB7FC76C90B6128717076C15FE6C15F8C615F0
+013FDAC00313F8010FDA000113F09026007FF890C8FC3E4177BF51>117
+D E /Fb 13 118 df<003FB612F84815FCB712FEA36C15FC6C15F827077EA232>45
+D<003FB712FC48EEFFE0B912FCF0FF8019E019F819FE737E01E0C8001F80050014F0060F
+7F06037F06007FF13FFF070F7F737F737F737F85747E747E1A1F747E8786741380A37413
+C0A2861CE0A31B7F1CF0AC1CE01BFFA31CC062A2501380A2501300A2505A1A1F631A3F50
+5A505A4F5B61070F5B4F5B077F90C7FC4E485A060F13F8067F5B051FB55A90BA12804FC8
+FC6119F0198006FCC9FC6C17E06C04FCCAFC545173D06A>68 D<94387FFF80040FB512FC
+93B712C0030716F8031F16FE037F707E4AB912E00207DAC00014F8021F01F8C7000713FE
+4A01C002007FDAFFFEC9001F13C04901F804077F4901E004017F4949707F4990CBEA3FFC
+4948727E4948727E4948727F4948727F4A844849727F4849737E91CD123F48884848747E
+A24848747EA2491A07003F884986A2007F1D80A24986A200FF1DC0AA6D62A2007F1D80A2
+6D62A2003F1D006D62A2001F646D1A1F000F646D1A3F6C6D4F5AA26C6D4F5A6C6D4E5B6E
+606C6D4E5B6D6C4E5B6D6C4E90C7FC6D6C4E5A6D6D4D5A6D01E04C485A6D6D4C5B6D01FC
+040F5B6D01FF043F5B023F01C092B5C8FC6E01FC020F5B0207D9FFC090B512F8020191B7
+12E06E60031F4CC9FC030716F8030016C0040F02FCCAFCDC007F1380625378D173>79
+D<91380FFF8091B512F0010714FC013F14FF90B712C00003824882489039E0007FF849C7
+EA1FFC01F86E7E01E06E7E498090C86C1380120ECA13C0A3EF7FE0AAEE03FF031FB5FC02
+03B6FC143F49B7FC01079038FE007F011F13C0D97FFEC7FC3801FFF04813C04890C8FC48
+5A485A485A5B485AA2485AA517FFA26D5C007F5D6D5C6C6C5C6D5C6CB4ECFF7F9138E007
+FE6C90B512FC6C15F06C15E06C15806C6C9039FE003FC0011F01F0EB1F80010390C9FC33
+4179BF46>97 D<ED7FFE0203B512E0021F14FC027F14FF49B712C04916F04916FC011FEB
+C0034948C7123FD97FF8140F4948EC03F84801C014004A15784890C912184817005B485A
+5B121F5B123FA25B127FA4485AAC6C7EA46C7EA2121F7FA26C7E6C6C1606181E6C6C163E
+6E157E6C6DEC01FE6C01F014036D6C140FD93FFEEC7FFC903B1FFFC007FFF86D90B612F0
+010316C06D16006D6C14FC021F14F0020314809126007FF8C7FC37417ABF42>99
+D<EDFFE0020713FE023F6D7E4A14E049B612F80107814981499038C03FFF90273FFE0007
+1380D97FF8010113C0D9FFE09038007FE04849143F4849EC1FF091C8120F484816F84915
+07000F17FC48481503A24916FE003F16015B127F18FF5B8312FFA390B9FCA318FE18FC01
+80CAFC7FA3127FA37F123FA27F121F7F120F7F6C6C16066D161E6C173E6C6D157E6C01E0
+15FE6D6C1403D93FFC140F6DB4EC7FFC6D9039E007FFF86D90B612F06D16C00100168002
+3FECFE00020F14F0020314C09126003FF8C7FC38417BBF42>101
+D<EA3FC0EA7FE012FF13F0A613E0A2EA7FC0C7FCAAEA1F80EA3FC0EA7FE0B3B3B3A4EA3F
+C0EA1F800C5476D321>105 D<123FEA7F80EAFFC0B3B3B3B3A7EA7F80EA3F000A5375D2
+21>108 D<DB3FF8ED1FFC003F49B592B57E267F800702C0010314E026FFC01F02F0010F
+14F8027F6E013F8091B66C498001C16F90B7FC9026C3FE006D48D9007F1380D9C7F0010F
+D903F8130702C06DD983E06D13C0D9CF806DD987C07F01DFC76CD9CF806D13E001DE6E91
+C8127F01FC16DE4904FC16F0057F163F495EA2495EA4495EB3B3A36C486F48ED1FE06CC9
+6C48ED0FC05C3F74BE75>I<ED3FF8003F49B5FC267F800714C026FFC01F14F0027F8091
+B67E01C1819026C3FE007FD9C7F0130F02C06D1380D9CF807F01DFC76C13C001DE8013FC
+4916E0177F5BA25BA45BB3B3A36C48ED3FC06CC9EA1F80333F75BE4A>I<ED3FF80203B5
+7E020F14E0027F14FC91B67E01036F7E498249D9E00F7FD93FFEC713F8D97FF8EC3FFC02
+E0140F49486E7E48496E7E4890C86C138048486F13C049167F000F18E049163F001F18F0
+49161F003F18F849160FA2007F18FCA2491607A200FF18FEAC6C6CEE0FFCA46C6CEE1FF8
+A36C6CEE3FF0A26C6CEE7FE06D16FF000718C06C6C4B13806E5C6C6D4A13006C01F0EC1F
+FE6D6C4A5AD93FFEECFFF890271FFFE00F5B6D90B65A010316806D93C7FC6D6C14FC021F
+14F0020314809126003FF8C8FC3F417BBF4A>I<EB03F0497E497EB0003FB712804816C0
+B812E0A36C16C06C168026000FFCC8FCB3B3A7801718010715786EEB01F892388007FC6D
+EBC03F92B5FC6D15F817E06D15806EEBFE00021F13F0DA07FEC7FC2E517DCF36>116
+D<003FEE1F80486CED3FC0486CED7FE0B3B3A617FFA35E5EA25E6C6C5CEE1F7F6D147E6C
+6CEB01FC01FFEB0FF86C90B512F06C15E06C15C06C1500C602FCEB3FC0013F01F0EB1F80
+010790C9FC333F75BD4A>I E /Fc 13 118 df<000FB500F80B07B512FE003F02FF0B3F
+80486F5215807099B712C0B76C63A27063A27063A27063A27063A37063A27162A27197B8
+FCA27161A202FB6E4F14EFA202F96E4F14CFA202F86E4F148FA26F6D4F140FA26F6D4F13
+FEA26F6E4E13FCA26F6E95B512F8A26F6E4D14F0A26F6E4D14E0A26F6E4D14C0A36F6E4D
+1480A2706D4D1400A2706D4D5BA2706E4C5BA2706E93B55AA2706E4B5CA2706E4B5CA270
+6E4B5CA2706E4B5CA2716D4B91C7FCA2716D4B5BA2716E4A5BA2716E91B55AA2716E495C
+A3716E495CA2716E495CA2716E495CA2726D4991C8FCA2726D495BA2726E485BA2726EB5
+5AA27202E15CA27202F35CA27291B65AA2725FA27393C9FCA2735DA2735DA3735DA2735D
+A2735DA2735DA2735D7491CAFC745B6C735B4A050701F07114806C4994CD6C1400000F49
+795B9A756DF4C1>77 D<000FBBFC003F1AFF481BF8F4FF80BE12F01DFE777E1EF01EFC1E
+FF8B1FE01FF88B8B797E8C8C03E0CA003F82E1007F810A07811C000B3F80778089771580
+897715C0A28921E0A28AA69BB6FC21C0A265218065531500535C0B3F5C6552B65A0A0F5D
+99B712C0097F5E92BEC7FC1FFC1FF01FC09CC8FC1EFC1EF01E800BFCC9FC1DE052CAFC1C
+F88803E0C8000F80738073818573817480897480867480748089748174818675808A7580
+75808775808A758175817581888B768076807680888B7681768176817780898C77807780
+77808921807715C07715E07814F07814F8A26C894B866C4A86000F91CE000114F07D756F
+F49A>82 D<0503B512E094B712E0040F16FE047FEEFFE00303B912FE031FF0FFC0037F19
+F84ABB12FE0207F2FFC0021F875C5C49BDFC5B49645B499238FE0001490380EB00074902
+FCC9FC04E0161F90B6008004075C484ACA7E4B17004802F0183F4B84484A7290C7FC8848
+4A1801888948881D1E1D0C6F96C8FCA2818115FC816F7E16F06C15FEEEFFF0EFFFC06C17
+FEF0FFF8F1FFC06C19FE6CF1FFE01BFC6CF2FF801CE06D1AF86D1AFE6D747E6D876D1BF0
+6D876D1BFE6D6C866E87020F876E870201876E7E030F86030186ED003F040785DC003F84
+170006071880F0001F1900080716C01A001B1F1B07090115E087888888881206000F87EA
+1FC07F7F6D1DC07F01FF62486D1C8002E0618002FC4F140002FF96B6FC4802C04D5C03F0
+4D5C03FC170FDBFF80043F5C04F093B65ADCFF80140FB800FE49B75A94BA5A669BC7FC65
+6C64001F1CF0000764C664013F98C8FC01071AFC01001AF0021F19C0020396C9FCDA003F
+17F8030117C0DB000F03FCCAFCDC000F91CBFC6B7976F683>I<0403B57E4BB612FC031F
+EDFF804AB812F0020F17FE027F717E49BA12E0010F19F8013F854985757E88DD80078104
+E0C78193C87E03F8031F8003E06F8003806F806D90C97E02FC854A8202E01A804A825C91
+CB15C0011E84130890CCFCA90703B6FC067FB7FC053FB8FC040FB9FC93BAFC150F157F02
+03BBFC020FEEE07F027FEDF00049B648C7FC010715F0491580013F02FCC8FC4914F090B6
+12C000035D93C9FC4814FC485C485C5D5A5D485CA2B6FC92CAFCA697B6FC81A26C608161
+6F5D6C6E151F6F5D6C6E92B7FC03FF5C6C03C0130F6C03F890B57E93B612FE6C18FC6C18
+F86C18F06D17E06D17C06D1700010716FC6D16F0010004C06D1480023F4AC76C14000207
+02E06E5B9126007FFCCCFC5A5F79DD6F>97 D<380FFFFC003F7F487F81B6FCB3A4943801
+FFF0053F13FF4CB612E0040F15F8043F15FE93B87E038317E0038783039F8303BF17FE92
+BAFC88889326FE003F8104C001038193C8FC03FC033F8003F06F804B15074B6F804B6F80
+85741480A27414C0A27414E0A27414F0A37414F8A31DFCA386A21DFEAF1DFCA262A31DF8
+A2621DF0A35014E0A25014C0A2501480A297B612004F5C6F5D6F4B5C6F4B5C6F153F6F92
+B65A03FF02035D04C0010F5D04F890B75A93B9C7FC636303BF17F0039F5F038F5F038794
+C8FC038116FC6C028016F0DB003F15C06C49010F4AC9FC000F49010114F0CAD81FFECAFC
+5F7873F675>I<94381FFFFE0403B612F8041FEDFF8093B812F0030717FE031FEFFFC003
+7F18F84ABA12FE4A85140F5C5C5C49BB5A499238F800074903C0EB003F4992C8120704FC
+15014902F0ED007F494AEE1FFC494A160F4C160390B6CA1201484AEF00781C30484A95C7
+FC485CA2485CA25A5DA25A5DA25AA45DB6FCAE6C80A57E81A27E817E816C1B0E6F181F6C
+636F606C505A6C6E5F705E6D6E161F6D6E167F04F84BB512806D6E15076D02FF151F6D03
+C049B6FC6D03F8133F6D92B9FC7F80021F1A006E19FC0203616E19E06E6C1880031F05FC
+C7FC030717F003001780041F03FCC8FC040315C0DC001F01E0C9FC595F78DD69>I<9438
+1FFFE00403B6FC043F15E093B712FC0307EEFF80031F17E0037F17F84AB97E4A84020F72
+7E4A854A8591BB7E49DBFC0181499226C0001F804992C71207494A0201804902F86E804C
+81494A6F1480494A8190B64818C093C97E484A19E048854B19F0484A82A2485C7414F848
+5CA3484A19FCA34891BBFCA5BEFCA21DF81DF01DE092CEFCA7817EA46C80A37E81A26C80
+A26C80A26C6EF001C06FF003E06C1B076F180F6C6F173F6D6E177F6D6EEE01FF705E6D6E
+040F13F06D02FE163F6D6E93B5FC6D03C014076D03F8143F6D03FF0107B6FC6E92B8FC14
+1F6E1AE002031A806EF1FE006E6C18F8031F18E003071880030105FCC7FCDB003F16E004
+0793C8FC040015F0050301FCC9FC5E5F7ADD6B>101 D<0503B512F094B712E0040F16F0
+167F0303B8FC150F153F92B9FC5C14075C5C5CF000074A02F0EB007F91B600C0141F4D14
+0F4992C81203F201E0F200401B00A8000FB912E0003F84488485BAFCA66C606C606C60D8
+000192CAFCB3B3B3B3A37F5E6E5B021F5B4C787BF748>I<381FFFFE48EBFF804814C0B6
+FCA215E0A415C0A36C1480001FEBFE00C9FCAE3807FFFE001F7F48148015C05AB3B3B3B3
+AC7E15806C140000075B1B7874F734>105 D<380FFFFC003F7F487F1580B6FCB3B3B3B3
+B3B3A37E15006C5B000F5B197773F634>108 D<95381FFFC0260FFFF84AB512FE003F6D
+020FECFFE0486D027F15F86E49B712FEB60107707E4C83043F834C8393B97E5D4B844B84
+4BEBE0014B90C7001F80DB3FFC8004F002031580DB7FC0804B5A93C9FC4B19C05D4B825D
+A25DA25DA35DB3B3B3A57E92CA6C14806C49711400000F49715B5A5D73DC75>110
+D<F007F0260FFFF8ED7FF8003F6DEC03FF486D141F6E147FB649B5FC5E160F5E5E5E93B6
+FC5D5D5DA25D5D19F04BECE0004B01FCC7FC17C092B5C8FC16FC16F05E168093C9FC5D5D
+5D5DA25DA25DA35DB3B3AF7E92CAFC6C5B000F5B3D5D73DC4E>114
+D<260FFFFC94380FFFFE003F6D4D7F486D4D14806F4C14C0B6FCB3B3B3A397B6FCA461A2
+61A261A2616C60A26F5D96B7FC6C4D7F6FEC03FE6C6E140F6FEC3FFC6C913AFF8001FFF8
+6C92B612F0A26C18E06C18806C18006D5E6D5E010F16F0010304C06D1480D9007F92C76C
+1400020F02F86E5BDA007F018091C9FC5A5D73DB75>117 D E end
+%%EndProlog
+%%BeginSetup
+%%Feature: *Resolution 300dpi
+TeXDict begin
+%%PaperSize: a4
+
+%%EndSetup
+%%Page: 1 1
+1 0 bop 2 621 a Fc(Scilab)2 984 y(Reference)2 1348 y(Manual)2
+1957 y Fb(On-line)49 b(Do)t(cumentation)2 2565 y Fa(Scilab)k(Group)p
+eop
+%%Trailer
+end
+userdict /end-hook known{end-hook}if
+%%EOF
--- /dev/null
+\documentclass{slides}
+
+\begin{document}
+
+\pagestyle{empty}
+\begin{slide}
+
+\
+
+{\bf\Huge Scilab}
+
+{\bf\Huge Reference}
+
+{\bf\Huge Manual}
+
+\vspace{2cm}
+
+\Large On-line Documentation
+
+\vspace{2cm}
+
+{\Large\bf Scilab Group}
+
+\end{slide}
+\end{document}
--- /dev/null
+\pagestyle{empty}
+\begin{center}
+\fbox{\setlength{\unitlength}{1cm}\begin{picture}(16,24)
+\hspace{-2.5cm}\special{psfile=couv1.ps}\special{psfile=couv2.ps}
+\end{picture}}
+\end{center}
+
+\newpage
+
+\vspace{8.cm}
+
+{\Huge\bf SCILAB}
+
+\bigskip
+
+{\Huge\bf REFERENCE}
+
+\bigskip
+
+{\Huge\bf MANUAL}
+
+\vspace{3.cm}
+
+{\Huge\bf Scilab Group}
+
+{\Large\bf
+INRIA Meta2 Project/ENPC Cergrene}
+
+\normalsize
+
+\vspace{12.cm}
+
+INRIA - Unit\'e de recherche de Rocquencourt - Projet Meta2
+
+Domaine de Voluceau - Rocquencourt - BP 105 - 78153 Le Chesnay Cedex (France)
+
+{\bf Email: Scilab@inria.fr}
+
--- /dev/null
+\hypersetup{dvips,colorlinks=true}
--- /dev/null
+SHELL = /bin/sh
+
+include ../../../Makefile.incl
+
+# define NO_SGTTY because SGTTY not useful for our use of tr2latex
+
+CFLAGS = $(CC_OPTIONS) -DNO_SGTTY
+
+# Use makefile.msc if you are compiling with MS-DOS
+# add -Dtops20 to CFLAGS if you're running it under tops20
+# and add -DANSI if you're using ANSI C
+
+OBJS = tr2tex.o tr.o subs.o
+
+PROGRAMS = tr2tex
+
+all:: $(PROGRAMS)
+
+$(PROGRAMS): $(OBJS)
+ $(RM) $@
+ $(CC) -o $@ $(OBJS) $(CC_LDFLAGS)
+
+clean::
+ $(RM) $(OBJS)
+distclean::
+ $(RM) $(OBJS) $(PROGRAMS)
+
+tr2tex.o: setups.h
+tr.o: setups.h
+subs.o: setups.h
+subs.o: simil.h greek.h flip.h forbid.h maths.h macros.h
--- /dev/null
+Please read this file before you install the program.
+
+Troff-to-TeX translator version .93, March 4, 1987.
+Copyright (C) by 1987 Kamal Al-Yahya.
+
+This directory contains programs that were developed at the
+Stanford Exploration Project, Geophysics Department, by Kamal Al-Yahya.
+Copying them to any other machine is permitted without prior permission
+provided that copyright messages are kept, no profit is made by copying
+the files, and modifications are clearly documented.
+
+I would very much appreciate any comments or suggestions. My e-net
+address is
+ kamal@hanauma.stanford.edu
+If it doesn't work try
+ kamal%hanauma@score.stanford.edu
+
+ INSTALLATION INSTRUCTIONS
+
+In short, type ``make'' and then run it on the document (try the testfile):
+ tr2tex testfile > testfile.tex
+
+In details:
+
+- Use makefile.msc if you're running MS-DOS.
+- In the makefile, define the destination of the executable (default is
+ current directory). Also, add the -O flag if you want to (and the
+ optimizer in your machine is not buggy). The -O flag causes long compilation
+ time but experience has shown that it is unnecessary for this package;
+ time saved in running time is extremely small in the computers I used.
+- If the limit on your unsigned int is not 65535, change MAXLEN in
+ setups.h accordingly.
+- In tr2tex.c, change the document type if you want. The default is article.
+ Also, change the style options to suit your taste. The default
+ is [troffms,11pt] if no flag is used and [troffman] if the -m flag is used.
+- Add necessary -D's to CFLAGS if you need them. The program recognizes the
+ following compiler-time definitions:
+ -Dtops20, -DANSI, -DMSC, -DNO_SGTTY
+- type ``make'' to produce the executable, called ``tr2tex''.
+- Modify troffms.sty and troffman.sty to suit your taste but keep the
+ necessary macro definitions as they will be needed when running latex.
+ Make sure the font names exist on your site. Change them if necessary.
+- Move troffms.sty and troffman.sty to your macros directory.
+- Install and read the manual page.
+- Run the translator on ``testfile'' and the manual page as follows
+ tr2tex testfile > testfile.tex
+ tr2tex -m tr2tex.9 > tr2tex.9.tex
+
+ and compare ``testfile.tex'' with ``testfile.tex-orig'' and
+ ``tr2tex.9.tex'' with ``tr2tex.9-tex-orig''.
+ If they are not identical, you have not installed it properly.
+
+
+ USING THE TRANSLATOR
+
+You can run the program either by
+ tr2tex < file > file.tex
+or
+ tr2tex file > file.tex
+You are most likely to get messages on the standard error telling
+you about things it encounters and cannot do.
+
+Now you have the translated document. Look at it and see if you
+can spot a major error. Run it through latex. If it runs and produces
+the dvi file, then print it. If you get latex error messages modify
+the translated document accordingly and repeat the latex run, and so on.
+I usually get away with one or two iterations.
+
--- /dev/null
+.TH abort 1 "April 1993" "Scilab Group" "Scilab Function"
+.so ../sci.an
+.SH NAME
+abort - interupt evaluation.
+.SH DESCRIPTION
+\fVabort\fR interrupt current evaluation and gives the prompt. Within
+a \fVpause\fR level \fVabort\fR return to level 0 prompt.
+.SH SEE ALSO
+quit, pause, break, abort, quit
+
+
--- /dev/null
+\documentstyle[tr2tex,11pt]{article}
+\begin{document}
+\def\troff{{\it troff}}
+\def\Troff{{\it Troff}}
+\def\ditroff{{\it ditroff}}
+\def\Ditroff{{\it Ditroff}}
+
+\title{Differences between \TeX\ and troff typesetters}
+
+Outlined below are the differences between \TeX\ and \troff\/ that
+I know from experience with the two languages most of which
+obtained while writing {\bf tr2tex}.
+Most of them are advantages \TeX\ has over \troff.
+
+There are actually more than one type of \TeX, the most
+used ones are \LaTeX and plain \TeX\
+\Troff\/ can also be loaded with various macro packages to
+produce variations to plain \troff. Also, \ditroff\/ (device independent \troff)
+is becoming more and more the standard of \troff.
+The following comparison is made mainly between \LaTeX\ and {\bf ms} \troff.
+It will be mentioned if in a particular case \ditroff\/ makes a difference.
+
+\begin{itemize}
+\item \TeX\ is not system-dependent. \Troff\/ is a Unix tool.
+
+\item In \Troff, tables and equations are handled by preprocessors
+while in \TeX\ they are simultaneously processed with text.
+
+\item \Troff\/'s commands have to start at the beginning of the line
+and start with a dot. Equation symbols are recognized when delimited by space.
+All \TeX\ commands, in math or non-math mode, start with a backslash
+and they don't have to be placed at the beginning of the line.
+
+\item \TeX\ and \LaTeX\ commands are more verbose than \troff\/'s.
+This can be an advantage or disadvantage depending on the user.
+
+\item \TeX\ processes {\it boxes} such as lines and paragraphs as one unit.
+This means it can distribute {\it badness} over that box.
+For example, when a spacing between two lines needs to be large, because
+a line has large symbols, it will slightly stretch the
+line spacing in other lines to make the large spacing not look
+too bad. This also makes it avoid orphan lines.
+
+\item The input to \LaTeX\ is a more structured document with scopes. It makes it
+easier to proofread. \Troff\/'s input is less structured.
+
+\item Some \TeX\ drivers make it very easy to include prepared
+graphs with the text. Including graphs with \troff\/'s text is more difficult.
+
+\item Many fonts can be loaded in a \TeX\ document (up to 32); in \troff,
+the limit is 4 (\ditroff\/ does not have this restriction).
+
+\item Non-math macros are defined just like math macros in \TeX.
+In \troff, {\bf define} is used for math definitions and {\bf .de} is
+used for non-math macros.
+\Troff\/'s macros can be made up from anything while
+\TeX\ macros cannot have non-letters which is a nuisance sometimes.
+
+\item There is no limit on the page size in \TeX. The size is limited only by
+the output device. \Troff\/'s paper size is limited.
+
+\item \TeX\ is interactive, while \troff\/ is not. However, not many people can
+benefit from this feature since they have to be skillful in answering
+its questions.
+
+\item \TeX\ and \LaTeX\ give a {\bf l\,o\,n\,g} ambiguous log file that does not
+exactly tell what the error is. \Troff\/ does not give error messages.
+
+\item \LaTeX\ automatically numbers equations and figures, etc. A powerful
+cross-referencing technique relieves the user from worrying about having
+the right sequence of equations' and figures' numbers. This feature
+is not available in \troff.
+
+\item The documentation in the \LaTeX\ manual is excellent.
+\Troff\/'s documentation is scattered over many references.
+The documentation in the \TeX Book is very technical and the average reader
+may find it unreadable.
+
+\item At hanauma, we have a previewer for TeX on the SUN, but don't have it
+for \troff.
+\end{itemize}
+\end{document}
--- /dev/null
+.TH macroname 2 "April 1993" "Scilab Group" "Scilab Function"
+.so sci.an
+.SH NAME
+macroname - keywords for whatis
+.SH CALLING SEQUENCE
+.nf
+[out1,out2] = macroname(input1,input2, [optional])
+.fi
+.SH PARAMETERS
+.TP 10
+input1
+: real matrix, meaning.
+.TP 10
+input2
+: character string, meaning.
+.TP
+out1
+: polynomial matrix
+.SH DESCRIPTION
+\"LaTeX \ignore{
+.nf
+ Verbatim enclosed in ignore
+.fi
+\"LaTeX }
+.IG
+.nf
+ Verbatim ignored in LaTeX (IG/FI)
+.fi
+.FI
+.nf
+Real One Verbatim
+.fi
+.SH REMARK
+Note that ...
+.SH SEE ALSO
+name1,name2,nam_e3
+.SH AUTHOR
+your name
--- /dev/null
+/*
+This file contains the words that are placed the opposite way
+in troff and TeX. Is there any more?
+*/
+char *flip_list[] =
+{
+"bar", "dot", "dotdot", "hat", "tilde", "under", "vec"
+};
--- /dev/null
+/*
+This file contains TeX commands that cannot be re-defined.
+Re-defining them is not permitted by TeX (or they may produce
+unpredictable consequences).
+If the troff user happens to re-define one of these, it will be replaced.
+This list is extracted from the starred entries in the index of the TeXBook.
+They are entered here in alphabetical order.
+If the macro has non-alphabetical characters, it will be trapped
+somewhere else; it needn't be put here.
+This list is added to make the program more robust.
+Note that the backslash is omitted.
+*/
+char *forbid[] =
+{
+"atop", "char", "copy", "count", "cr", "crcr",
+"day", "def", "divide", "dp", "dump", "edef",
+"else", "end", "eqno", "fam", "fi", "font",
+"gdef", "global", "halign", "hbox", "hfil", "hfill",
+"hfuzz", "hoffset", "hrule", "hsize", "hskip", "hss",
+"ht", "if", "ifcase", "ifcat", "ifnum", "ifodd",
+"iftrue", "ifx", "indent", "input", "insert", "kern",
+"left", "leqno", "let", "limits", "long", "lower",
+"mag", "mark", "mkern", "month", "mskip", "multiply",
+"muskip", "omit", "or", "outer", "output", "over",
+"overline", "par", "raise", "read", "right", "show",
+"span", "special", "string", "the", "time", "toks",
+"topmark", "topskip", "unkern", "unskip", "vbox", "vfil",
+"vfill", "vfuzz", "voffset", "vrule", "vsize", "vskip",
+"vsplit", "vss", "vtop", "wd", "write", "xdef"
+};
--- /dev/null
+/*
+This file contains the list of the upper-case Greek letters.
+In case I overlooked any, it can be added here.
+*/
+char *GRK_list[] =
+{
+"ALPHA", "BETA", "CHI", "DELTA", "EPSILON",
+"ETA", "GAMMA", "KAPPA", "LAMDA", "MU",
+"NU", "OMEGA", "PHI", "PI", "PSI",
+"RHO", "SIGMA", "TAU", "THETA", "XI", "ZETA"
+};
--- /dev/null
+/*
+This file contains the list of non-math macros and plain troff macros.
+Do NOT forget to put the dot for the troff macros, and the backslash
+for TeX macros (two backslashes, one for escape).
+The third column in the list is 0 for macros that have no arguments
+and either 1 or 2 for those that do. If it is 1, then only one line
+will be read as an argument. If it is 2, then lines will be read until
+properly terminated. Arguments for ms macros are terminated by an ms macro
+(e.g. .PP). Plain troff macros are terminated after reading the desired number
+of lines specified by the macro (e.g. .ce 5 will centerline 5 lines).
+The fourth column specifies whether the macro implies a paragraph break
+(par > 1) or not (par = 0). This is needed to terminate some environments.
+If .LP, or .PP, par=1; if .IP, par=2; if .TP, par=3; if .QP, par=4.
+*/
+struct macro_table {
+ char *troff_mac, *tex_mac;
+ int arg, macpar;
+} macro[] = {
+
+/* troff macro TeX macro argument par */
+ ".1C", "\\onecolumn", 0, 1,
+ ".2C", "\\twocolumn", 0, 1,
+ ".AE", "\\end{abstract}", 0, 1,
+ ".AI", "\\authoraff", 2, 1,
+ ".AU", "\\author", 2, 1,
+ ".Ac", "\\ACK", 0, 1,
+ ".B1", "\\boxit{", 0, 0,
+ ".B2", "}", 0, 0,
+ ".DE", "\\displayend", 0, 1,
+ ".DS", "\\displaybegin", 0, 1,
+ ".FE", "}", 0, 0,
+ ".FI", "\\end{comment}", 0, 0,
+ ".FS", "\\footnote{", 0, 0,
+ ".HR", "\\trait", 0, 0,
+ ".IG", "\\begin{comment}", 0, 0,
+ ".Ic", "\\caption{", 0, 1,
+ ".Ie", "}\\end{figure}", 0, 1,
+ ".Is", "\\begin{figure}", 0, 1,
+ ".KS", "{\\nobreak", 0, 0,
+ ".LP", "\\par\\noindent", 0, 1,
+ ".MH", "\\mhead", 2, 1,
+ ".NH", "\\section", 1, 1,
+ ".PP", "\\par", 0, 1,
+ ".QE", "\\end{quotation}", 0, 1,
+ ".QS", "\\begin{quotation}", 0, 1,
+ ".SH", "\\shead", 1, 1,
+ ".TH", "\\phead", 1, 0,
+ ".TL", "\\title", 2, 1,
+ ".UC", "", 0, 0,
+ ".UL", "\\undertext", 1, 0,
+ ".bp", "\\newpage", 0, 1,
+ ".br", "\\nwl", 0, 0,
+ ".ce", "\\cntr", 2, 0,
+ ".cu", "\\undertext", 2, 0,
+ ".fi", "", 0, 0,
+ ".na", "\\raggedright", 0, 0,
+ ".nf", "\\begin{verbatim}", 0, 0,
+ ".ns", "", 0, 0,
+ ".ul", "\\undertext", 2, 0
+};
--- /dev/null
+/*
+This file contains a list of the words that have simple
+correspondence in the two languages.
+Do not put here words that require action (like sub).
+If the word is identical in the two languages (except for TeX's backslash),
+put it in simil.h
+*/
+
+struct math_equiv {
+ char *troff_symb, *tex_symb;
+} math[] = {
+/* troff name TeX name */
+
+ "~", "\\ ",
+ "^", "\\,",
+ "above", "\\cr",
+ "ccol", "\\matrix",
+ "cpile", "\\matrix",
+ "fat", "",
+ "grad", "\\nabla",
+ "half", "{1\\over 2}",
+ "inf", "\\infty",
+ "inter", "\\cap",
+ "lcol", "\\matrix",
+ "lineup", "",
+ "lpile", "\\matrix",
+ "mark", "",
+ "nothing", "",
+ "pile", "\\matrix",
+ "rcol", "\\matrix",
+ "rpile", "\\matrix",
+ "union", "\\cup"
+};
--- /dev/null
+/* setup file */
+
+#ifndef NO_SGTTY
+#define HAVE_SGTTY 1 /* host has sgtty.h and ioctl.h */
+#endif
+
+#include <stdio.h>
+#include <ctype.h>
+#ifdef SYSV
+#include <string.h>
+#include <stdlib.h> /* for type declarations */
+#else
+#ifdef MSC
+#include <string.h>
+#include <stdlib.h> /* for type declarations */
+#include <io.h> /* for type declarations */
+#else
+#include <strings.h>
+#endif
+#endif
+
+#if HAVE_SGTTY
+#include <sys/ioctl.h>
+#include <sgtty.h>
+#endif
+
+#define MAXLEN 65535 /* maximum length of document */
+#define MAXWORD 2500 /* maximum word length */
+#define MAXLINE 500 /* maximum line length */
+#define MAXDEF 200 /* maximum number of defines */
+
+#include <malloc.h>
+#ifdef IN_TR /* can only declare globals once */
+#else
+extern
+#endif
+int math_mode, /* math mode status */
+ de_arg, /* .de argument */
+ IP_stat, /* IP status */
+ QP_stat, /* QP status */
+ TP_stat; /* TP status */
+
+#ifdef IN_TR /* can only declare globals once */
+#else
+extern
+#endif
+struct defs {
+ char *def_macro;
+ char *replace;
+ int illegal;
+} def[MAXDEF];
+
+#ifdef IN_TR /* can only declare globals once */
+#else
+extern
+#endif
+struct mydefs {
+ char *def_macro;
+ char *replace;
+ int illegal;
+ int arg_no;
+ int par; /* if it impiles (or contains) a par break */
+} mydef[MAXDEF];
+
+#ifdef IN_TR /* can only declare globals once */
+#else
+extern
+#endif
+struct measure {
+ char old_units[MAXWORD]; float old_value;
+ char units[MAXWORD]; float value;
+ char def_units[MAXWORD]; /* default units */
+ int def_value; /* default value: 0 means take last one */
+} linespacing, indent, tmpind, space, vspace;
+
+#ifdef ANSI
+char* alternate(char*, char*, char*);
+int CAP_GREEK(char*);
+char* do_table(char*,char*,int);
+char* end_env(char*);
+void envoke_stat(int);
+char* flip(char*,char*);
+char* flip_twice(char*,char*,char*);
+int get_arg(char*,char*,int ,int );
+void get_brace_arg(char*,char*);
+int get_defword(char*,char*,int*);
+int get_line(char*,char*,int );
+int get_multi_line(char*,char*);
+int get_mydef(char*,char*);
+int get_N_lines(char *,char *,int);
+int get_no_math(char*,char*);
+char* get_over_arg(char*,char*);
+int get_ref(char*,char*);
+int get_string(char*,char*,int );
+void get_size(char*,char*,char*);
+int get_sub_arg(char*,char*);
+int get_till_space(char*,char*);
+int getdef(char*,char*);
+int getword(char*,char*);
+void GR_to_Greek(char*,char*);
+int is_def(char*);
+int is_flip(char*);
+int is_forbid(char*);
+int is_mathcom(char*,char*);
+int is_mydef(char *);
+int is_troff_mac(char*,char*,int*);
+int main(int ,char **);
+void parse_units(char*,int,int,int);
+void scrbuf(FILE*,FILE*);
+int similar(char*);
+char* skip_line(char*);
+int skip_white(char*);
+char* strapp(char*,char*);
+void tmpbuf(FILE*,char*);
+void troff_tex(char *,char *,int );
+#else
+char* alternate();
+int CAP_GREEK();
+char* do_table();
+char* end_env();
+void envoke_stat();
+char* flip();
+char* flip_twice();
+int get_arg();
+void get_brace_arg();
+int get_defword();
+int get_line();
+int get_multi_line();
+int get_mydef();
+int get_N_lines();
+int get_no_math();
+char* get_over_arg();
+int get_ref();
+int get_string();
+void get_size();
+int get_till_space();
+int get_sub_arg();
+int getdef();
+int getword();
+void GR_to_Greek();
+int is_def();
+int is_flip();
+int is_forbid();
+int is_mathcom();
+int is_mydef();
+int is_troff_mac();
+int main();
+void parse_units();
+void scrbuf();
+int similar();
+char* skip_line();
+int skip_white();
+char* strapp();
+void tmpbuf();
+void troff_tex();
+#endif
--- /dev/null
+/*
+This file contains a list of math words that are similar in the
+two languages (in fact identical except for TeX's backslah).
+If I overlooked anything out, it can be put here
+Do NOT put here words that are similar but require some action (like over)
+*/
+char *sim_list[] =
+{
+"alpha", "approx", "beta", "cdot", "chi", "cos",
+"cosh", "cot", "coth", "delta", "epsilon", "eta",
+"exp", "gamma", "int", "kappa", "lambda", "lim",
+"log", "matrix", "mu", "nu", "omega", "partial",
+"phi", "pi", "prime", "prod", "psi", "rho",
+"sigma", "sin", "sinh", "sqrt", "sum", "tan",
+"tanh", "tau", "theta", "times", "xi", "zeta"
+};
--- /dev/null
+/* COPYRIGHT (C) 1987 Kamal Al-Yahya */
+/*
+ These subroutines do (in general) small things for the translator.
+ They appear in alphabetical order and their names are unique in the
+ first six characters.
+*/
+
+#include "setups.h"
+#include "simil.h"
+#include "greek.h"
+#include "flip.h"
+#include "forbid.h"
+#include "maths.h"
+#include "macros.h"
+
+extern def_count;
+extern mydef_count;
+
+#define NULL_C '\0'
+
+/* compile-time counting of elements */
+int GRK_count = (sizeof(GRK_list)/sizeof(GRK_list[0]));
+int sim_count = (sizeof(sim_list)/sizeof(sim_list[0]));
+int flip_count = (sizeof(flip_list)/sizeof(flip_list[0]));
+int forbd_count = (sizeof(forbid)/sizeof(forbid[0]));
+int mathcom_count = (sizeof(math)/sizeof(struct math_equiv));
+int macro_count = (sizeof(macro)/sizeof(struct macro_table));
+
+char *
+alternate(inbuf,outbuf,w) /* alternate fonts (manual macro) */
+ char *inbuf, *outbuf, *w;
+{
+ int f1,f2;
+ int which=1;
+ char font[MAXWORD], font1[MAXWORD], font2[MAXWORD],
+ ww[MAXWORD], tmp[MAXWORD];
+
+ tmp[0] = NULL_C;
+ f1 = w[1]; f2 = w[2];
+ if (f1 == 'R') strcpy(font1,"\\rm");
+ if (f1 == 'I') strcpy(font1,"\\it");
+ if (f1 == 'B') strcpy(font1,"\\bf");
+ if (f2 == 'R') strcpy(font2,"\\rm");
+ if (f2 == 'I') strcpy(font2,"\\it");
+ if (f2 == 'B') strcpy(font2,"\\bf");
+
+ strcpy(font,font1);
+ while (*inbuf != '\n' && *inbuf != NULL_C)
+ {
+ inbuf += get_arg(inbuf,ww,1);
+ sprintf(tmp,"{%s %s}",font,ww);
+ outbuf = strapp(outbuf,tmp);
+ if (which == 1)
+ {
+ which = 2;
+ strcpy(font,font2);
+ }
+ else
+ {
+ which = 1;
+ strcpy(font,font1);
+ }
+ while (*inbuf == ' ' || *inbuf == '\t')
+ inbuf++;
+ }
+
+ return(outbuf);
+}
+
+int
+CAP_GREEK(w) /* check if w is in the GREEK list */
+ char *w;
+{
+ int i;
+
+ for (i=0; i < GRK_count ; i++)
+ {
+ if (strcmp(GRK_list[i],w) == 0)
+ return(1);
+ }
+ return(-1);
+}
+
+char *
+do_table(inbuf,outbuf,offset)
+ char *inbuf, *outbuf;
+ int *offset; /* amount to offset inbuf */
+{
+ char w[MAXWORD], ww[MAXWORD], format[MAXWORD], tmp[MAXWORD];
+ char *ptr;
+ int i,j,len,columns=0;
+ int tab = '\t'; /* default tab */
+
+ tmp[0] = NULL_C;
+ ptr = inbuf; /* remember where we started */
+ len = get_line(inbuf,w,0);
+ if (w[strlen(w)-1] == ';') /* options */
+ {
+ inbuf += len;
+ if (strncmp(w,"tab",3) == 0) /* get the tab charecter */
+ tab = w[4]; /* expect something like tab(&); */
+ inbuf = skip_line(inbuf);
+ }
+ while (*inbuf != NULL_C) /* get the LAST format line */
+ {
+ len = get_line(inbuf,w,0);
+ if (w[strlen(w)-1] != '.') break; /* not a fromat line */
+ inbuf += len;
+ for (i=0, j=0; i<len-1; i++)
+ {
+ if (isspace(w[i])) continue;
+ columns++;
+ if (w[i] == 'l') format[j] = 'l';
+ else if (w[i] == 'r') format[j] = 'r';
+ else format[j] = 'c';
+ j++;
+ }
+ }
+ if (columns == 0)
+ {
+ fprintf(stderr,"Sorry, I cannot do tables without a format line\n\
+Doing plain translation of table, lines will be commented\n\
+You need to fix it yourself\n");
+ while (*inbuf != NULL_C)
+ {
+ (void) getword(inbuf,w);
+ if (strcmp(w,".TE") == 0) {inbuf += 4; break;}
+ inbuf += get_line(inbuf,w,1);
+ *outbuf++ = '%';
+ outbuf = strapp(outbuf,w);
+ outbuf = strapp(outbuf,"\n");
+ inbuf++; /* skip the \n */
+ }
+ *offset = inbuf - ptr;
+ return(outbuf);
+ }
+ format[j] = NULL_C;
+ sprintf(tmp,"\\par\n\\begin{tabular}{%s}\n",format);
+ outbuf = strapp(outbuf,tmp);
+
+ while (*inbuf != NULL_C)
+ {
+ for (i=0; i<columns-1; i++)
+ {
+ (void) getword(inbuf,w);
+ if (i == 0 && (strcmp(w,"\n") == 0 || strcmp(w,"_") == 0))
+ {inbuf++; i--; continue;}
+ if (strcmp(w,".TE") == 0)
+ {
+ inbuf += 4;
+ if (i == 0)
+ {
+ outbuf -= 3; /* take back the \\ and the \n */
+ *outbuf = NULL_C;
+ }
+ outbuf = strapp(outbuf,"\n\\end{tabular}\n\\par\n");
+ *offset = inbuf - ptr;
+ return(outbuf);
+ }
+ inbuf += get_table_entry(inbuf,w,tab);
+ inbuf ++; /* skip tab */
+ troff_tex(w,ww,0,1);
+ sprintf(tmp,"%s & ",ww);
+ outbuf = strapp(outbuf,tmp);
+ }
+ (void) getword(inbuf,w);
+ if (strcmp(w,".TE") == 0)
+ {
+ fprintf(stderr,"Oops! I goofed. I told I you I am not very good at tables\nI've encountered an unexpected end for the table\n\
+You need to fix it yourself\n");
+ inbuf += 4;
+ outbuf = strapp(outbuf,"\\end{tabular}\n\\par\n");
+ *offset = inbuf - ptr;
+ return(outbuf);
+ }
+ inbuf += get_table_entry(inbuf,w,'\n');
+ inbuf++; /* skip tab */
+ troff_tex(w,ww,0,1);
+ outbuf = strapp(outbuf,ww);
+ outbuf = strapp(outbuf,"\\\\\n");
+ }
+ fprintf(stderr,"Oops! I goofed. I told I you I am not very good at tables\n\
+File ended and I haven't finished the table!\n\
+You need to fix it yourself\n");
+ *offset = inbuf - ptr;
+ outbuf = strapp(outbuf,"\\end{tabular}\n\\par\n");
+ return(outbuf);
+}
+
+char *
+end_env(outbuf)
+ char *outbuf;
+{
+ if (IP_stat)
+ {
+ IP_stat=0;
+ outbuf = strapp(outbuf,"\\end{scitem}");
+ }
+ if (QP_stat)
+ {
+ QP_stat=0;
+ outbuf = strapp(outbuf,"\\end{quotation}");
+ }
+ if (TP_stat)
+ {
+ TP_stat=0;
+ /** JPC
+ outbuf = strapp(outbuf,"\\end{TPlist}"); **/
+ outbuf = strapp(outbuf,"\\end{scitem}% end Env\n");
+ }
+ return(outbuf);
+}
+
+void
+envoke_stat(par)
+ int par;
+{
+
+ switch(par)
+ {
+ case 2:
+ IP_stat = 1;
+ break;
+ case 3:
+ TP_stat = 1;
+ break;
+ case 4:
+ QP_stat = 1;
+ break;
+ default:
+ break;
+ }
+}
+
+char *
+flip(outbuf,w) /* do the flipping */
+ char *outbuf, *w;
+{
+ int lb=0, rb=0;
+ char ww[MAXWORD], tmp[MAXWORD];
+
+ ww[0] = NULL_C; tmp[0] = NULL_C;
+ outbuf--;
+ while (*outbuf == ' ' || *outbuf == '\t' || *outbuf == '\n')
+ outbuf--;
+ while (1)
+ {
+ if (*outbuf == '{')
+ {
+ lb++;
+ if (lb > rb) break;
+ }
+ if (*outbuf == '}') rb++;
+ if (rb == 0)
+ {
+ if (*outbuf != ' ' && *outbuf != '\t' && *outbuf != '\n'
+ && *outbuf != '$')
+ {
+ outbuf--;
+ continue;
+ }
+ else break;
+ }
+ outbuf--;
+ if (lb == rb && lb != 0) break;
+ }
+ outbuf++;
+ if (*outbuf == '\\')
+ {
+ outbuf++;
+ (void) getword(outbuf,tmp);
+ sprintf(ww,"\\%s",tmp);
+ outbuf--;
+ }
+ else if (*outbuf == '{')
+ (void) get_brace_arg(outbuf,ww);
+ else
+ (void) getword(outbuf,ww);
+ *outbuf = NULL_C;
+ sprintf(tmp,"\\%s %s",w,ww);
+ outbuf = strapp(outbuf,tmp);
+ return(outbuf);
+}
+
+char *
+flip_twice(outbuf,w,ww) /* take care of things like x hat under */
+ char *outbuf, *w, *ww;
+{
+ int lb=0, rb=0;
+ char tmp1[MAXWORD], tmp2[MAXWORD];
+
+ tmp1[0] = NULL_C; tmp2[0] = NULL_C;
+ outbuf--;
+ while (*outbuf == ' ' || *outbuf == '\t' || *outbuf == '\n')
+ outbuf--;
+ while (1)
+ {
+ if (*outbuf == '{')
+ {
+ lb++;
+ if (lb > rb) break;
+ }
+ if (*outbuf == '}') rb++;
+ if (rb == 0)
+ {
+ if (*outbuf != ' ' && *outbuf != '\t' && *outbuf != '\n'
+ && *outbuf != '$')
+ {
+ outbuf--;
+ continue;
+ }
+ else break;
+ }
+ outbuf--;
+ if (lb == rb && lb != 0) break;
+ }
+ outbuf++;
+ if (*outbuf == '\\')
+ {
+ outbuf++;
+ (void) getword(outbuf,tmp2);
+ sprintf(tmp1,"\\%s",tmp2);
+ outbuf--;
+ }
+ else if (*outbuf == '{')
+ (void) get_brace_arg(outbuf,tmp1);
+ else
+ (void) getword(outbuf,tmp1);
+ *outbuf = NULL_C;
+ sprintf(tmp2,"\\%s{\\%s %s}",w,ww,tmp1);
+ outbuf = strapp(outbuf,tmp2);
+ return(outbuf);
+}
+
+int
+get_arg(inbuf,w,rec) /* get argumnet */
+ char *inbuf, *w;
+ int rec; /* rec=1 means recursive */
+{
+ int c,len,i;
+ char ww[MAXWORD];
+ int delim;
+
+ len=0;
+ while ((c = *inbuf) == ' ' || c == '\t') /* skip spaces and tabs */
+ {inbuf++; len++;}
+ i=0;
+ if (*inbuf == '{' || *inbuf == '\"')
+ {
+ if (*inbuf == '{') delim = '}';
+ else delim = '\"';
+ inbuf++; len++;
+ while ((c = *inbuf++) != NULL_C && c != delim && i < MAXWORD)
+ {
+ if (c == ' ' && delim == '\"') ww[i++] = '\\';
+ ww[i++] = (char)c; len++;
+ }
+ len++;
+ }
+ else
+ {
+ while ((c = *inbuf++) != NULL_C && c != ' ' && c != '\t' && c != '\n'
+ && c != '$' && c != '}' && i < MAXWORD)
+ {
+ if (math_mode && c == '~') break;
+ ww[i++] = (char)c; len++;
+ }
+ }
+ ww[i] = NULL_C;
+ if (rec == 1) /* check if recursion is rquired */
+ troff_tex(ww,w,1,1);
+ else
+ strcpy(w,ww);
+ return(len);
+}
+
+void
+get_brace_arg(buf,w) /* get argumnet surrounded by braces */
+ char *buf, *w;
+{
+ int c,i, lb=0, rb=0;
+
+ i=0;
+ while ((c = *buf++) != NULL_C)
+ {
+ w[i++] = (char)c;
+ if (c == '{') lb++;
+ if (c == '}') rb++;
+ if (lb == rb) break;
+ }
+ w[i] = NULL_C;
+}
+
+int
+get_defword(inbuf,w,illegal) /* get "define" or .de word */
+ char *inbuf, *w; /* delimited by space only */
+ int *illegal;
+{
+ int c,i;
+
+ *illegal = 0;
+ for (i=0; (c = *inbuf++) != NULL_C && c != ' ' && c != '\n'
+ && c != '\t' && i < MAXWORD; i++)
+ {
+ w[i] = (char)c;
+ if (isalpha(c) == 0) *illegal = 1; /* illegal TeX macro */
+ }
+ w[i] = NULL_C;
+ if (*illegal == 0)
+ if (is_forbid(w) >= 0) *illegal=1;
+ return(i);
+}
+
+int
+get_line(inbuf,w,rec) /* get the rest of the line */
+ char *inbuf, *w;
+ int rec; /* rec=1 means recursion is required */
+{
+ int c,i,len;
+ char ww[MAXLINE];
+
+ i=0; len=0;
+ while ((c = *inbuf++) != NULL_C && c != '\n' && len < MAXLINE)
+ {ww[i++] = (char)c; len++;}
+ ww[i] = NULL_C;
+ if (rec == 1)
+ troff_tex(ww,w,0,1);
+ else
+ strcpy(w,ww);
+ return(len);
+}
+
+int
+get_multi_line(inbuf,w) /* get multi-line argument */
+ char *inbuf, *w;
+{
+ int len=0,l=0,lines=0;
+ char tmp[MAXWORD];
+ int c1,c2;
+
+ w[0] = NULL_C; tmp[0] = NULL_C;
+ while (*inbuf != NULL_C)
+ {
+ c1 = *inbuf; c2 = *++inbuf; --inbuf;
+ if (c1 == '.' && isupper(c2)) break;
+ lines++;
+ if (lines > 1)
+ strcat(w," \\\\\n");
+ l = get_line(inbuf,tmp,1);
+ strcat(w,tmp);
+ len += l+1; inbuf += l+1;
+ }
+ len--; inbuf--;
+ return(len);
+}
+
+int
+get_verbatim_lines(inbuf,w) /* JPC get .nf .fi argument */
+ char *inbuf, *w;
+{
+ int len=0,l=0,lines=0;
+ char tmp[MAXWORD];
+ int c1,c2;
+
+ w[0] = NULL_C; tmp[0] = NULL_C;
+ while (*inbuf != NULL_C)
+ {
+ c1 = *inbuf; c2 = *++inbuf; --inbuf;
+ if (c1 == '.' && c2=='f') break;
+ lines++;
+ if (lines > 1)
+ strcat(w,"\n");
+ l = get_line(inbuf,tmp,0); /* no recursion on verbatim */
+ strcat(w,tmp);
+ len += l+1; inbuf += l+1;
+ }
+ len--; inbuf--;
+ return(len);
+}
+
+int
+get_mydef(inbuf,w) /* get the macro substitution */
+ char *inbuf, *w;
+{
+ int c1,c2,l,len;
+ char tmp[MAXWORD];
+
+ tmp[0] = NULL_C;
+ len=1;
+ while (*inbuf != NULL_C)
+ {
+ c1 = *inbuf; c2 = *++inbuf; --inbuf;
+ if (c1 == '.' && c2 == '.') break;
+ l = get_line(inbuf,tmp,1);
+ strcat(w,tmp);
+ len += l+1; inbuf += l+1;
+ }
+ return(len);
+}
+int
+get_N_lines(inbuf,w,N) /* get N lines */
+ char *inbuf, *w;
+ int N;
+{
+ int len=0,l=0,lines=0;
+ char tmp[MAXWORD];
+
+ w[0] = NULL_C; tmp[0] = NULL_C;
+ while (*inbuf != NULL_C && lines < N)
+ {
+ lines++;
+ if (lines > 1)
+ strcat(w," \\\\\n");
+ l = get_line(inbuf,tmp,1);
+ strcat(w,tmp);
+ len += l+1; inbuf += l+1;
+ }
+ len--; inbuf--;
+ return(len);
+}
+
+int
+get_no_math(inbuf,w) /* get text surrounded by quotes in math mode */
+ char *inbuf, *w;
+{
+ int c,i,len;
+
+ len = 0;
+ for (i=0; (c = *inbuf++) != NULL_C && c != '\"' && i < MAXWORD; i++)
+ {
+ if (c == '{' || c == '}')
+ {w[i] = '\\'; w[++i] = (char)c;}
+ else
+ w[i] = (char)c;
+ len++;
+ }
+ w[i] = NULL_C;
+ return(len);
+}
+
+char *
+get_over_arg(inbuf,ww) /* get the denominator of over */
+ char *inbuf, *ww;
+{
+ char w[MAXWORD], tmp1[MAXWORD], tmp2[MAXWORD];
+ int len;
+
+ w[0] = NULL_C; tmp1[0] = NULL_C; tmp2[0] = NULL_C;
+ inbuf += getword(inbuf,tmp1); /* read first word */
+ inbuf += skip_white(inbuf);
+ len = getword(inbuf,tmp2); /* read second word */
+ strcat(w,tmp1); strcat(w," ");
+
+ /* as long as there is a sup or sub read the next two words */
+ while (strcmp(tmp2,"sub") == 0 || strcmp(tmp2,"sup") == 0)
+ {
+ inbuf += len;
+ strcat(w,tmp2); strcat(w," ");
+ inbuf += skip_white(inbuf);
+ inbuf += getword(inbuf,tmp1);
+ strcat(w,tmp1); strcat(w," ");
+ inbuf += skip_white(inbuf);
+ len = getword(inbuf,tmp2);
+ }
+ troff_tex(w,ww,0,1);
+ return(inbuf);
+}
+
+int
+get_ref(inbuf,w) /* get reference */
+ char *inbuf, *w;
+{
+ int len=0, l=0, lines=0;
+ char tmp[MAXWORD];
+
+ w[0] = NULL_C; tmp[0] = NULL_C;
+ while (*inbuf != NULL_C)
+ {
+ if (*inbuf == '\n') break;
+ (void) getword(inbuf,tmp);
+ if (tmp[0] == '.' && isupper(tmp[1]))
+ {
+ /* these commands don't cause a break in reference */
+ if (strcmp(tmp,".R") != 0 && strcmp(tmp,".I") != 0
+ && strcmp(tmp,".B") != 0)
+ break;
+ }
+ else if (tmp[0] == '.' && !(isupper(tmp[1])))
+ {
+ /* these commands don't cause a break in reference */
+ if (strcmp(tmp,".br") != 0 && strcmp(tmp,".bp") != 0)
+ break;
+ }
+ l = get_line(inbuf,tmp,1);
+ lines++;
+ if (lines > 1) strcat(w," ");
+ strcat(w,tmp);
+ len += l+1; inbuf += l+1;
+ }
+ len--; inbuf--;
+ return(len);
+}
+
+void
+get_size(ww,PARAMETER)
+ char *ww;
+ struct measure *PARAMETER;
+{
+ int sign=0, units=0;
+ float value;
+
+ if (ww[0] == NULL_C)
+ {
+ if (PARAMETER->def_value == 0)
+ {
+ PARAMETER->value = PARAMETER->old_value;
+ strcpy(PARAMETER->units,PARAMETER->old_units);
+ }
+ else
+ {
+ PARAMETER->value = PARAMETER->def_value;
+ strcpy(PARAMETER->units,PARAMETER->def_units);
+ }
+ }
+ else
+ {
+ PARAMETER->old_value = PARAMETER->value;
+ strcpy(PARAMETER->old_units,PARAMETER->units);
+ parse_units(ww,&sign,&value,&units);
+ if (units == 'p')
+ strcpy(PARAMETER->units,"pt");
+ else if (units == 'i')
+ strcpy(PARAMETER->units,"in");
+ else if (units == 'c')
+ strcpy(PARAMETER->units,"cm");
+ else if (units == 'm')
+ strcpy(PARAMETER->units,"em");
+ else if (units == 'n')
+ {
+ value = .5*value; /* n is about half the width of m */
+ strcpy(PARAMETER->units,"em");
+ }
+ else if (units == 'v')
+ strcpy(PARAMETER->units,"ex");
+ else if (units == 0)
+ {
+ if (sign == 0 || PARAMETER->old_units[0] == NULL_C)
+ strcpy(PARAMETER->units,PARAMETER->def_units);
+ else
+ strcpy(PARAMETER->units,PARAMETER->old_units);
+ }
+ else
+ {
+ fprintf(stderr,"unknown units %c, using default units\n");
+ strcpy(PARAMETER->units,PARAMETER->def_units);
+ }
+ if (sign == 0) PARAMETER->value = value;
+ else PARAMETER->value = PARAMETER->old_value + sign*value;
+ }
+}
+
+int
+get_string(inbuf,w,rec) /* get the rest of the line -- Nelson Beebe */
+ char *inbuf, *w;
+ int rec; /* rec=1 means recursion is required */
+{
+ register int c,i,len;
+ char ww[MAXLINE];
+ register char *start;
+
+ if (*inbuf != '\"')
+ return(get_line(inbuf,w,rec));
+ start = inbuf; /* remember start so we can find len */
+ i=0;
+ inbuf++; /* point past initial quote */
+ while ((c = *inbuf++) != NULL_C && c != '\"' && c != '\n' && i < MAXLINE)
+ ww[i++] = (char)c;
+ ww[i] = NULL_C;
+ if (c != '\n') /* flush remainder of line */
+ while ((c = *inbuf++) != '\n')
+ /* NO-OP */;
+ len = inbuf - start - 1; /* count only up to NL, not past */
+ if (rec == 1)
+ troff_tex(ww,w,0,1);
+ else
+ strcpy(w,ww);
+ return(len);
+}
+
+int
+get_sub_arg(inbuf,w) /* get the argument for sub and sup */
+ char *inbuf, *w;
+{
+ int c,len,i;
+ char ww[MAXWORD], tmp[MAXWORD];
+
+ len=0; tmp[0] = NULL_C;
+ while ((c = *inbuf) == ' ' || c == '\t')
+ {inbuf++; len++;}
+ i=0;
+ while ((c = *inbuf++) != NULL_C && c != ' ' && c != '\t' && c != '\n'
+ && c != '$' && c != '}' && c != '~' && i < MAXWORD)
+ {ww[i++] = (char)c; len++;}
+ ww[i] = NULL_C;
+ if (strcmp(ww,"roman") == 0 || strcmp(ww,"bold") == 0 || strcmp(w,"italic") == 0)
+ {
+ (void) get_arg(inbuf,tmp,0);
+ sprintf(ww,"%s%c%s",ww,c,tmp);
+ len += strlen(tmp)+1;
+ }
+ troff_tex(ww,w,0,1); /* recursive */
+ return(len);
+}
+
+int
+get_table_entry(inbuf,w,tab)
+ char *inbuf, *w;
+ int tab;
+{
+ int c, i=0;
+
+ for (i=0; (c = *inbuf++) != NULL_C && c != tab && i < MAXWORD; i++)
+ w[i] = (char)c;
+ w[i] = NULL_C;
+
+ return(i);
+}
+
+int
+get_till_space(inbuf,w) /* get characters till the next space */
+ char *inbuf, *w;
+{
+ int c,i;
+
+ for (i=0; (c = *inbuf++) != NULL_C && c != ' ' && c != '\n'
+ && c != '\t' && i < MAXWORD; i++)
+ w[i] = (char)c;
+ w[i] = NULL_C;
+ return(i);
+}
+
+int
+getdef(inbuf,ww) /* get the define substitution */
+ char *inbuf, *ww;
+{
+ int c,i,len;
+ int def_delim;
+ char w[MAXWORD];
+
+ def_delim = *inbuf++; /* take first character as delimiter */
+ len=1; i=0;
+ while ((c = *inbuf++) != NULL_C && c != def_delim && i < MAXWORD)
+ {len++; w[i++] = (char)c;}
+ w[i] = NULL_C;
+ len++;
+ if (c != def_delim)
+ {
+ fprintf(stderr,"WARNING: missing right delimiter in define, define=%s\n",w);
+ len--;
+ }
+ troff_tex(w,ww,0,1); /* now translate the substitution */
+ return(len);
+}
+
+int
+getword(inbuf,w) /* get an alphanumeric word (dot also) */
+ char *inbuf, *w;
+{
+ int c,i;
+
+ for (i=0; (c = *inbuf++) != NULL_C
+ && (isalpha(c) || isdigit(c) || c == '.') && i < MAXWORD; i++)
+ w[i] = (char)c;
+ if (i == 0 && c != NULL_C)
+ w[i++] = (char)c;
+ w[i] = NULL_C;
+ return(i);
+}
+
+void
+GR_to_Greek(w,ww) /* change GREEK to Greek */
+ char *w, *ww;
+{
+ *ww++ = '\\'; *ww++ = *w;
+ while(*++w != NULL_C)
+ *ww++ = tolower(*w);
+ *ww = NULL_C;
+}
+
+int
+is_def(w) /* check if w was defined by the user */
+ char *w;
+{
+ int i;
+
+ for (i=0; i < def_count; i++)
+ {
+ if (strcmp(def[i].def_macro,w) == 0)
+ return(i);
+ }
+ return(-1);
+}
+
+int
+is_flip(w) /* check if w is in the flip list */
+ char *w;
+{
+ int i;
+
+ for (i=0; i < flip_count; i++)
+ {
+ if (strcmp(flip_list[i],w) == 0)
+ return(i);
+ }
+ return(-1);
+}
+
+int
+is_forbid(w) /* check if w is one of those sacred macros */
+ char *w;
+{
+ int i;
+
+ for (i=0; i < forbd_count; i++)
+ {
+ if (strcmp(forbid[i],w) == 0)
+ return(i);
+ }
+ return(-1);
+}
+
+int
+is_mathcom(w,ww) /* check if w has a simple correspondence in TeX */
+ char *w,*ww;
+{
+ int i;
+
+ for (i=0; i < mathcom_count; i++)
+ {
+ if (strcmp(math[i].troff_symb,w) == 0)
+ {
+ strcpy(ww,math[i].tex_symb);
+ return(i);
+ }
+ }
+ return(-1);
+}
+
+int
+is_mydef(w) /* check if w is user-defined macro */
+ char *w;
+{
+ int i;
+
+ for (i=0; i < mydef_count; i++)
+ {
+ if (strcmp(mydef[i].def_macro,w) == 0)
+ return(i);
+ }
+ return(-1);
+}
+
+int
+is_troff_mac(w,ww,arg,par)/* check if w is a macro or plain troff command */
+ char *w,*ww;
+ int *arg,*par;
+{
+ int i;
+
+ for (i=0; i < macro_count; i++)
+ {
+ if (strcmp(macro[i].troff_mac,w) == 0)
+ {
+ strcpy(ww,macro[i].tex_mac);
+ *arg = macro[i].arg;
+ *par = macro[i].macpar;
+ return(i);
+ }
+ }
+ return(-1);
+}
+
+void
+parse_units(ww,sign,value,units)
+ char *ww;
+ int *sign, *units;
+ float *value;
+{
+ int len, k=0, i;
+ char tmp[MAXWORD];
+
+ len = strlen(ww);
+ if (ww[0] == '-') *sign = -1;
+ else if (ww[0] == '+') *sign = 1;
+ if (*sign != 0) k++;
+
+ i=0;
+ while (k < len)
+ {
+ if (isdigit(ww[k]) || ww[k] == '.')
+ tmp[i++] = ww[k++];
+ else break;
+ }
+ tmp[i] = NULL_C;
+ sscanf(tmp,"%f",value);
+ i=0;
+ if (k < len)
+ {
+ *units = ww[k++];
+ if (k < len)
+ fprintf(stderr,
+ "Suspect problem in parsing %s, unit used is %c\n",ww,*units);
+ }
+}
+
+void
+scrbuf(in,out) /* copy input to output */
+ FILE *in,*out;
+{
+ int c;
+ while ((c =getc(in)) != EOF) putc(c,out);
+}
+
+int
+similar(w) /* check if w is in the similar list */
+ char *w;
+{
+ int i;
+
+ for (i=0; i < sim_count ; i++)
+ {
+ if (strcmp(sim_list[i],w) == 0)
+ return(1);
+ }
+ return(-1);
+}
+
+char *
+skip_line(inbuf) /* ignore the rest of the line */
+ char *inbuf;
+{
+ while (*inbuf != '\n' && *inbuf != NULL_C)
+ inbuf++;
+ if (*inbuf == NULL_C) return(inbuf);
+ else return(++inbuf);
+}
+
+int
+skip_white(inbuf) /* skip white space */
+ char *inbuf;
+{
+ int c,len=0;
+
+ while ((c = *inbuf++) == ' ' || c == '\t' || c == '\n')
+ len++;
+ return(len);
+}
+
+char *
+strapp(s,tail) /* copy tail[] to s[], return ptr to terminal NULL_C in s[] */
+ register char *s; /* Nelson Beebe */
+ register char *tail;
+{
+ while (*s++ = *tail++)
+ /*NO-OP*/;
+ return (s-1); /* pointer to NULL_C at end of s[] */
+}
+
+void
+tmpbuf(in,buffer)
+ /* copy input to buffer, buffer holds only MAXLEN characters */
+ FILE *in;
+ char *buffer;
+{
+ int c;
+ unsigned int l=0;
+
+ while (l++ < MAXLEN && (c = getc(in)) != EOF)
+ *buffer++ = (char)c;
+ if (l >= MAXLEN)
+ {
+ fprintf(stderr,"Sorry: document is too large\n");
+ exit(-1);
+ }
+ *buffer = NULL_C;
+}
--- /dev/null
+/* COPYRIGHT (C) 1987 Kamal Al-Yahya */
+/*
+ These subroutines do (in general) small things for the translator.
+ They appear in alphabetical order and their names are unique in the
+ first six characters.
+*/
+
+#include "setups.h"
+#include "simil.h"
+#include "greek.h"
+#include "flip.h"
+#include "forbid.h"
+#include "maths.h"
+#include "macros.h"
+
+extern def_count;
+extern mydef_count;
+
+#define NULL_C '\0'
+
+/* compile-time counting of elements */
+int GRK_count = (sizeof(GRK_list)/sizeof(GRK_list[0]));
+int sim_count = (sizeof(sim_list)/sizeof(sim_list[0]));
+int flip_count = (sizeof(flip_list)/sizeof(flip_list[0]));
+int forbd_count = (sizeof(forbid)/sizeof(forbid[0]));
+int mathcom_count = (sizeof(math)/sizeof(struct math_equiv));
+int macro_count = (sizeof(macro)/sizeof(struct macro_table));
+
+char *
+alternate(inbuf,outbuf,w) /* alternate fonts (manual macro) */
+ char *inbuf, *outbuf, *w;
+{
+ int f1,f2;
+ int which=1;
+ char font[MAXWORD], font1[MAXWORD], font2[MAXWORD],
+ ww[MAXWORD], tmp[MAXWORD];
+
+ tmp[0] = NULL_C;
+ f1 = w[1]; f2 = w[2];
+ if (f1 == 'R') strcpy(font1,"\\rm");
+ if (f1 == 'I') strcpy(font1,"\\it");
+ if (f1 == 'B') strcpy(font1,"\\bf");
+ if (f2 == 'R') strcpy(font2,"\\rm");
+ if (f2 == 'I') strcpy(font2,"\\it");
+ if (f2 == 'B') strcpy(font2,"\\bf");
+
+ strcpy(font,font1);
+ while (*inbuf != '\n' && *inbuf != NULL_C)
+ {
+ inbuf += get_arg(inbuf,ww,1);
+ sprintf(tmp,"{%s %s}",font,ww);
+ outbuf = strapp(outbuf,tmp);
+ if (which == 1)
+ {
+ which = 2;
+ strcpy(font,font2);
+ }
+ else
+ {
+ which = 1;
+ strcpy(font,font1);
+ }
+ while (*inbuf == ' ' || *inbuf == '\t')
+ inbuf++;
+ }
+
+ return(outbuf);
+}
+
+int
+CAP_GREEK(w) /* check if w is in the GREEK list */
+ char *w;
+{
+ int i;
+
+ for (i=0; i < GRK_count ; i++)
+ {
+ if (strcmp(GRK_list[i],w) == 0)
+ return(1);
+ }
+ return(-1);
+}
+
+char *
+do_table(inbuf,outbuf,offset)
+ char *inbuf, *outbuf;
+ int *offset; /* amount to offset inbuf */
+{
+ char w[MAXWORD], ww[MAXWORD], format[MAXWORD], tmp[MAXWORD];
+ char *ptr;
+ int i,j,len,columns=0;
+ int tab = '\t'; /* default tab */
+
+ tmp[0] = NULL_C;
+ ptr = inbuf; /* remember where we started */
+ len = get_line(inbuf,w,0);
+ if (w[strlen(w)-1] == ';') /* options */
+ {
+ inbuf += len;
+ if (strncmp(w,"tab",3) == 0) /* get the tab charecter */
+ tab = w[4]; /* expect something like tab(&); */
+ inbuf = skip_line(inbuf);
+ }
+ while (*inbuf != NULL_C) /* get the LAST format line */
+ {
+ len = get_line(inbuf,w,0);
+ if (w[strlen(w)-1] != '.') break; /* not a fromat line */
+ inbuf += len;
+ for (i=0, j=0; i<len-1; i++)
+ {
+ if (isspace(w[i])) continue;
+ columns++;
+ if (w[i] == 'l') format[j] = 'l';
+ else if (w[i] == 'r') format[j] = 'r';
+ else format[j] = 'c';
+ j++;
+ }
+ }
+ if (columns == 0)
+ {
+ fprintf(stderr,"Sorry, I cannot do tables without a format line\n\
+Doing plain translation of table, lines will be commented\n\
+You need to fix it yourself\n");
+ while (*inbuf != NULL_C)
+ {
+ (void) getword(inbuf,w);
+ if (strcmp(w,".TE") == 0) {inbuf += 4; break;}
+ inbuf += get_line(inbuf,w,1);
+ *outbuf++ = '%';
+ outbuf = strapp(outbuf,w);
+ outbuf = strapp(outbuf,"\n");
+ inbuf++; /* skip the \n */
+ }
+ *offset = inbuf - ptr;
+ return(outbuf);
+ }
+ format[j] = NULL_C;
+ sprintf(tmp,"\\par\n\\begin{tabular}{%s}\n",format);
+ outbuf = strapp(outbuf,tmp);
+
+ while (*inbuf != NULL_C)
+ {
+ for (i=0; i<columns-1; i++)
+ {
+ (void) getword(inbuf,w);
+ if (i == 0 && (strcmp(w,"\n") == 0 || strcmp(w,"_") == 0))
+ {inbuf++; i--; continue;}
+ if (strcmp(w,".TE") == 0)
+ {
+ inbuf += 4;
+ if (i == 0)
+ {
+ outbuf -= 3; /* take back the \\ and the \n */
+ *outbuf = NULL_C;
+ }
+ outbuf = strapp(outbuf,"\n\\end{tabular}\n\\par\n");
+ *offset = inbuf - ptr;
+ return(outbuf);
+ }
+ inbuf += get_table_entry(inbuf,w,tab);
+ inbuf ++; /* skip tab */
+ troff_tex(w,ww,0,1);
+ sprintf(tmp,"%s & ",ww);
+ outbuf = strapp(outbuf,tmp);
+ }
+ (void) getword(inbuf,w);
+ if (strcmp(w,".TE") == 0)
+ {
+ fprintf(stderr,"Oops! I goofed. I told I you I am not very good at tables\nI've encountered an unexpected end for the table\n\
+You need to fix it yourself\n");
+ inbuf += 4;
+ outbuf = strapp(outbuf,"\\end{tabular}\n\\par\n");
+ *offset = inbuf - ptr;
+ return(outbuf);
+ }
+ inbuf += get_table_entry(inbuf,w,'\n');
+ inbuf++; /* skip tab */
+ troff_tex(w,ww,0,1);
+ outbuf = strapp(outbuf,ww);
+ outbuf = strapp(outbuf,"\\\\\n");
+ }
+ fprintf(stderr,"Oops! I goofed. I told I you I am not very good at tables\n\
+File ended and I haven't finished the table!\n\
+You need to fix it yourself\n");
+ *offset = inbuf - ptr;
+ outbuf = strapp(outbuf,"\\end{tabular}\n\\par\n");
+ return(outbuf);
+}
+
+char *
+end_env(outbuf)
+ char *outbuf;
+{
+ if (IP_stat)
+ {
+ IP_stat=0;
+ outbuf = strapp(outbuf,"\\end{itemize}");
+ }
+ if (QP_stat)
+ {
+ QP_stat=0;
+ outbuf = strapp(outbuf,"\\end{quotation}");
+ }
+ if (TP_stat)
+ {
+ TP_stat=0;
+ /** JPC
+ outbuf = strapp(outbuf,"\\end{TPlist}"); **/
+ outbuf = strapp(outbuf,"\\end{itemize}% end Env\n");
+ }
+ return(outbuf);
+}
+
+void
+envoke_stat(par)
+ int par;
+{
+
+ switch(par)
+ {
+ case 2:
+ IP_stat = 1;
+ break;
+ case 3:
+ TP_stat = 1;
+ break;
+ case 4:
+ QP_stat = 1;
+ break;
+ default:
+ break;
+ }
+}
+
+char *
+flip(outbuf,w) /* do the flipping */
+ char *outbuf, *w;
+{
+ int lb=0, rb=0;
+ char ww[MAXWORD], tmp[MAXWORD];
+
+ ww[0] = NULL_C; tmp[0] = NULL_C;
+ outbuf--;
+ while (*outbuf == ' ' || *outbuf == '\t' || *outbuf == '\n')
+ outbuf--;
+ while (1)
+ {
+ if (*outbuf == '{')
+ {
+ lb++;
+ if (lb > rb) break;
+ }
+ if (*outbuf == '}') rb++;
+ if (rb == 0)
+ {
+ if (*outbuf != ' ' && *outbuf != '\t' && *outbuf != '\n'
+ && *outbuf != '$')
+ {
+ outbuf--;
+ continue;
+ }
+ else break;
+ }
+ outbuf--;
+ if (lb == rb && lb != 0) break;
+ }
+ outbuf++;
+ if (*outbuf == '\\')
+ {
+ outbuf++;
+ (void) getword(outbuf,tmp);
+ sprintf(ww,"\\%s",tmp);
+ outbuf--;
+ }
+ else if (*outbuf == '{')
+ (void) get_brace_arg(outbuf,ww);
+ else
+ (void) getword(outbuf,ww);
+ *outbuf = NULL_C;
+ sprintf(tmp,"\\%s %s",w,ww);
+ outbuf = strapp(outbuf,tmp);
+ return(outbuf);
+}
+
+char *
+flip_twice(outbuf,w,ww) /* take care of things like x hat under */
+ char *outbuf, *w, *ww;
+{
+ int lb=0, rb=0;
+ char tmp1[MAXWORD], tmp2[MAXWORD];
+
+ tmp1[0] = NULL_C; tmp2[0] = NULL_C;
+ outbuf--;
+ while (*outbuf == ' ' || *outbuf == '\t' || *outbuf == '\n')
+ outbuf--;
+ while (1)
+ {
+ if (*outbuf == '{')
+ {
+ lb++;
+ if (lb > rb) break;
+ }
+ if (*outbuf == '}') rb++;
+ if (rb == 0)
+ {
+ if (*outbuf != ' ' && *outbuf != '\t' && *outbuf != '\n'
+ && *outbuf != '$')
+ {
+ outbuf--;
+ continue;
+ }
+ else break;
+ }
+ outbuf--;
+ if (lb == rb && lb != 0) break;
+ }
+ outbuf++;
+ if (*outbuf == '\\')
+ {
+ outbuf++;
+ (void) getword(outbuf,tmp2);
+ sprintf(tmp1,"\\%s",tmp2);
+ outbuf--;
+ }
+ else if (*outbuf == '{')
+ (void) get_brace_arg(outbuf,tmp1);
+ else
+ (void) getword(outbuf,tmp1);
+ *outbuf = NULL_C;
+ sprintf(tmp2,"\\%s{\\%s %s}",w,ww,tmp1);
+ outbuf = strapp(outbuf,tmp2);
+ return(outbuf);
+}
+
+int
+get_arg(inbuf,w,rec) /* get argumnet */
+ char *inbuf, *w;
+ int rec; /* rec=1 means recursive */
+{
+ int c,len,i;
+ char ww[MAXWORD];
+ int delim;
+
+ len=0;
+ while ((c = *inbuf) == ' ' || c == '\t') /* skip spaces and tabs */
+ {inbuf++; len++;}
+ i=0;
+ if (*inbuf == '{' || *inbuf == '\"')
+ {
+ if (*inbuf == '{') delim = '}';
+ else delim = '\"';
+ inbuf++; len++;
+ while ((c = *inbuf++) != NULL_C && c != delim && i < MAXWORD)
+ {
+ if (c == ' ' && delim == '\"') ww[i++] = '\\';
+ ww[i++] = (char)c; len++;
+ }
+ len++;
+ }
+ else
+ {
+ while ((c = *inbuf++) != NULL_C && c != ' ' && c != '\t' && c != '\n'
+ && c != '$' && c != '}' && i < MAXWORD)
+ {
+ if (math_mode && c == '~') break;
+ ww[i++] = (char)c; len++;
+ }
+ }
+ ww[i] = NULL_C;
+ if (rec == 1) /* check if recursion is rquired */
+ troff_tex(ww,w,1,1);
+ else
+ strcpy(w,ww);
+ return(len);
+}
+
+void
+get_brace_arg(buf,w) /* get argumnet surrounded by braces */
+ char *buf, *w;
+{
+ int c,i, lb=0, rb=0;
+
+ i=0;
+ while ((c = *buf++) != NULL_C)
+ {
+ w[i++] = (char)c;
+ if (c == '{') lb++;
+ if (c == '}') rb++;
+ if (lb == rb) break;
+ }
+ w[i] = NULL_C;
+}
+
+int
+get_defword(inbuf,w,illegal) /* get "define" or .de word */
+ char *inbuf, *w; /* delimited by space only */
+ int *illegal;
+{
+ int c,i;
+
+ *illegal = 0;
+ for (i=0; (c = *inbuf++) != NULL_C && c != ' ' && c != '\n'
+ && c != '\t' && i < MAXWORD; i++)
+ {
+ w[i] = (char)c;
+ if (isalpha(c) == 0) *illegal = 1; /* illegal TeX macro */
+ }
+ w[i] = NULL_C;
+ if (*illegal == 0)
+ if (is_forbid(w) >= 0) *illegal=1;
+ return(i);
+}
+
+int
+get_line(inbuf,w,rec) /* get the rest of the line */
+ char *inbuf, *w;
+ int rec; /* rec=1 means recursion is required */
+{
+ int c,i,len;
+ char ww[MAXLINE];
+
+ i=0; len=0;
+ while ((c = *inbuf++) != NULL_C && c != '\n' && len < MAXLINE)
+ {ww[i++] = (char)c; len++;}
+ ww[i] = NULL_C;
+ if (rec == 1)
+ troff_tex(ww,w,0,1);
+ else
+ strcpy(w,ww);
+ return(len);
+}
+
+int
+get_multi_line(inbuf,w) /* get multi-line argument */
+ char *inbuf, *w;
+{
+ int len=0,l=0,lines=0;
+ char tmp[MAXWORD];
+ int c1,c2;
+
+ w[0] = NULL_C; tmp[0] = NULL_C;
+ while (*inbuf != NULL_C)
+ {
+ c1 = *inbuf; c2 = *++inbuf; --inbuf;
+ if (c1 == '.' && isupper(c2)) break;
+ lines++;
+ if (lines > 1)
+ strcat(w," \\\\\n");
+ l = get_line(inbuf,tmp,1);
+ strcat(w,tmp);
+ len += l+1; inbuf += l+1;
+ }
+ len--; inbuf--;
+ return(len);
+}
+
+int
+get_verbatim_lines(inbuf,w) /* JPC get .nf .fi argument */
+ char *inbuf, *w;
+{
+ int len=0,l=0,lines=0;
+ char tmp[MAXWORD];
+ int c1,c2;
+
+ w[0] = NULL_C; tmp[0] = NULL_C;
+ while (*inbuf != NULL_C)
+ {
+ c1 = *inbuf; c2 = *++inbuf; --inbuf;
+ if (c1 == '.' && c2=='f') break;
+ lines++;
+ if (lines > 1)
+ strcat(w,"\n");
+ l = get_line(inbuf,tmp,0); /* no recursion on verbatim */
+ strcat(w,tmp);
+ len += l+1; inbuf += l+1;
+ }
+ len--; inbuf--;
+ return(len);
+}
+
+int
+get_mydef(inbuf,w) /* get the macro substitution */
+ char *inbuf, *w;
+{
+ int c1,c2,l,len;
+ char tmp[MAXWORD];
+
+ tmp[0] = NULL_C;
+ len=1;
+ while (*inbuf != NULL_C)
+ {
+ c1 = *inbuf; c2 = *++inbuf; --inbuf;
+ if (c1 == '.' && c2 == '.') break;
+ l = get_line(inbuf,tmp,1);
+ strcat(w,tmp);
+ len += l+1; inbuf += l+1;
+ }
+ return(len);
+}
+int
+get_N_lines(inbuf,w,N) /* get N lines */
+ char *inbuf, *w;
+ int N;
+{
+ int len=0,l=0,lines=0;
+ char tmp[MAXWORD];
+
+ w[0] = NULL_C; tmp[0] = NULL_C;
+ while (*inbuf != NULL_C && lines < N)
+ {
+ lines++;
+ if (lines > 1)
+ strcat(w," \\\\\n");
+ l = get_line(inbuf,tmp,1);
+ strcat(w,tmp);
+ len += l+1; inbuf += l+1;
+ }
+ len--; inbuf--;
+ return(len);
+}
+
+int
+get_no_math(inbuf,w) /* get text surrounded by quotes in math mode */
+ char *inbuf, *w;
+{
+ int c,i,len;
+
+ len = 0;
+ for (i=0; (c = *inbuf++) != NULL_C && c != '\"' && i < MAXWORD; i++)
+ {
+ if (c == '{' || c == '}')
+ {w[i] = '\\'; w[++i] = (char)c;}
+ else
+ w[i] = (char)c;
+ len++;
+ }
+ w[i] = NULL_C;
+ return(len);
+}
+
+char *
+get_over_arg(inbuf,ww) /* get the denominator of over */
+ char *inbuf, *ww;
+{
+ char w[MAXWORD], tmp1[MAXWORD], tmp2[MAXWORD];
+ int len;
+
+ w[0] = NULL_C; tmp1[0] = NULL_C; tmp2[0] = NULL_C;
+ inbuf += getword(inbuf,tmp1); /* read first word */
+ inbuf += skip_white(inbuf);
+ len = getword(inbuf,tmp2); /* read second word */
+ strcat(w,tmp1); strcat(w," ");
+
+ /* as long as there is a sup or sub read the next two words */
+ while (strcmp(tmp2,"sub") == 0 || strcmp(tmp2,"sup") == 0)
+ {
+ inbuf += len;
+ strcat(w,tmp2); strcat(w," ");
+ inbuf += skip_white(inbuf);
+ inbuf += getword(inbuf,tmp1);
+ strcat(w,tmp1); strcat(w," ");
+ inbuf += skip_white(inbuf);
+ len = getword(inbuf,tmp2);
+ }
+ troff_tex(w,ww,0,1);
+ return(inbuf);
+}
+
+int
+get_ref(inbuf,w) /* get reference */
+ char *inbuf, *w;
+{
+ int len=0, l=0, lines=0;
+ char tmp[MAXWORD];
+
+ w[0] = NULL_C; tmp[0] = NULL_C;
+ while (*inbuf != NULL_C)
+ {
+ if (*inbuf == '\n') break;
+ (void) getword(inbuf,tmp);
+ if (tmp[0] == '.' && isupper(tmp[1]))
+ {
+ /* these commands don't cause a break in reference */
+ if (strcmp(tmp,".R") != 0 && strcmp(tmp,".I") != 0
+ && strcmp(tmp,".B") != 0)
+ break;
+ }
+ else if (tmp[0] == '.' && !(isupper(tmp[1])))
+ {
+ /* these commands don't cause a break in reference */
+ if (strcmp(tmp,".br") != 0 && strcmp(tmp,".bp") != 0)
+ break;
+ }
+ l = get_line(inbuf,tmp,1);
+ lines++;
+ if (lines > 1) strcat(w," ");
+ strcat(w,tmp);
+ len += l+1; inbuf += l+1;
+ }
+ len--; inbuf--;
+ return(len);
+}
+
+void
+get_size(ww,PARAMETER)
+ char *ww;
+ struct measure *PARAMETER;
+{
+ int sign=0, units=0;
+ float value;
+
+ if (ww[0] == NULL_C)
+ {
+ if (PARAMETER->def_value == 0)
+ {
+ PARAMETER->value = PARAMETER->old_value;
+ strcpy(PARAMETER->units,PARAMETER->old_units);
+ }
+ else
+ {
+ PARAMETER->value = PARAMETER->def_value;
+ strcpy(PARAMETER->units,PARAMETER->def_units);
+ }
+ }
+ else
+ {
+ PARAMETER->old_value = PARAMETER->value;
+ strcpy(PARAMETER->old_units,PARAMETER->units);
+ parse_units(ww,&sign,&value,&units);
+ if (units == 'p')
+ strcpy(PARAMETER->units,"pt");
+ else if (units == 'i')
+ strcpy(PARAMETER->units,"in");
+ else if (units == 'c')
+ strcpy(PARAMETER->units,"cm");
+ else if (units == 'm')
+ strcpy(PARAMETER->units,"em");
+ else if (units == 'n')
+ {
+ value = .5*value; /* n is about half the width of m */
+ strcpy(PARAMETER->units,"em");
+ }
+ else if (units == 'v')
+ strcpy(PARAMETER->units,"ex");
+ else if (units == 0)
+ {
+ if (sign == 0 || PARAMETER->old_units[0] == NULL_C)
+ strcpy(PARAMETER->units,PARAMETER->def_units);
+ else
+ strcpy(PARAMETER->units,PARAMETER->old_units);
+ }
+ else
+ {
+ fprintf(stderr,"unknown units %c, using default units\n");
+ strcpy(PARAMETER->units,PARAMETER->def_units);
+ }
+ if (sign == 0) PARAMETER->value = value;
+ else PARAMETER->value = PARAMETER->old_value + sign*value;
+ }
+}
+
+int
+get_string(inbuf,w,rec) /* get the rest of the line -- Nelson Beebe */
+ char *inbuf, *w;
+ int rec; /* rec=1 means recursion is required */
+{
+ register int c,i,len;
+ char ww[MAXLINE];
+ register char *start;
+
+ if (*inbuf != '\"')
+ return(get_line(inbuf,w,rec));
+ start = inbuf; /* remember start so we can find len */
+ i=0;
+ inbuf++; /* point past initial quote */
+ while ((c = *inbuf++) != NULL_C && c != '\"' && c != '\n' && i < MAXLINE)
+ ww[i++] = (char)c;
+ ww[i] = NULL_C;
+ if (c != '\n') /* flush remainder of line */
+ while ((c = *inbuf++) != '\n')
+ /* NO-OP */;
+ len = inbuf - start - 1; /* count only up to NL, not past */
+ if (rec == 1)
+ troff_tex(ww,w,0,1);
+ else
+ strcpy(w,ww);
+ return(len);
+}
+
+int
+get_sub_arg(inbuf,w) /* get the argument for sub and sup */
+ char *inbuf, *w;
+{
+ int c,len,i;
+ char ww[MAXWORD], tmp[MAXWORD];
+
+ len=0; tmp[0] = NULL_C;
+ while ((c = *inbuf) == ' ' || c == '\t')
+ {inbuf++; len++;}
+ i=0;
+ while ((c = *inbuf++) != NULL_C && c != ' ' && c != '\t' && c != '\n'
+ && c != '$' && c != '}' && c != '~' && i < MAXWORD)
+ {ww[i++] = (char)c; len++;}
+ ww[i] = NULL_C;
+ if (strcmp(ww,"roman") == 0 || strcmp(ww,"bold") == 0 || strcmp(w,"italic") == 0)
+ {
+ (void) get_arg(inbuf,tmp,0);
+ sprintf(ww,"%s%c%s",ww,c,tmp);
+ len += strlen(tmp)+1;
+ }
+ troff_tex(ww,w,0,1); /* recursive */
+ return(len);
+}
+
+int
+get_table_entry(inbuf,w,tab)
+ char *inbuf, *w;
+ int tab;
+{
+ int c, i=0;
+
+ for (i=0; (c = *inbuf++) != NULL_C && c != tab && i < MAXWORD; i++)
+ w[i] = (char)c;
+ w[i] = NULL_C;
+
+ return(i);
+}
+
+int
+get_till_space(inbuf,w) /* get characters till the next space */
+ char *inbuf, *w;
+{
+ int c,i;
+
+ for (i=0; (c = *inbuf++) != NULL_C && c != ' ' && c != '\n'
+ && c != '\t' && i < MAXWORD; i++)
+ w[i] = (char)c;
+ w[i] = NULL_C;
+ return(i);
+}
+
+int
+getdef(inbuf,ww) /* get the define substitution */
+ char *inbuf, *ww;
+{
+ int c,i,len;
+ int def_delim;
+ char w[MAXWORD];
+
+ def_delim = *inbuf++; /* take first character as delimiter */
+ len=1; i=0;
+ while ((c = *inbuf++) != NULL_C && c != def_delim && i < MAXWORD)
+ {len++; w[i++] = (char)c;}
+ w[i] = NULL_C;
+ len++;
+ if (c != def_delim)
+ {
+ fprintf(stderr,"WARNING: missing right delimiter in define, define=%s\n",w);
+ len--;
+ }
+ troff_tex(w,ww,0,1); /* now translate the substitution */
+ return(len);
+}
+
+int
+getword(inbuf,w) /* get an alphanumeric word (dot also) */
+ char *inbuf, *w;
+{
+ int c,i;
+
+ for (i=0; (c = *inbuf++) != NULL_C
+ && (isalpha(c) || isdigit(c) || c == '.') && i < MAXWORD; i++)
+ w[i] = (char)c;
+ if (i == 0 && c != NULL_C)
+ w[i++] = (char)c;
+ w[i] = NULL_C;
+ return(i);
+}
+
+void
+GR_to_Greek(w,ww) /* change GREEK to Greek */
+ char *w, *ww;
+{
+ *ww++ = '\\'; *ww++ = *w;
+ while(*++w != NULL_C)
+ *ww++ = tolower(*w);
+ *ww = NULL_C;
+}
+
+int
+is_def(w) /* check if w was defined by the user */
+ char *w;
+{
+ int i;
+
+ for (i=0; i < def_count; i++)
+ {
+ if (strcmp(def[i].def_macro,w) == 0)
+ return(i);
+ }
+ return(-1);
+}
+
+int
+is_flip(w) /* check if w is in the flip list */
+ char *w;
+{
+ int i;
+
+ for (i=0; i < flip_count; i++)
+ {
+ if (strcmp(flip_list[i],w) == 0)
+ return(i);
+ }
+ return(-1);
+}
+
+int
+is_forbid(w) /* check if w is one of those sacred macros */
+ char *w;
+{
+ int i;
+
+ for (i=0; i < forbd_count; i++)
+ {
+ if (strcmp(forbid[i],w) == 0)
+ return(i);
+ }
+ return(-1);
+}
+
+int
+is_mathcom(w,ww) /* check if w has a simple correspondence in TeX */
+ char *w,*ww;
+{
+ int i;
+
+ for (i=0; i < mathcom_count; i++)
+ {
+ if (strcmp(math[i].troff_symb,w) == 0)
+ {
+ strcpy(ww,math[i].tex_symb);
+ return(i);
+ }
+ }
+ return(-1);
+}
+
+int
+is_mydef(w) /* check if w is user-defined macro */
+ char *w;
+{
+ int i;
+
+ for (i=0; i < mydef_count; i++)
+ {
+ if (strcmp(mydef[i].def_macro,w) == 0)
+ return(i);
+ }
+ return(-1);
+}
+
+int
+is_troff_mac(w,ww,arg,par)/* check if w is a macro or plain troff command */
+ char *w,*ww;
+ int *arg,*par;
+{
+ int i;
+
+ for (i=0; i < macro_count; i++)
+ {
+ if (strcmp(macro[i].troff_mac,w) == 0)
+ {
+ strcpy(ww,macro[i].tex_mac);
+ *arg = macro[i].arg;
+ *par = macro[i].macpar;
+ return(i);
+ }
+ }
+ return(-1);
+}
+
+void
+parse_units(ww,sign,value,units)
+ char *ww;
+ int *sign, *units;
+ float *value;
+{
+ int len, k=0, i;
+ char tmp[MAXWORD];
+
+ len = strlen(ww);
+ if (ww[0] == '-') *sign = -1;
+ else if (ww[0] == '+') *sign = 1;
+ if (*sign != 0) k++;
+
+ i=0;
+ while (k < len)
+ {
+ if (isdigit(ww[k]) || ww[k] == '.')
+ tmp[i++] = ww[k++];
+ else break;
+ }
+ tmp[i] = NULL_C;
+ sscanf(tmp,"%f",value);
+ i=0;
+ if (k < len)
+ {
+ *units = ww[k++];
+ if (k < len)
+ fprintf(stderr,
+ "Suspect problem in parsing %s, unit used is %c\n",ww,*units);
+ }
+}
+
+void
+scrbuf(in,out) /* copy input to output */
+ FILE *in,*out;
+{
+ int c;
+ while ((c =getc(in)) != EOF) putc(c,out);
+}
+
+int
+similar(w) /* check if w is in the similar list */
+ char *w;
+{
+ int i;
+
+ for (i=0; i < sim_count ; i++)
+ {
+ if (strcmp(sim_list[i],w) == 0)
+ return(1);
+ }
+ return(-1);
+}
+
+char *
+skip_line(inbuf) /* ignore the rest of the line */
+ char *inbuf;
+{
+ while (*inbuf != '\n' && *inbuf != NULL_C)
+ inbuf++;
+ if (*inbuf == NULL_C) return(inbuf);
+ else return(++inbuf);
+}
+
+int
+skip_white(inbuf) /* skip white space */
+ char *inbuf;
+{
+ int c,len=0;
+
+ while ((c = *inbuf++) == ' ' || c == '\t' || c == '\n')
+ len++;
+ return(len);
+}
+
+char *
+strapp(s,tail) /* copy tail[] to s[], return ptr to terminal NULL_C in s[] */
+ register char *s; /* Nelson Beebe */
+ register char *tail;
+{
+ while (*s++ = *tail++)
+ /*NO-OP*/;
+ return (s-1); /* pointer to NULL_C at end of s[] */
+}
+
+void
+tmpbuf(in,buffer)
+ /* copy input to buffer, buffer holds only MAXLEN characters */
+ FILE *in;
+ char *buffer;
+{
+ int c;
+ unsigned int l=0;
+
+ while (l++ < MAXLEN && (c = getc(in)) != EOF)
+ *buffer++ = (char)c;
+ if (l >= MAXLEN)
+ {
+ fprintf(stderr,"Sorry: document is too large\n");
+ exit(-1);
+ }
+ *buffer = NULL_C;
+}
--- /dev/null
+.LP
+.EQ
+delim $$
+gsize 11
+define dC "delta C"
+define xx 'x sup x'
+define B 'bold B'
+define (( 'left ('
+define )) 'right )'
+define ov 'over'
+.EN
+.ds CF %
+.ds LH Al-Yahya
+.ds RH troff to TeX translator
+.TL
+Testing the troff-to-tex translator
+.AU
+Kamal Al-Yahya
+.AI
+Stanford University
+.AB
+This file demonstrates the use of \fB tr2tex\fR which translates
+documents written in troff to a LaTeX style.
+Examples are given to show what the translator can do.
+.AE
+.PP
+First let's test some equation written for the
+.B eqn
+preprocessor:
+.EQ (1)
+2 left ( 1 ~+~ sqrt{omega sub i+1 + zeta -{x+1} over {THETA +1} y + 1} right )
+~~~=~~~ 1
+.EN
+.EQ
+left [
+matrix {
+ ccol { e sub 1 above . above . above e sub i above . above . above e sub N }
+}
+right ] sub n+1 ~~=~~ y + 1
+.EN
+.EQ
+bold X + roman a ~>=~
+a under hat fwd 20 sum from i to N lim from {x -> k} dC
+.EN
+.EQ
+(( "speed" times "time" = "distance travelled" ))
+.EN
+.EQ
+beta tilde i >= zeta dC
+.EN
+.IP
+In-line math like $beta +1$ which is surrounded by math delimiters, as
+defined by
+.I delim
+is also translated.
+.R
+.PP
+Only simple tables are translated. Translation of more complicated tables
+is painful and I won't do it now. Here is an example:
+.TS
+tab(&);
+l rc n.
+name & type & color & value
+$alpha$ & real & red & 2.3
+$x$ & imaginary & green & -1.2
+$a + 2$ & real & white & 0.0
+.TE
+\" this is a commented text
+.PP
+Now we start a figure.
+.Is
+.sp 3i
+.Ic 1
+This is the caption of the figure.
+.Ie
+.PP
+Try some floating objects.
+.br
+.KS
+This text should be kept in one page. i.e. a page break is discouraged here.
+.KE
+.br
+Now a floating text.
+.KF
+This text should be kept in one page even if we had to move it around,
+since it is a
+.I floating
+object. This is a boxed
+.BX word.
+.KE
+.br
+These characters are special in TeX, so they need to be escaped
+in the translation % & # _, while these characters have to be
+printed in math mode < > |.
+.FS
+This is a footnote
+.FE
+.PP
+.Ac
+Thanks to all of those who contributed by reporting bugs and suggesting
+some improvements. Special thanks go to Nelson Beebe for all of his valuable
+contributions and suggestions. He is responsible for making the translator
+portable to other computers. He also made significant improvements to
+the translation of manuals.
+.Re
+Knuth, D.E., 1984, The TeXBook, Addison-Wesley Publishing Company.
+.Re
+Lamprt, L., 1986, LaTeX: user's guide & reference manual, Addison-Wesley
+Publishing Company.
+.Re
+Lesk, M.E., 1978, Typing documents on the UNIX
+system: using the -ms macros
+with troff and nroff, UNIX programmer's manual, v. 2B, sec. 3.
+.Re
+McGilton, H. and Morgan, R., 1983, Introducing the UNIX system, McGraw-Hill
+Book Company.
--- /dev/null
+/* COPYRIGHT (C) 1987 Kamal Al-Yahya */
+
+/*
+This program has the HARD-WIRED rules of the translator.
+It should handled with care.
+*/
+
+#define NULL_C '\0'
+
+#define IN_TR 1
+#include "setups.h"
+int def_count = 0;
+int mydef_count = 0;
+
+void
+troff_tex(inbuf,outbuf,mid,rec)
+char *inbuf,*outbuf;
+int mid,rec;
+{
+char eqn_no[MAXWORD], w[MAXWORD], ww[MAXLINE], tmp[MAXWORD], tmp2[MAXWORD], tmp3[MAXWORD];
+char *p;
+int len,c,c1,c2,i,j;
+int ref = 0;
+int put_brace = 0;
+int first_word = 1;
+int no_word = 1;
+int arg = 0;
+int par = 0;
+int illegal = 0;
+int floating = 0;
+static int delim_defd = 0; /* whether math delimiter has been defined */
+static char *DELIM = "$";
+float flen;
+int N;
+int RSRE = 0; /* block indentation */
+int thisfont = 1; /* default font is roman */
+int lastfont = 1; /* default last font is roman */
+int offset = 0; /* amount to offset inbuf */
+extern man; /* man flag */
+
+*outbuf = NULL_C; w[0] = NULL_C; ww[0] = NULL_C;
+tmp[0] = NULL_C; tmp2[0] = NULL_C;
+while (*inbuf != NULL_C)
+ {
+ len = getword(inbuf,w);
+ c1 = *--inbuf;
+ c2 = *++inbuf;
+ inbuf += len;
+ if (isspace(w[0]) == 0) no_word = 0;
+/* first check if we are in math mode */
+ if (math_mode)
+ {
+ len = get_till_space(inbuf,ww);
+ sprintf(tmp,"%s%s",w,ww);
+ if (strcmp(w,"delim") == 0)
+ {
+ delim_defd = 1;
+ inbuf += skip_white(inbuf);
+ DELIM[0] = *inbuf;
+ inbuf = skip_line(inbuf);
+ }
+/* check if it is a math delimiter; switch to non-math mode if so */
+ else if (delim_defd && strcmp(w,DELIM) == 0)
+ {
+ math_mode = 0;
+ *outbuf++ = '$';
+ }
+/* check for illegal macros here */
+ else if (len > 0 && def_count > 0 && (i=is_def(tmp)) >= 0)
+ {
+ inbuf += len;
+ outbuf = strapp(outbuf,def[i].replace);
+ }
+/* See if it is a (legally) defined macro */
+ else if (def_count > 0 && (i=is_def(w)) >= 0)
+ {
+ if (def[i].illegal)
+ outbuf = strapp(outbuf,def[i].replace);
+ else
+ {
+ outbuf = strapp(outbuf,"\\");
+ outbuf = strapp(outbuf,w);
+ }
+ }
+/* Search for commands in some order; start with non-alphanumeric symbols */
+ else if (strcmp(w,"#") == 0 || strcmp(w,"&") == 0
+ || strcmp(w,"%") == 0 || strcmp(w,"_") == 0)
+ {
+ outbuf = strapp(outbuf,"\\");
+ outbuf = strapp(outbuf,w);
+ }
+ else if (strcmp(w,"=") == 0)
+ {
+ if (*inbuf == '=')
+ {
+ inbuf++;
+ outbuf = strapp(outbuf,"\\equiv");
+ }
+ else
+ outbuf = strapp(outbuf,"=");
+ }
+ else if (strcmp(w,"<") == 0 || strcmp(w,">") == 0)
+ {
+ if (*inbuf == '=')
+ {
+ inbuf++;
+ if (strcmp(w,"<") == 0)
+ outbuf = strapp(outbuf,"\\le");
+ else
+ outbuf = strapp(outbuf,"\\ge");
+ }
+ }
+ else if (strcmp(w,"-") == 0)
+ {
+ if (*inbuf == '>')
+ {
+ inbuf++;
+ outbuf = strapp(outbuf,"\\to");
+ }
+ else if (*inbuf == '+')
+ {
+ inbuf++;
+ outbuf = strapp(outbuf,"\\mp");
+ }
+ else
+ *outbuf++ = '-';
+ }
+ else if (strcmp(w,"+") == 0)
+ {
+ if (*inbuf == '-')
+ {
+ inbuf++;
+ outbuf = strapp(outbuf,"\\pm");
+ }
+ else
+ *outbuf++ = '+';
+ }
+ else if (strcmp(w,"\"") == 0)
+ {
+ len = get_no_math(inbuf,ww);
+ inbuf += len+1;
+ if (len > 1)
+ {
+ sprintf(tmp,"\\ \\it\\hbox{%s}",ww);
+ outbuf = strapp(outbuf,tmp);
+ }
+ else if (len == 1)
+ *outbuf++ = ww[0];
+ }
+/* Now search for symbols that start with a captial */
+ else if (strcmp(w,".EN") == 0)
+ {
+ math_mode = 0;
+ if ((len=strlen(eqn_no)) > 0)
+ {
+ sprintf(tmp,"\\eqno %s",eqn_no);
+ outbuf = strapp(outbuf,tmp);
+ }
+ eqn_no[0] = NULL_C;
+ c1 = *--outbuf;
+ c2 = *--outbuf;
+ if (c1 == '\n' && c2 == '$')
+ *--outbuf = NULL_C;
+ else
+ {
+ outbuf += 2;
+ outbuf = strapp(outbuf,"$$");
+ }
+ }
+/* Now search for symbols that start with a small letter */
+ else if (strcmp(w,"bold") == 0 || strcmp(w,"roman") == 0 ||
+ strcmp(w,"italic") == 0)
+ {
+ inbuf += get_arg(inbuf,ww,1);
+ if (strcmp(w,"bold") == 0)
+ {
+ sprintf(tmp,"{\\bf %s}",ww);
+ outbuf = strapp(outbuf,tmp);
+ }
+ else if (strcmp(w,"roman") == 0)
+ {
+ sprintf(tmp,"{\\rm %s}",ww);
+ outbuf = strapp(outbuf,tmp);
+ }
+ else
+ {
+ sprintf(tmp,"{\\it %s}",ww);
+ outbuf = strapp(outbuf,tmp);
+ }
+ }
+ else if (strcmp(w,"define") == 0)
+ {
+ if (def_count >= MAXDEF)
+ {
+ fprintf(stderr,
+ "Too many defines. MAXDEF=%d\n",MAXDEF);
+ exit(-1);
+ }
+ for (i=0; *--outbuf != '$' && i < MAXLEN; i++)
+ tmp[i] = *outbuf;
+ tmp[i] = NULL_C;
+ strcat(tmp,"$$");
+ *--outbuf = NULL_C;
+ inbuf += skip_white(inbuf);
+ inbuf += get_defword(inbuf,w,&illegal);
+ inbuf += skip_white(inbuf);
+ inbuf += getdef(inbuf,ww);
+ if (illegal)
+ {
+ def[def_count].illegal = 1;
+ fprintf(stderr,
+ "illegal TeX macro, %s, replacing it\n",w);
+ p = (char *)malloc((unsigned)(strlen(ww)+1)*
+ sizeof(char));
+ strcpy(p,ww);
+ def[def_count].replace = p;
+ }
+ else
+ {
+ def[def_count].illegal = 0;
+ sprintf(tmp2,"\\def\\%s{%s}\n",w,ww);
+ outbuf = strapp(outbuf,tmp2);
+ }
+ p = (char *)malloc((unsigned)(strlen(w)+1)*sizeof(char));
+ strcpy(p,w);
+ def[def_count++].def_macro = p;
+
+ inbuf += skip_white(inbuf);
+ for (j=i+1; j >= 0; j--)
+ *outbuf++ = tmp[j];
+ tmp[0] = NULL_C;
+ }
+ else if (strcmp(w,"gsize") == 0 || strcmp(w,"gfont") == 0)
+ inbuf = skip_line(inbuf);
+ else if (strcmp(w,"left") == 0 || strcmp(w,"right") == 0)
+ {
+ sprintf(tmp,"\\%s",w);
+ outbuf = strapp(outbuf,tmp);
+ inbuf += skip_white(inbuf);
+ len = getword(inbuf,ww);
+ if (strcmp(ww,"floor") == 0)
+ {
+ inbuf += len;
+ if (strcmp(w,"left") == 0)
+ outbuf = strapp(outbuf,"\\lfloor");
+ else
+ outbuf = strapp(outbuf,"\\rfloor");
+ }
+ else if (strcmp(ww,"nothing") == 0 || ww[0] == '\"')
+ {
+ inbuf += len;
+ *outbuf++ = '.';
+ if (ww[0] == '\"') inbuf++;
+ }
+ else if (*inbuf == '{' || *inbuf == '}')
+ *outbuf++ = '\\';
+ }
+ else if (strcmp(w,"over") == 0)
+ {
+ if (!first_word)
+ {
+ outbuf--;
+ for (i=0; *outbuf == ' ' || *outbuf == '\t' ||
+ *outbuf =='\n'; i++)
+ tmp[i] = *outbuf--;
+ if (*outbuf == '}' && put_brace == 0)
+ *outbuf = ' ';
+ else
+ {
+ for (; !(*outbuf == ' ' || *outbuf == '\t'
+ || *outbuf =='\n' || *outbuf == '$'); i++)
+ tmp[i] = *outbuf--;
+ put_brace = 0;
+ *++outbuf = '{';
+ }
+ for (j=i-1; j >= 0; j--)
+ *++outbuf = tmp[j];
+ *++outbuf = NULL_C;
+ }
+ outbuf = strapp(outbuf,"\\over");
+ inbuf += skip_white(inbuf);
+ *outbuf++ = ' ';
+ if (*inbuf == '{')
+ inbuf++;
+ else
+ {
+ inbuf = get_over_arg(inbuf,ww);
+ outbuf = strapp(outbuf,ww);
+ if (*inbuf != NULL_C || !first_word)
+ *outbuf++ = '}';
+ }
+ }
+ else if (strcmp(w,"size") == 0)
+ inbuf += get_arg(inbuf,ww,0);
+ else if (strcmp(w,"sup") == 0 || strcmp(w,"to") == 0 ||
+ strcmp(w,"sub") == 0 || strcmp(w,"from") == 0)
+ {
+ while ((c = *--outbuf) == ' ' || c == '\t' || c == '\n') ;
+ *++outbuf = NULL_C;
+ if (strcmp(w,"sup") == 0 || strcmp(w,"to") == 0)
+ outbuf = strapp(outbuf,"^");
+ else
+ outbuf = strapp(outbuf,"_");
+ inbuf += skip_white(inbuf);
+ len = get_sub_arg(inbuf,ww);
+ inbuf += len;
+ if (len > 1)
+ {
+ sprintf(tmp,"{%s}",ww);
+ outbuf = strapp(outbuf,tmp);
+ len = skip_white(inbuf);
+ inbuf += len;
+ (void) getword(inbuf,ww);
+ if (strcmp(ww,"over") == 0)
+ put_brace = 1;
+ inbuf -= len;
+ }
+ else
+ outbuf = strapp(outbuf,ww);
+ }
+ else if (strcmp(w,"up") == 0 || strcmp(w,"down") == 0
+ || strcmp(w,"fwd") == 0 || strcmp(w,"back") == 0)
+ {
+ if (strcmp(w,"up") == 0)
+ {
+ outbuf = strapp(outbuf,"\\raise");
+ strcpy(tmp,"ex");
+ }
+ else if (strcmp(w,"down") == 0)
+ {
+ outbuf = strapp(outbuf,"\\lower");
+ strcpy(tmp,"ex");
+ }
+ else if (strcmp(w,"fwd") == 0)
+ {
+ outbuf = strapp(outbuf,"\\kern");
+ strcpy(tmp,"em");
+ }
+ else if (strcmp(w,"back") == 0)
+ {
+ outbuf = strapp(outbuf,"\\kern-");
+ strcpy(tmp,"em");
+ }
+ inbuf += skip_white(inbuf);
+ inbuf += getword(inbuf,ww);
+ len = atoi(ww); flen = len/100.;
+ ww[0] = NULL_C;
+ sprintf(tmp2,"%4.2f%s",flen,tmp);
+ outbuf = strapp(outbuf,tmp2);
+ }
+/* Now check if the word is a member of a group */
+ else if (CAP_GREEK(w) > 0)
+ {
+ GR_to_Greek(w,ww);
+ outbuf = strapp(outbuf,ww);
+ }
+ else if (is_flip(w) >= 0)
+ {
+ if (!first_word)
+ {
+ len = skip_white(inbuf);
+ inbuf += len;
+ (void) getword(inbuf,ww);
+ if (is_flip(ww) >= 0)
+ {
+ inbuf += strlen(ww);
+ outbuf = flip_twice(outbuf,w,ww);
+ }
+ else
+ {
+ inbuf -= len;
+ outbuf = flip(outbuf,w);
+ }
+ }
+ else
+ {
+ outbuf = strapp(outbuf,"\\");
+ outbuf = strapp(outbuf,w);
+ }
+ }
+ else if (is_mathcom(w,ww) >=0 )
+ outbuf = strapp(outbuf,ww);
+ else if (similar(w) > 0)
+ {
+ outbuf = strapp(outbuf,"\\");
+ outbuf = strapp(outbuf,w);
+ }
+
+/* if none of the above math commands matched, it is an ordinary symbol;
+ just copy it */
+
+ else outbuf = strapp(outbuf,w);
+ }
+
+/* check if it is a math delimiter; switch to math mode if so */
+
+ else if (strcmp(w,"$") == 0 && de_arg > 0)
+ {
+ de_arg++;
+ *outbuf++ = '#';
+ }
+ else if (delim_defd && strcmp(w,DELIM) == 0)
+ {
+ math_mode = 1;
+ *outbuf++ = '$';
+ }
+ else if (strcmp(w,"$") == 0)
+ outbuf = strapp(outbuf,"\\$");
+
+/* check if it is a non-math troff command */
+
+ else if ((c2 == '.') && !(mid) && (c1 == '\n' || (first_word)))
+ {
+/* Search in some order; start with non-alphanumeric characters */
+ if (strcmp(w,".") == 0)
+ {
+ c1 = *inbuf;
+ c2 = *++inbuf;
+ if (c1 == '\\' && c2 == '\"')
+ {
+ ++inbuf;
+ inbuf += get_line(inbuf,ww,0);
+ outbuf = strapp(outbuf,"%");
+ outbuf = strapp(outbuf,ww);
+ }
+ else
+ {
+ fprintf(stderr,
+ "I cannot translate troff macro .%c%c\n",c1,c2);
+ inbuf += get_line(inbuf,ww,0);
+ sprintf(tmp,"%%.%c%c",c1,c2);
+ outbuf = strapp(outbuf,tmp);
+ outbuf = strapp(outbuf,ww);
+ if (*inbuf == NULL_C) *outbuf++ = '\n';
+ }
+ }
+/* Now search for commands that start with a capital */
+ else if (strcmp(w,".AB") == 0)
+ {
+ inbuf += get_arg(inbuf,ww,0);
+ if (strcmp(ww,"no") == 0)
+ outbuf = strapp(outbuf,"\\bigskip");
+ else
+ outbuf = strapp(outbuf,"\\begin{abstract}");
+ }
+ else if (strcmp(w,".B") == 0 || strcmp(w,".bf") == 0 ||
+ strcmp(w,".I") == 0 || strcmp(w,".it") == 0 ||
+ strcmp(w,".R") == 0 || strcmp(w,".rm") == 0)
+ {
+ if (strcmp(w,".R") == 0 || strcmp(w,".rm") == 0)
+ strcpy(w,"rm");
+ else if (strcmp(w,".B") == 0 || strcmp(w,".bf") == 0)
+ strcpy(w,"bf");
+ else
+ strcpy(w,"it");
+ inbuf += get_arg(inbuf,ww,1);
+ if (ww[0] == NULL_C)
+ {
+ outbuf = strapp(outbuf,"\\");
+ outbuf = strapp(outbuf,w);
+ }
+ else
+ {
+ sprintf(tmp,"{\\%s %s}",w,ww);
+ outbuf = strapp(outbuf,tmp);
+ }
+ }
+ else if (man && (strcmp(w,".BR") == 0 || strcmp(w,".BI") == 0
+ || strcmp(w,".IR") == 0 || strcmp(w,".IB") == 0 ||
+ strcmp(w,".RI") == 0 || strcmp(w,".RB") == 0))
+ {
+ outbuf = alternate(inbuf,outbuf,w);
+ inbuf = skip_line(inbuf);
+ *outbuf++ = '\n';
+ }
+ else if (strcmp(w,".BX") == 0)
+ {
+ inbuf += get_arg(inbuf,ww,1);
+ sprintf(tmp,"\\fbox{%s}",ww);
+ outbuf = strapp(outbuf,tmp);
+ }
+ else if (strcmp(w,".EQ") == 0)
+ {
+ math_mode = 1;
+ put_brace = 0;
+ outbuf = strapp(outbuf,"$$");
+ len = get_arg(inbuf,eqn_no,0);
+ if (strcmp(eqn_no,"I") == 0 || strcmp(eqn_no,"L") == 0)
+ {
+ fprintf(stderr,"lineups are ignored\n");
+ inbuf += len;
+ len = get_arg(inbuf,eqn_no,0);
+ }
+ if (((int)strlen(eqn_no)) > 0)
+ inbuf += len;
+ len = get_arg(inbuf,tmp,0);
+ if (strcmp(tmp,"I") == 0 || strcmp(tmp,"L") == 0)
+ {
+ fprintf(stderr,"lineups are ignored\n");
+ inbuf += len;
+ }
+ }
+ else if (strcmp(w,".IP") == 0)
+ {
+ inbuf += get_arg(inbuf,ww,1);
+ inbuf = skip_line(inbuf);
+ if (IP_stat == 0)
+ outbuf = strapp(outbuf,"\\begin{scitem}\n");
+ sprintf(tmp,"\\item[{%s}]\n",ww);
+ outbuf = strapp(outbuf,tmp);
+ if (de_arg > 0) mydef[mydef_count].par = 2;
+ else IP_stat=1;
+ }
+ else if (strcmp(w,".KE") == 0)
+ {
+ if (floating)
+ outbuf = strapp(outbuf,"\\end{figure}");
+ else
+ outbuf = strapp(outbuf,"}");
+ floating = 0;
+ }
+ else if (strcmp(w,".KF") == 0)
+ {
+ floating = 1;
+ outbuf = strapp(outbuf,"\\begin{figure}");
+ }
+ else if (strcmp(w,".QP") == 0)
+ {
+ if (de_arg > 0) mydef[mydef_count].par = 4;
+ else QP_stat=1;
+ outbuf = strapp(outbuf,"\\begin{quotation}");
+ }
+ else if (strcmp(w,".RE") == 0)
+ {
+ RSRE--;
+ if (RSRE < 0)
+ fprintf(stderr,".RS with no matching .RE\n");
+ sprintf(tmp,"\\ind{%d\\parindent}",RSRE);
+ /* sprintf(tmp,"\\end{scitem}"); */
+ outbuf = strapp(outbuf,tmp);
+ }
+ else if (strcmp(w,".RS") == 0)
+ {
+ RSRE++;
+ sprintf(tmp,"\\ind{%d\\parindent}",RSRE);
+ /* sprintf(tmp,"\\begin{scitem}"); */
+ outbuf = strapp(outbuf,tmp);
+ }
+ else if (strcmp(w,".Re") == 0)
+ {
+ if (ref == 0)
+ outbuf = strapp(outbuf,"\\REF\n");
+ ref++;
+ inbuf = skip_line(inbuf);
+ inbuf += get_ref(inbuf,ww);
+ sprintf(tmp,"\\reference{%s}",ww);
+ outbuf = strapp(outbuf,tmp);
+ }
+ else if (man && (strcmp(w,".TP") == 0 || strcmp(w,".HP") == 0))
+ {
+ if (IP_stat && TP_stat)
+ {
+ outbuf = strapp(outbuf,"\\end{scitem}%\n");
+ IP_stat=0;
+ }
+ if (QP_stat && TP_stat)
+ {
+ outbuf = strapp(outbuf,"\\end{quotation}%\n");
+ QP_stat = 0;
+ }
+ inbuf = skip_line(inbuf);
+ inbuf += get_line(inbuf,ww,1);
+ if (TP_stat == 0)
+ {
+ /** JPC : modif
+ sprintf(tmp,"\\begin{TPlist}{%s}\n",ww);**/
+ sprintf(tmp,"\\begin{scitem}\n");
+ outbuf = strapp(outbuf,tmp);
+ }
+/* sprintf(tmp,"\\item[{\\verb?%s?}]",ww);*/
+/* awful \verb replaced by \tt CLG */
+ sprintf(tmp,"\\item[{\\tt %s}]",ww);
+ outbuf = strapp(outbuf,tmp);
+ if (de_arg > 0) mydef[mydef_count].par = 3;
+ else TP_stat=1;
+ }
+ else if (man && (strcmp(w,".TH") == 0))
+ {
+ /*expect something like .TH LS 1 "September 4, 1985"*/
+ /* JPC : expect something like .TH LS 1
+ "September 4, 1985" "scilab group" "Scilab ..."
+ and LS needs TeX translation **/
+ /** + Checks for unclosed TPList **/
+ outbuf=end_env(outbuf);
+ outbuf = strapp(outbuf,"\\phead");
+ for (j = 1; j <= 5; ++j)
+ {
+ inbuf += get_arg(inbuf,ww,1);
+ sprintf(tmp,"{%s}",ww);
+ outbuf = strapp(outbuf,tmp);
+ }
+ *outbuf++ = '\n';
+ }
+ else if (man && (strcmp(w,".LA") == 0))
+ {
+ /* JPC : **/
+ inbuf += get_line(inbuf,ww,0);
+ inbuf++;
+ sprintf(tmp,"%s\n",ww);
+ outbuf = strapp(outbuf,tmp);
+ }
+ else if (man && (strcmp(w,".Vb") == 0))
+ {
+ /* JPC : **/
+ inbuf += get_line(inbuf,ww,0);
+ inbuf++;
+ sprintf(tmp,"\\verb?%s?\n",ww);
+ outbuf = strapp(outbuf,tmp);
+ }
+ else if (man && (strcmp(w,".SH") == 0))
+ {
+ /* JPC : Special shead translation */
+ /** Checks for unclosed TPList **/
+ outbuf=end_env(outbuf);
+
+ inbuf += get_arg(inbuf,ww,1);
+ if ( strcmp(ww,"NAME") == 0)
+ {
+ int ii1;
+ outbuf = strapp(outbuf,"\\Sdoc");
+ inbuf += get_line(inbuf,ww,1);
+ inbuf++;
+ inbuf += get_arg(inbuf,ww,1);
+ sprintf(tmp,"{%s}",ww);
+ outbuf = strapp(outbuf,tmp);
+ /** ignoring - **/
+ inbuf += get_arg(inbuf,ww,1);
+ inbuf += get_line(inbuf,ww,1);
+ sprintf(tmp2,"{%s}",ww);
+ outbuf = strapp(outbuf,tmp2);
+ outbuf = strapp(outbuf,"\\index");
+ outbuf = strapp(outbuf,tmp);
+ /* next lines added to set key references (ss) */
+ /* slighly modified by jpc since {foo,poo}--> {foo with a missing right} */
+ outbuf = strapp(outbuf,"\\label");
+ ii1=0;
+ while ( (c = tmp[ii1]) != NULL_C && c != ',') {
+ ii1++;
+ if (c != '%' && c != '_' && c != '\\' && c != ' ' ) {
+ tmp3[0]=c;tmp3[1]='\0';
+ outbuf = strapp(outbuf,tmp3);
+ };
+ };
+ if ( c== ',') { outbuf = strapp(outbuf,"}");}
+ /* end of (ss) modif */
+ *outbuf++ = '\n';
+ /** processing the next lines up to the next .SH or . **/
+ outbuf = strapp(outbuf,"\\begin{flushleft}\n");
+ while ( *inbuf == '\n') inbuf++;
+ while ( strncmp(inbuf,".SH",3) != 0 && inbuf[0] != '.' )
+ {
+ /** process the consecutive lines of SH NAME**/
+ while (1) {
+ inbuf += get_arg(inbuf,ww,1);
+ if ( strcmp(ww,"-")==0)
+ {
+ outbuf = strapp(outbuf," ");
+ outbuf = strapp(outbuf,ww);
+ break;
+ }
+ else if ( ww[0] == '\0' )
+ {
+ fprintf(stderr,"\nWARNING : missing a `-' char in a .SH NAME section\nPlease change the man file \n");
+ exit(-1);
+ break;
+ }
+ strcpy(tmp,ww);
+ ii1=0; while ( (c= tmp[ii1]) != NULL_C )
+ {
+ if ( c == ',' ) tmp[ii1]='\0';
+ ii1++;
+ }
+ sprintf(tmp2," \\index{%s}\\label{%s} %s",tmp,tmp,ww);
+ outbuf = strapp(outbuf,tmp2);
+ }
+ inbuf += get_line(inbuf,ww,1);
+ /** parse : name, ....,name - line **/
+ /** --> name \index{name */
+ outbuf = strapp(outbuf,ww);
+ outbuf = strapp(outbuf,"\\\\\n");
+ /** goble \n */
+ while ( *inbuf == '\n') inbuf++;
+ }
+ outbuf = strapp(outbuf,"\\end{flushleft}\n");
+ }
+ else if (strcmp(ww,"SEE") == 0 )
+ {
+ int flag = 1,ii=0,iis=0;
+ sprintf(tmp,"\\Seealso{%s",ww);
+ outbuf = strapp(outbuf,tmp);
+ inbuf += get_line(inbuf,ww,1);
+ inbuf ++;
+ sprintf(tmp,"%s}",ww);
+ outbuf = strapp(outbuf,tmp);
+ *outbuf++ = '\n';
+ inbuf += get_line(inbuf,ww,0);
+ inbuf++;
+ while (flag)
+ {
+ outbuf = strapp(outbuf,"{\\verb?");
+ iis=ii;
+ while ( (c = ww[ii]) != NULL_C && c != ',')
+ {
+ tmp[0]=ww[ii];tmp[1]='\0';ii++;
+ outbuf = strapp(outbuf,tmp);
+ };
+ outbuf = strapp(outbuf,"?}");
+ /* Next lines added to set see also ref (ss) */
+ outbuf = strapp(outbuf," \\pageref{");
+ while ( (c = ww[iis]) != NULL_C && c != ',')
+ {
+ tmp[0]=ww[iis];tmp[1]='\0';iis++;
+ if (tmp[0]!='%'&&tmp[0]!='_'&&tmp[0]!=' '&&tmp[0]!=',')
+ outbuf = strapp(outbuf,tmp);
+ };
+ outbuf = strapp(outbuf,"}");
+ /* end of (ss) modif */
+ if (c== NULL_C ) flag=0;
+ else {outbuf=strapp(outbuf,",");ii++;};
+ }
+ *outbuf++ = '\n';
+ }
+ else if ( strcmp(ww,"AUTHOR") == 0)
+ {
+ sprintf(tmp,"\\Sauthor{%s",ww);
+ outbuf = strapp(outbuf,tmp);
+ inbuf += get_line(inbuf,ww,1);
+ inbuf++;
+ sprintf(tmp,"%s}",ww);
+ outbuf = strapp(outbuf,tmp);
+ *outbuf++ = '\n';
+ }
+ else
+ {
+ sprintf(tmp,"\\Shead{%s",ww);
+ outbuf = strapp(outbuf,tmp);
+ inbuf += get_line(inbuf,ww,1);
+ inbuf++;
+ sprintf(tmp,"%s}",ww);
+ outbuf = strapp(outbuf,tmp);
+ *outbuf++ = '\n';
+ }
+ if (RSRE > 0)
+ { int i;
+ fprintf(stderr,"I find a new .SH after %d unclosed .RS\n",
+ RSRE);
+ fprintf(stderr,"I'm closing Closing the .RS for you\n",RSRE);
+ while ( RSRE != 0)
+ {
+ RSRE--;
+ sprintf(tmp,"\\end{scitem}");
+ outbuf = strapp(outbuf,tmp);
+ };
+ };
+
+ }
+ else if (strcmp(w,".TS") == 0)
+ {
+ fprintf(stderr,"I am not very good at tables\n\
+I can only do very simple ones. You may need to check what I've done\n");
+ inbuf = skip_line(inbuf);
+ outbuf = do_table(inbuf,outbuf,&offset);
+ inbuf += offset;
+ offset = 0; /* reset */
+ }
+/* Now search for commands that start with small letters */
+ else if (strcmp(w,".TE") == 0)
+ {
+ fprintf(stderr,"Oops! I goofed. I told you I am not very good at tables.\nI have encountered a table end but I am not in table mode\n");
+ }
+ else if (strcmp(w,".de") == 0)
+ {
+ de_arg = 1;
+ if (mydef_count >= MAXDEF)
+ {
+ fprintf(stderr,
+ "Too many .de's. MAXDEF=%d\n",MAXDEF);
+ exit(-1);
+ }
+ inbuf += skip_white(inbuf);
+ inbuf += get_defword(inbuf,w,&illegal);
+ inbuf += skip_white(inbuf);
+ inbuf += get_mydef(inbuf,ww);
+ mydef[mydef_count].arg_no = de_arg;
+ if (illegal)
+ {
+ mydef[mydef_count].illegal = 1;
+ fprintf(stderr,
+ "illegal TeX macro, %s, replacing it\n",w);
+ p = (char *)malloc((unsigned)(strlen(ww)+2)*
+ sizeof(char));
+ sprintf(p,"%s",ww);
+ mydef[mydef_count].replace = p;
+ }
+ else
+ {
+ mydef[mydef_count].illegal = 0;
+ sprintf(tmp,"\\def\\%s",w);
+ outbuf = strapp(outbuf,tmp);
+ for (j=1; j<de_arg; j++)
+ {
+ sprintf(tmp,"#%d",j);
+ outbuf = strapp(outbuf,tmp);
+ }
+ sprintf(tmp,"{%s}\n",ww);
+ outbuf = strapp(outbuf,tmp);
+ }
+ p = (char *)malloc((unsigned)(strlen(w)+2)*sizeof(char));
+ sprintf(p,".%s",w);
+ mydef[mydef_count++].def_macro = p;
+ inbuf = skip_line(inbuf);
+ de_arg = 0;
+ }
+ else if (strcmp(w,".ds") == 0)
+ {
+ inbuf += get_arg(inbuf,w,0);
+ inbuf += skip_white(inbuf);
+ inbuf += get_line(inbuf,ww,1);
+ if (strcmp(w,"LH") == 0)
+ {
+ sprintf(tmp,"\\lefthead{%s}",ww);
+ outbuf = strapp(outbuf,tmp);
+ }
+ else if (strcmp(w,"RH") == 0)
+ {
+ sprintf(tmp,"\\righthead{%s}",ww);
+ outbuf = strapp(outbuf,tmp);
+ }
+ else if (strcmp(w,"CF") == 0)
+ {
+/* if (index(ww,'%') == 0)
+ index replaced by strchr. CLG */
+ if (strchr(ww,'%') == 0)
+ {
+ sprintf(tmp,"\\footer{%s}",ww);
+ outbuf = strapp(outbuf,tmp);
+ }
+ else
+ outbuf = strapp(outbuf,
+ "\\footer{\\rm\\thepage}");
+ }
+ else
+ {
+ fprintf(stderr,"I do not understand .ds %s\n",w);
+ sprintf(tmp,"%%.ds %s %s",w,ww);
+ outbuf = strapp(outbuf,tmp);
+ }
+ }
+ else if (strcmp(w,".sp") == 0)
+ {
+ inbuf += get_arg(inbuf,ww,0);
+ (void) get_size(ww,&space);
+ sprintf(tmp,"\\par\\vspace{%3.1f%s}",
+ space.value,space.units);
+ outbuf = strapp(outbuf,tmp);
+ }
+ else if (strcmp(w,".in") == 0)
+ {
+ inbuf += get_arg(inbuf,ww,0);
+ (void) get_size(ww,&indent);
+ sprintf(tmp,"\\ind{%3.1f%s}",indent.value,indent.units);
+ outbuf = strapp(outbuf,tmp);
+ }
+ else if (strcmp(w,".ls") == 0)
+ {
+ inbuf += get_arg(inbuf,ww,0);
+ (void) get_size(ww,&linespacing);
+ sprintf(tmp,"\\baselineskip=%3.1f%s",linespacing.value,
+ linespacing.units);
+ outbuf = strapp(outbuf,tmp);
+ }
+ else if (strcmp(w,".so") == 0)
+ {
+ inbuf += get_arg(inbuf,ww,0);
+ /** JPC**/
+ if ( strcmp(ww,"../sci.an")!=0 && strcmp(ww,"sci.an") != 0)
+ sprintf(tmp,"\\input %s",ww);
+ outbuf = strapp(outbuf,tmp);
+ }
+ else if (strcmp(w,".ti") == 0)
+ {
+ inbuf += get_arg(inbuf,ww,0);
+ tmpind.value = indent.value;
+ strcpy(tmpind.units,indent.units);
+ (void) get_size(ww,&tmpind);
+ sprintf(tmp,"\\tmpind{%3.1f%s}",
+ tmpind.value,tmpind.units);
+ outbuf = strapp(outbuf,tmp);
+ }
+ else if (strcmp(w,".vs") == 0)
+ {
+ inbuf += get_arg(inbuf,ww,0);
+ (void) get_size(ww,&vspace);
+ sprintf(tmp,"\\par\\vspace{%3.1f%s}",
+ vspace.value,vspace.units);
+ outbuf = strapp(outbuf,tmp);
+ }
+/* check if it is a member of a group */
+ else if (mydef_count > 0 && (i=is_mydef(w)) >= 0)
+ {
+ if (mydef[i].par > 0)
+ {
+ if (de_arg > 0)
+ mydef[mydef_count].par = mydef[i].par;
+ else
+ {
+ outbuf = end_env(outbuf);
+ outbuf = strapp(outbuf,"\n");
+ }
+ }
+ if (mydef[i].illegal)
+ outbuf = strapp(outbuf,mydef[i].replace);
+ else
+ {
+ w[0] = '\\'; /* replace dot by backslash */
+ outbuf = strapp(outbuf,w);
+ }
+ for (j=1; j <mydef[i].arg_no; j++)
+ {
+ inbuf += get_arg(inbuf,ww,1);
+ sprintf(tmp,"{%s}",ww);
+ outbuf = strapp(outbuf,tmp);
+ }
+ if (de_arg == 0) envoke_stat(mydef[i].par);
+ }
+ else if (man && (strcmp(w,".nf") == 0))
+ {
+ /* JPC : I want nf to be verbatim */
+ outbuf = strapp(outbuf,"\\begin{verbatim}");
+ inbuf += get_verbatim_lines(inbuf,ww,1);
+ outbuf = strapp(outbuf,ww);
+ outbuf = strapp(outbuf,"\n\\end{verbatim}");
+ /** ignoring - **/
+ inbuf += get_line(inbuf,ww,0);
+ }
+ else if ((i=is_troff_mac(w,ww,&arg,&par)) >= 0)
+ {
+ if (par > 0)
+ {
+ if (de_arg > 0) mydef[mydef_count].par = par;
+ else outbuf = end_env(outbuf);
+ }
+ outbuf = strapp(outbuf,ww);
+ if (ww[0] == NULL_C)
+ inbuf = skip_line(inbuf);
+ if (ww[0] != NULL_C && arg == 0)
+ {
+ inbuf = skip_line(inbuf);
+ *outbuf++ = '\n';
+ }
+ if (arg > 0)
+ {
+ if (arg == 1)
+ {
+ inbuf += skip_white(inbuf);
+ inbuf += get_string(inbuf,ww,1);
+ }
+ else
+ {
+ if (isupper(w[1]))
+ {
+ inbuf = skip_line(inbuf);
+ inbuf += get_multi_line(inbuf,ww);
+ }
+ else
+ {
+ inbuf += get_arg(inbuf,tmp,0);
+ inbuf = skip_line(inbuf);
+ if (tmp[0] == NULL_C) N = 1;
+ else N = atoi(tmp);
+ inbuf += get_N_lines(inbuf,ww,N);
+ }
+ }
+ sprintf(tmp2,"{%s}",ww);
+ outbuf = strapp(outbuf,tmp2);
+ }
+ }
+/* if none of the above commands matched, it is either
+ an illegal macro or an unknown command */
+ else
+ {
+ len = get_till_space(inbuf,ww);
+ sprintf(tmp,"%s%s",w,ww);
+ if (mydef_count > 0 && (i=is_mydef(tmp)) >= 0)
+ {
+ inbuf += len;
+ if (mydef[i].par > 0)
+ {
+ if (de_arg > 0)
+ mydef[mydef_count].par=mydef[i].par;
+ else
+ {
+ outbuf = end_env(outbuf);
+ outbuf = strapp(outbuf,"\n");
+ }
+ }
+ outbuf = strapp(outbuf,mydef[i].replace);
+ for (j=1; j <mydef[i].arg_no; j++)
+ {
+ inbuf += get_arg(inbuf,ww,1);
+ sprintf(tmp,"{%s}",ww);
+ outbuf = strapp(outbuf,tmp);
+ }
+ if (de_arg == 0) envoke_stat(mydef[i].par);
+ }
+ else
+ {
+ fprintf(stderr,
+ "I cannot translate troff macro %s\n",w);
+ inbuf += get_line(inbuf,ww,0);
+ outbuf = strapp(outbuf,"%");
+ outbuf = strapp(outbuf,w);
+ outbuf = strapp(outbuf,ww);
+ if (*inbuf == NULL_C) *outbuf++ = '\n';
+ }
+ }
+ }
+
+/* some manuals have commented lines beginning with ''' */
+ else if ((c2 == '\'') && !(mid) && (c1 == '\n' || (first_word)))
+ {
+ if (*inbuf == '\'')
+ {
+ inbuf++;
+ if (*inbuf == '\'')
+ {
+ inbuf++;
+ outbuf = strapp(outbuf,"%");
+ }
+ else outbuf = strapp(outbuf,"''");
+ }
+ else outbuf = strapp(outbuf,"'");
+ }
+
+/* See if it is one of these symbols */
+
+ else if (strcmp(w,"#") == 0 || strcmp(w,"&") == 0 ||
+ strcmp(w,"{") == 0 || strcmp(w,"}") == 0 ||
+ strcmp(w,"%") == 0 || strcmp(w,"_") == 0 ||
+ strcmp(w,"~") == 0 || strcmp(w,"^") == 0 )
+ {
+ outbuf = strapp(outbuf,"\\");
+ outbuf = strapp(outbuf,w);
+ if (strcmp(w,"~") == 0 || strcmp(w,"^") == 0)
+ outbuf = strapp(outbuf,"{}");
+ }
+
+ else if (strcmp(w,">") == 0 || strcmp(w,"<") == 0 || strcmp(w,"|") == 0)
+ {
+ sprintf(tmp,"$%s$",w);
+ outbuf = strapp(outbuf,tmp);
+ }
+
+/* check for backslash commands */
+
+ else if (strcmp(w,"\\") == 0)
+ {
+ if (*inbuf == ' ' || *inbuf == '\t' || *inbuf == '\n')
+ {
+ outbuf = strapp(outbuf,"\\");
+ *outbuf++ = *inbuf++;
+ }
+ else if (*inbuf == NULL_C) ;
+ else if (*inbuf == '-')
+ {
+ inbuf++;
+ outbuf = strapp(outbuf,"--");
+ }
+ else if (*inbuf == '~' || *inbuf == '^')
+ {
+ inbuf++;
+ outbuf = strapp(outbuf,"\\/");
+ }
+ else if (*inbuf == '0')
+ {
+ inbuf++;
+ outbuf = strapp(outbuf,"\\ ");
+ }
+ else if (*inbuf == 'e')
+ {
+ inbuf++;
+ outbuf = strapp(outbuf,"\\bs ");
+ }
+ else if (*inbuf == '\\')
+ {
+ inbuf++;
+ if (*inbuf == '$' && de_arg > 0)
+ {
+ inbuf++;
+ de_arg++;
+ *outbuf++ = '#';
+ }
+ else
+ outbuf = strapp(outbuf,"\\bs ");
+ }
+ else if (*inbuf == '`' )
+ {
+ outbuf = strapp(outbuf,"\\`");
+ inbuf++;
+ }
+
+ else if (*inbuf == '\'')
+ {
+ outbuf = strapp(outbuf,"\\'");
+ inbuf++;
+ }
+ else if (*inbuf == '"')
+ {
+ inbuf++;
+ inbuf += get_arg(inbuf,ww,0);
+ if ( strcmp(ww,"LaTeX")==0)
+ {
+ /** JPC \"LaTeX suite
+ throw suite in verbatim mode in the TeX source **/
+ inbuf += get_line(inbuf,ww,0);
+ outbuf = strapp(outbuf,ww);
+ }
+ else
+ {
+ outbuf = strapp(outbuf,"%");
+ outbuf = strapp(outbuf,ww);
+ inbuf += get_arg(inbuf,ww,0);
+ outbuf = strapp(outbuf,ww);
+ }
+ }
+ else if (*inbuf == '|')
+ {
+ inbuf++;
+ outbuf = strapp(outbuf,"\\,");
+ }
+ else if (*inbuf == '&')
+ inbuf++;
+ else if (*inbuf == '(')
+ {
+ c1 = *++inbuf;
+ c2 = *++inbuf;
+ inbuf++;
+ if (c1 == 'e' && c2 == 'm')
+ outbuf = strapp(outbuf,"---");
+ else if (c1 == 'd' && c2 == 'e')
+ outbuf = strapp(outbuf,"$^\\circ$");
+ else fprintf(stderr,
+ "I am not prepared to handle \\(%c%c\n",c1,c2);
+ }
+ else if (*inbuf == 's')
+ inbuf +=3;
+ else if (*inbuf == '*')
+ {
+ c1 = *++inbuf;
+ inbuf++;
+ if (c1 == ':')
+ outbuf = strapp(outbuf,"\\\"");
+ else if (c1 == 'C')
+ outbuf = strapp(outbuf,"\\v");
+ else if (c1 == ',')
+ outbuf = strapp(outbuf,"\\c");
+ else if (c1 != '(')
+ {
+ sprintf(tmp,"\\%c",c1);
+ outbuf = strapp(outbuf,tmp);
+ }
+ else
+ {
+ fprintf(stderr,
+ "I am not prepared to handle \\*( cases\n");
+ inbuf += 2;
+ }
+ if (c1 != '(')
+ {
+ c1 = *inbuf++;
+ sprintf(tmp,"{%c}",c1);
+ outbuf = strapp(outbuf,tmp);
+ }
+ }
+ else if (*inbuf == 'f')
+ {
+ c1 = *++inbuf;
+ inbuf++;
+ if (c1 == '1' || c1 == 'R')
+ {
+ lastfont = thisfont;
+ thisfont = 1;
+ if (*inbuf == ' ' || *inbuf == '\t' ||
+ *inbuf == '\n' || *inbuf == '\f')
+ {*outbuf++ = ' '; inbuf++;}
+ outbuf = strapp(outbuf,"%\n\\rm ");
+ }
+ else if (c1 == '1' || c1 == 'V')
+ {/** JPC**/
+ lastfont = thisfont;
+ thisfont = 1;
+ if (*inbuf == ' ' || *inbuf == '\t' ||
+ *inbuf == '\n' || *inbuf == '\f')
+ {*outbuf++ = ' '; inbuf++;}
+ outbuf = strapp(outbuf,"%\n\\tt ");
+ }
+ else if (c1 == '2' || c1 == 'I')
+ {
+ lastfont = thisfont;
+ thisfont = 2;
+ if (*inbuf == ' ' || *inbuf == '\t' ||
+ *inbuf == '\n' || *inbuf == '\f')
+ {*outbuf++ = ' '; inbuf++;}
+ &