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

Placing a picture with LaTeX

17 views
Skip to first unread message

Ivan Latorre

unread,
Jun 13, 2005, 5:46:09 PM6/13/05
to
Hi

How to set the exact place for a picture in a page?

I've found this command:

\begin{figure}
\includegraphics[height=1in,width=0.75in]{picture.jpg}
\end{figure}

but I don't know how to set the exact coordinates where I want the
picture in the page.

Thanks in advance

Hendrik Maryns

unread,
Jun 13, 2005, 6:27:11 PM6/13/05
to
Ivan Latorre uitte de volgende tekst op 13/06/2005 23:46:

You're using the figure environment, which is a float. You can change
its behavior with the [htb!] options. For example:

\begin{figure}[h]


\includegraphics[height=1in,width=0.75in]{picture.jpg}
\end{figure}

will place it at this place (here). t is for top, b is for bottom. you
can combine those in order of precedence. Default is htb. A ! forces
LaTeX to put it at the given place, even when this wouldn't do good to
the page lay-out.

Note that you probably want to add a \centering at the start of the
figure environment.

Also, this command will only work with pdflatex, as you use a .jpg
image. If you want to use standard LaTeX, you'll have to convert it to
.eps. See numerous threads about this topic in Google groups. The best
is to have both and not specify an extension, that way the right one
will be picked automatically.

If you want to insert a figure in the middle of a sentence, just leave
out the \begin and \end{figure} commands.

HTH, H.
--
Hendrik Maryns

Interesting websites:
www.lieverleven.be (I cooperate)
www.eu04.com European Referendum Campaign
aouw.org The Art Of Urban Warfare

El Bandolero

unread,
Jun 14, 2005, 1:36:50 AM6/14/05
to
Il Mon, 13 Jun 2005 23:46:09 +0200, Ivan Latorre ha scritto:

> but I don't know how to set the exact coordinates where I want the
> picture in the page.

if you use this you will have pictures treated almost as the other text. If
you want the text *around* the picture, use the picins package
to specify cooordinates try pstools
\rput(3,3){\epsfbox{myfile.eps}}
where (3,3) are expressed in units specified by setting
\psset{unit=1cm}
or what you want (in=inch, pt=point) see documentation for pstricks

--
ciao
Bando

El Bandolero

unread,
Jun 14, 2005, 1:41:21 AM6/14/05
to
Il Tue, 14 Jun 2005 07:36:50 +0200, El Bandolero ha scritto:

> or what you want (in=inch, pt=point) see documentation for pstricks

I forgot to say that you must use epsf.sty too
--
ciao
Bando

Piet van Oostrum

unread,
Jun 14, 2005, 3:45:32 AM6/14/05
to
>>>>> El Bandolero <el.ban...@tiscali.it> (EB) wrote:

>EB> Il Tue, 14 Jun 2005 07:36:50 +0200, El Bandolero ha scritto:
>>> or what you want (in=inch, pt=point) see documentation for pstricks

>EB> I forgot to say that you must use epsf.sty too

There's no reason to use epsf.sty and \epsfbox. It is better to use the
standard \includegraphics.
--
Piet van Oostrum <pi...@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: pi...@vanoostrum.org

Robin Fairbairns

unread,
Jun 14, 2005, 4:59:41 AM6/14/05
to

i think we need to know what you're actually doing: if you really mean
this is a "figure", and just want its placement, consider the advice
in http://www.tex.ac.uk/cgi-bin/texfaq2html?label=textflow (there
seems to be a problem with the html of that, but the sillinesses are
quite obvious -- i'll try to find time to put 'em right today).

if you're building up some sort of design, containing pictures and
text dotted around a page (as in a poster), consider the advice in
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=abspos
--
Robin (http://www.tex.ac.uk/faq) Fairbairns, Cambridge

El Bandolero

unread,
Jun 14, 2005, 8:11:52 AM6/14/05
to
Il Tue, 14 Jun 2005 09:45:32 +0200, Piet van Oostrum ha scritto:

> There's no reason to use epsf.sty and \epsfbox. It is better to use the
> standard \includegraphics.

sorry
in pstricks official documentation there is an example
\rput(3,3){\epsfbox{myfile.eps}}
I thought it cold be useful to put pictures wherever I want, but I
misunderstood

--
ciao
Bando

Enrico Gregorio

unread,
Jun 14, 2005, 8:35:26 AM6/14/05
to
El Bandolero <el.ban...@tiscali.it> wrote:

There is nothing that prevents you from writing

\rput(3,3){\includegraphics{myfile}}

PStricks has come into life when \includegraphics didn't
exist. Updating the documentation is always a pain. Of course,
this is not a comment against the maintainer of that package
who does a wonderful job. Always bear in mind that

"if it works, don't fix it".

Ciao
Enrico

Herbert Voss

unread,
Jun 14, 2005, 8:50:17 AM6/14/05
to
El Bandolero wrote:

> Il Tue, 14 Jun 2005 09:45:32 +0200, Piet van Oostrum ha scritto:
>
>> There's no reason to use epsf.sty and \epsfbox. It is better to use the
>> standard \includegraphics.
>
> sorry
> in pstricks official documentation there is an example
> \rput(3,3){\epsfbox{myfile.eps}}

in which part of the documentation did you read this?

Herbert


El Bandolero

unread,
Jun 14, 2005, 2:35:31 PM6/14/05
to
Il Tue, 14 Jun 2005 14:50:17 +0200, Herbert Voss ha scritto:

>> sorry
>> in pstricks official documentation there is an example
>> \rput(3,3){\epsfbox{myfile.eps}}
>
> in which part of the documentation did you read this?

page 78 of PSTricks User’s Guide
a pdf file by Timothy Van Zandt
--
ciao
Bando

Herbert Voss

unread,
Jun 14, 2005, 2:51:22 PM6/14/05
to

ah, ok. As Enrico wrote

"if it works, don't fix it".

PSTricks is always PostScript, so it is not really important
to use graphicx here. However, it is a good idea ...

Herbert


--
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes

Ivan Latorre

unread,
Jun 14, 2005, 4:12:45 PM6/14/05
to
Thanks a lot!

Using \rput(x,y){\includegraphics{myfile}} I can insert the image
anywhere in the page.

I had to install the missing packages and put \usepackage{pstricks} at
the beginning of the .tex file (apart from \usepackage{graphicx}).

These are my first steps with LaTeX and the results are impressive
(Microsoft Word sucks...).

El Bandolero

unread,
Jun 15, 2005, 2:34:01 AM6/15/05
to
Il Tue, 14 Jun 2005 22:12:45 +0200, Ivan Latorre ha scritto:

> These are my first steps with LaTeX and the results are impressive
> (Microsoft Word sucks...).

actually they are not comparable...
IMHO MS Word does the job if you type a letter of max one page, no math, no
pictures.

La(TeX) is far from perfection, but it has been developed by scientists for
scientists. Most of the TeXnicians does extensions and packages to work
well and not to sell a lot and to make money. "To sell and to make money"
means being obsessed by timetables and you have to DO the job, whatever the
result is.

One of the things I ate more in MS Word is automatic corrections as I love
writing and I hate somebody who puts capital letters where I don't want
them!

I didn't succed in eliminating capitals correction in MS Word so if
somebody can help me ;-)
--
ciao
Bando

