| 1 |
\ifx\pdfoutput\undefined % We're running regular LaTeX (not pdftex) |
| 2 |
\documentclass[dvips,12pt]{article} |
| 3 |
\RequirePackage[plainpages=false]{hyperref} |
| 4 |
\usepackage{color} |
| 5 |
\typeout{Use 'fig4latex -l' then 'make' to format graphics for regular latex} |
| 6 |
\else % We're running PdfTeX |
| 7 |
\documentclass[pdftex,12pt]{article} |
| 8 |
\RequirePackage[pdftex]{hyperref} |
| 9 |
\hypersetup{colorlinks=true, % |
| 10 |
plainpages=false, % |
| 11 |
%pdfpagelabels, % |
| 12 |
%hyperindex=true, % |
| 13 |
%backref=true, % |
| 14 |
%bookmarks=true, % |
| 15 |
pdftitle={Using fig4latex}, % |
| 16 |
pdfauthor={Joseph E. Fields}, % |
| 17 |
pdfsubject={silly examples}, % |
| 18 |
%pdfpagelayout=SinglePage, % |
| 19 |
%pdfpagetransition=Dissolve, % |
| 20 |
pdfstartview={XYZ 0 0 1.25}, % |
| 21 |
pdfstartpage=2, % |
| 22 |
pdffitwindow=true} |
| 23 |
\pdfcompresslevel=9 |
| 24 |
\typeout{Use 'fig4latex -p' then 'make' to format graphics for pdflatex.} |
| 25 |
|
| 26 |
\fi |
| 27 |
|
| 28 |
\usepackage{graphicx} |
| 29 |
|
| 30 |
\begin{document} |
| 31 |
|
| 32 |
\title{Using fig4latex} |
| 33 |
|
| 34 |
\author{Joseph Fields\thanks{Department of Mathematics, |
| 35 |
Southern Connecticut State University, New Haven CT 06515, USA; |
| 36 |
e-mail: [email protected]}} |
| 37 |
|
| 38 |
\date{\today} |
| 39 |
|
| 40 |
\maketitle |
| 41 |
|
| 42 |
{\em Never raise your hand to your kids. It leaves your groin unprotected. --Red Buttons} |
| 43 |
|
| 44 |
|
| 45 |
\section{Algorithms} |
| 46 |
\label{sec:alg} |
| 47 |
|
| 48 |
This section contains two figures. The first is Figure~\ref{fig:if-then} |
| 49 |
which illustrates an excerpt from a computer program both in pseudocode and as a flowchart. |
| 50 |
|
| 51 |
\begin{figure}[!hbt] |
| 52 |
\begin{tabular}{ccc} |
| 53 |
\input{figs/if-then_flowchart.tex} |
| 54 |
& \hspace{1in} & |
| 55 |
\begin{minipage}[b]{.3\textwidth} |
| 56 |
\tt If $x=y$ then \\ |
| 57 |
\rule{15pt}{0pt} $x=x+1$ \\ |
| 58 |
End If \\ |
| 59 |
\rule{30pt}{0pt} \vdots\\ |
| 60 |
\\ |
| 61 |
\\ |
| 62 |
\end{minipage} \\ |
| 63 |
\end{tabular} |
| 64 |
\caption{A small example in pseudocode and as a flowchart} |
| 65 |
\label{fig:if-then} |
| 66 |
\end{figure} |
| 67 |
|
| 68 |
Next, we illustrate the division algorithm using a flowchart |
| 69 |
in Figure~\ref{fig:div_alg}. |
| 70 |
|
| 71 |
\begin{figure}[!hbt] |
| 72 |
\begin{center} |
| 73 |
\input{figs/div_alg_flowchart.tex} |
| 74 |
\end{center} |
| 75 |
\caption{The division algorithm in flowchart form.} |
| 76 |
\label{fig:div_alg} |
| 77 |
\end{figure} |
| 78 |
|
| 79 |
That's all folks! |
| 80 |
\end{document} |