Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Need help in Latex

0 views
Skip to first unread message

Wendy Huang

unread,
Jul 19, 1999, 3:00:00 AM7/19/99
to
Can anybody there tell me how to
1. insert a ps picture in latex file, remember something like
\psfig, but don't remember the exact and how to define the size
and position etc.
2. Can I use \caption for tabular? I tried but it turned out an error.
Thanks in advance.

wendy

--


aver...@my-deja.com

unread,
Jul 19, 1999, 3:00:00 AM7/19/99
to

In article <7mvfbr$7kv$1...@watserv3.uwaterloo.ca>,


wz2h...@setosa.uwaterloo.ca (Wendy Huang) wrote:
> Can anybody there tell me how to
> 1. insert a ps picture in latex file, remember something like
> \psfig, but don't remember the exact and how to define the size
> and position etc.

\usepackage[dvips]{graphicx}
...
\includegraphics[angle=90, scale=1.5]{figure}

> 2. Can I use \caption for tabular? I tried but it turned out an error.
> Thanks in advance.

No. Use tabular inside table for that.

=Alex


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

Robin Fairbairns

unread,
Jul 19, 1999, 3:00:00 AM7/19/99
to
Wendy Huang <wz2h...@setosa.uwaterloo.ca> wrote:
>Can anybody there tell me how to
>1. insert a ps picture in latex file, remember something like
> \psfig, but don't remember the exact and how to define the size
> and position etc.

psfig is old and rather buggy. suggest:

\usepackage{graphicx}

\includegraphics[width=<whatever>]{blah.eps}

>2. Can I use \caption for tabular? I tried but it turned out an error.

no; captions are for floating figures and/or tables. if you want a
caption under a tabular environment, the usual thing to do would be

\begin{table}
\begin{tabular}{....}
....
\end{tabular}
\caption{behold, a table}
\end{table}
--
Robin Fairbairns, Cambridge

Bernd Schandl

unread,
Jul 19, 1999, 3:00:00 AM7/19/99
to Wendy Huang
Wendy Huang wrote:
>
> Can anybody there tell me how to
> 1. insert a ps picture in latex file, remember something like
> \psfig, but don't remember the exact and how to define the size
> and position etc.

Put
\usepackage{graphicx}
in the preamble and then
\begin{figure}[htbp]
\centering
\includegraphics{filename.eps}
\caption{...}
\label{...}
\end{figure
You can use the optional argument to specify width (and other things)
\includegraphics[width=10cm]{filename.eps}
Get the file epslatex from CTAN. This is a very good documentation:
CTAN/info/epslatex.{ps,pdf}

> 2. Can I use \caption for tabular? I tried but it turned out an error.

Not in tabular, but in table:
\begin{table}[htbp]
\centering
\begin{tabular}{...}
...
\end{tabular}
\caption{...}
\label{...}
\end{table}
--
Bernd Schandl
Department of Mathematical Sciences
Clemson University
Clemson, SC 29634-1907

Jonathan Baron

unread,
Jul 19, 1999, 3:00:00 AM7/19/99
to
I think the original question was about .ps, not .eps. I am
not an expert on this, but I think that whether you can include
a .ps file depends on what is in it and what goes around it.
For example, if the .ps file has a little image in the middle
and a lot of white space around it, it may not be what you want.
At the very least, you need to change the bounding box. The
usual way to do this is use the ps-to-eps conversion facility in
Ghostview in the File menu. Ghostview comes from
http://www.cs.wisc.edu/~ghost/


However, the basic instructions do work. If you say:

\usepackage[dvips]{graphicx}

before \begin{document}

and then say

\includegraphics{whatever.ps}

in the text, you will get your .ps figure, whether it
is what you want or not.

Jon


Daniel M. German

unread,
Jul 19, 1999, 3:00:00 AM7/19/99
to
In article <7mvfbr$7kv$1...@watserv3.uwaterloo.ca>,

Wendy Huang <wz2h...@setosa.uwaterloo.ca> wrote:
>Can anybody there tell me how to
>1. insert a ps picture in latex file, remember something like
> \psfig, but don't remember the exact and how to define the size
> and position etc.

Everything you want to know about how to insert a PS image in a
document is documented in a file called epslatex.ps, available at
ctan, in the info directory.

You can also find the doucmentation for epsfig (one of the multiple
ways to do it) at:

/software/latex2e_graphics/doc/


>2. Can I use \caption for tabular? I tried but it turned out an error.

>Thanks in advance.

The command \caption is not defined inside tabular. You have to use
\table. Take a look at the LaTeX Companion, chapter 6.

>
>wendy
>
>--
>


dmg

--
Daniel M. Germán "My friends would think I was a nut,
Peter Gabriel --> turning water into wine"
d...@csg.uwaterloo.ca
http://csgwww.uwaterloo.ca/~dmg/home.html

Dewey Yin

unread,
Aug 3, 1999, 3:00:00 AM8/3/99
to
>1. insert a ps picture in latex file, remember something like
> \psfig, but don't remember the exact and how to define the size
> and position etc.

Better to use the standard LaTeX2e graphics package rather than psfig. If
xhier has not upgraded its LaTeX2e, then it may not be available on campus.
Assuming that it is available:

\documentclass{...}
\usepackage{graphicx}
\begin{document}
...
\begin{figure}
\centering
\includegraphics[height=3cm,width=4cm]{pic.eps}
\caption[...]{...}
\label{...}
\end{figure}
...
\end{document}

(Note that I use \centering and not \begin{center}...\end{center} as the
latter adds spurious vertical space.

>2. Can I use \caption for tabular? I tried but it turned out an error.

\begin{table}
\centering
\caption[...]{...}
\label{...}
\begin{tabular}{|c|c|}
... & ... \\
... & ... \\
\end{tabular}
\end{table}

Dewey

--
De-Wei Yin, MASc, Project Leader, Directed Development
AEA Technology Engineering Software Limited
554 Parkside Drive Unit 4, Waterloo, Ontario, Canada N2L 5Z4
Tel: +1-519-886-8435x223 Fax: +1-519-886-7580 E-Mail: y...@asc.on.ca


0 new messages