Robin Fairbairns

unread,
Jun 15, 2005, 6:50:31 AM6/15/05
to
El Bandolero <el.ban...@tiscali.it> writes:
>One of the things I ate more in MS Word is automatic corrections as I love
>writing and I hate somebody who puts capital letters where I don't want
>them!

everyone to his own, i suppose. i gave up capitals in response to
arthritic problems with my fingers; while my fingers are a bit better
now, i find that typing capitals is actually rather difficult (because
of the long period of not typing them).

so text i write, using m$ word, actually comes out looking better, for
effort invested, than corresponding text written for (la)tex.

which is why i use tex all the time, of course (even though part of my
job is sorting out word problems for people...).

Katrien Michiels

unread,
Jun 15, 2005, 8:30:44 AM6/15/05
to
El Bandolero wrote:

> I didn't succed in eliminating capitals correction in MS Word so if
> somebody can help me ;-)

Tools - Autocorrect Options and you can switch off annoying things like
unwanted capitals and much more.

to eliminate the automatic spelling checker: Tools - Options - Spelling
& Grammar an then uncheck "check spelling as you type".

With the Tools-menu, you can actually switch off most of the irritating
Word interventions. Unfortunately there is no button yet that just tells
Word to "shut up and leave the writing to the writer"...

anyway, I prefer LaTeX too. it leaves you alone until you call it, and
then it does just what it's told.

Katrien

El Bandolero

unread,
Jun 15, 2005, 11:55:28 AM6/15/05
to
Il Wed, 15 Jun 2005 14:30:44 +0200, Katrien Michiels ha scritto:

>> I didn't succed in eliminating capitals correction in MS Word so if
>> somebody can help me ;-)
>
> Tools - Autocorrect Options and you can switch off annoying things like
> unwanted capitals and much more.
>
> to eliminate the automatic spelling checker: Tools - Options - Spelling
> & Grammar an then uncheck "check spelling as you type".

thank you very much!
now i can write what i like

--
ciao
Bando

El Bandolero

unread,
Jun 16, 2005, 3:03:22 PM6/16/05
to
Il Wed, 15 Jun 2005 14:30:44 +0200, Katrien Michiels ha scritto:

>> I didn't succed in eliminating capitals correction in MS Word so if
>> somebody can help me ;-)
>
> Tools - Autocorrect Options and you can switch off annoying things like
> unwanted capitals and much more.
>
> to eliminate the automatic spelling checker: Tools - Options - Spelling
> & Grammar an then uncheck "check spelling as you type".

Nothing to do!
Again it corrects me all capitals in the beginning of a sentence. This is
awful when you are typing in a table, for instance

--
ciao
Bando

Wiktor S.

unread,
Jun 17, 2005, 6:30:51 AM6/17/05
to
>> Tools - Autocorrect Options and you can switch off annoying things
>> like unwanted capitals and much more.
>>
>> to eliminate the automatic spelling checker: Tools - Options -
>> Spelling & Grammar an then uncheck "check spelling as you type".
>
> Nothing to do!
> Again it corrects me all capitals in the beginning of a sentence.
> This is awful when you are typing in a table, for instance

Tools - Autocorrect Options - Autocorrect - Capitalize First Letter Of
Sentences


--
Azarien

II^XXXII=M"V'"C"C"X"C"M'V"C'M'L'X'V'MMCCXCVI

Katrien Michiels

unread,
Jun 17, 2005, 7:31:56 AM6/17/05
to
El Bandolero wrote:
> Nothing to do!
> Again it corrects me all capitals in the beginning of a sentence. This is
> awful when you are typing in a table, for instance
>

Ah, but for tables you have to uncheck another one (of course... This
would be another use for the all-in-one "don't you mess with my
input"-button):

Tools - Autocorrect Options - Autocorrect - Capitalize first letter of
table cells

btw: aren't we getting a little off topic, discussing MSWord features
(or non-features) in the TeX newsgroup?

Katrien

0 new messages