[OS X TeX] How to Insert Graphics Using TeXShop?
Zachary Davis
zsd3711 at gamma2.uta.edu
Sun Mar 10 22:11:57 EST 2002
I've been having trouble inserting this .eps file into my TeX document.
At the moment TeX is giving me an error that an \end control sequence is
missing, which I can't seem to find. The .eps file itself when it is
embedded into the output file is off-center, and it is put between some
text, in which it shouldn't. My source file is as follows (excuse the
length of this message):
\documentclass{article}
\usepackage{graphicx}
\setlength{\headsep}{0in}
\setlength{\evensidemargin}{-0.5in}
\setlength{\oddsidemargin}{-0.5in}
\setlenght{\textheight}{9.5in}
\setlength{\topmargin}{-0.5in}
\begin{document}
\centerline{\small University of Texas at Arlington}
\centerline{\small Aerospace Engineering Program}
\smallskip
\centerline{\Large AE 5327 Computational Aerodynamics}
\smallskip
\centerline{\Large \bf Two-Dimensional Euler Equations for Flow}
\centerline{\Large \bf Through a Supersonic Duct}
\medskip
\centerline{\normalsize by}
\smallskip
\centerline{ZACHARY S. DAVIS}
\bigskip
\bigskip
\section{Introduction}
In this assignment we are asked to write a computer program utilizing
the MacCormack scheme to solve the two-dimensional Euler equations for
flow through a supersonic duct. The problem defines the cross-sectional
area distribution as:
\medskip
\begin{equation}
A\left( x \right) = \frac{H_0}{L} \times \left(2 - \sin{3.14159 \times
x}\right) \quad \mbox{for} \quad 0<x<1.
\end{equation}
\medskip
Both subsonic and supersonic inlet conditions were investigated, and for
both studies several mesh resolutions $\left( N_x \times N_y \right)$
were utilized, where $N_x \hspace{0.1cm} \mbox{and} \hspace{0.1cm} N_y$
are the number of intervals in the $X \hspace{0.1cm}\mbox{and}
\hspace{0.1cm} Y$ directions, respectively. The computations were
initialized using the solution to the isentropic steady,
quasi-one-dimensional case. Additionally, the vertical velocity could
either be initialized by taking into account the y-variation, or by
setting it to zero. Choosing either method to initialize the vertical
velocity was a non-issue for the computations. To compare the
two-dimensional converged solution to the quasi-1D solution, and average
of the desired result was taken as follows:
\medskip
\begin{equation}
\bar{U}^y_{i} = \frac{\sum \limits^{N_y+1}_{j=1} u\left( i,j \right)
vol\left( i,j \right)}{\sum \limits^{N_y+1}_{j=1} vol\left( i,j \right)}.
\end{equation}
\medskip
In order to investigate the convergence of the solution, the quantity
\medskip
\begin{equation}
\frac{dU}{dt} = \frac{1}{2} \times \left( R^n + R^{n+\frac{1}{2}}
\right),
\end{equation}
\medskip
where $R$ represents the balance of fluxes (RHS).
\section{Subsonic Case}
For the subsonic case, the upstream conditions p = 1.0 atm, T = 288K,
and M = 0.1 and the downstream condition p = 1.0 atm, were chosen. The
duct aspect ratio $\frac{H_0}{L}$ was taken to be 0.10, and a mesh
consisting of $N_x = 50$, $N_y = 16$, and CFL = 0.9 were also used for
the investigation of this case. The following is the convergence plot
generated from computation:
\medskip
\begin{figure}
\includegraphics{pict1.eps}
\label{Figure 2.1}
\end{figure}
\end{document}
Am I using the includegraphics command correctly? Your help is
invaluable.
Thanks,
On Sunday, March 10, 2002, at 07:53 PM, Gary L. Gray wrote:
> On 3/10/02 8:48 PM, "Zachary Davis" <zsd3711 at gamma2.uta.edu> wrote:
>
>> I've never tried including a graph in one of my documents, and I'm
>> running into some trouble doing so using TeXShop. I have created a
>> plot
>> using gnuplot, and have converted the image to an .eps file using
>> GraphicConverter. Then, I placed this .eps file in the same directory
>> as my LaTeX source file--the one which I want to include this graph. I
>> have issued the command \includegraphics{filename.eps} in this source
>> file; however, I get an error in the console which says this control
>> sequence is undefined. Is there something else I need to include in my
>> source file, or is the .eps file in the wrong directory? Any help
>> would
>> be appreciated.
>
> Have you loaded the graphicx package using \usepackage{graphicx} ???
>
> In addition, since you are using .eps files, be sure to typeset using
> TeX +
> Ghostscript instead of pdftex.
>
> Good luck,
>
> -- Gary L. Gray
>
>
> -----------------------------------------------------------------
> To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
> "unsubscribe macosx-tex" (no quotes) in the body.
> For additional HELP, send email to <info at email.esm.psu.edu> with
> "help" (no quotes) in the body.
> -----------------------------------------------------------------
>
>
========================================================
Zachary S. Davis
Department of Aerospace Engineering
University of Texas at Arlington
P.O. Box 19032
Arlington, TX 76019
Home: (817) 272-6418 zsd3711 at gamma2.uta.edu
Office: (817) 272-5269
“Genius, that power that dazzles mortal eyes,
is oft but perseverance in disguise."
--Henry Willard Austin
========================================================
-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <info at email.esm.psu.edu> with
"help" (no quotes) in the body.
-----------------------------------------------------------------
More information about the MacOSX-TeX
mailing list