Thread Subject: How to include an image into .tex files

Subject: How to include an image into .tex files

From: Jeri wang

Date: 1 Jun, 2008 08:42:02

Message: 1 of 6

Hi, I am writing a Latex file. And I want to include an
image into it. But I find that the image included must be PS
file. So how to change the image into PS file?

Subject: How to include an image into .tex files

From: us

Date: 1 Jun, 2008 09:47:01

Message: 2 of 6

"Jeri wang":
<SNIP in search of a postscript option...

> So how to change the image into PS file...

a hint:

     help print;
% peruse the section on built-in ML drivers...

us

Subject: How to include an image into .tex files

From: Jeri wang

Date: 1 Jun, 2008 10:39:01

Message: 3 of 6

"us " <us@neurol.unizh.ch> wrote in message
<g1tr6l$sms$1@fred.mathworks.com>...
> "Jeri wang":
> <SNIP in search of a postscript option...
>
> > So how to change the image into PS file...
>
> a hint:
>
> help print;
> % peruse the section on built-in ML drivers...
>
> us
>
Now, I know the command to include the image files with
extension .eps, but I have not find how to include the image
*.bmp into the Latex file.
Jeri

Subject: How to include an image into .tex files

From: Srikanth

Date: 1 Jun, 2008 10:58:37

Message: 4 of 6

Using print, you can print your figures as eps instead of bmp/jpeg. So
you can open the file (I'm assuming you have an existing bmp one since
you originally asked about conversion), and then print it. The quality
will be lower than just recreating the image (assuming you generated
it in Matlab originally), however.
However, if you really don't want to print in eps - I'm not sure if
bmp is allowed by LaTex, but you can always use jpeg format by using
the pdftex package... Of course, you didn't need matlab for this -
even Windows Paint could do this conversion from bmp to jpeg.

Subject: How to include an image into .tex files

From: yousif salman

Date: 1 Jun, 2008 11:41:01

Message: 5 of 6

"Jeri wang" <cfwang828@gmail.com> wrote in message
<g1tncp$1o6$1@fred.mathworks.com>...
> Hi, I am writing a Latex file. And I want to include an
> image into it. But I find that the image included must be PS
> file. So how to change the image into PS file?

You can use saveas as well.

1. saveas(gcf,'star.ps', 'psc2') % colored save
2. saveas(gcf, 'star.ps') % without color

3. set(gcf, 'PaperPositionMode', 'auto');
   print signal.pdf
% this one controls the mode of the saved pdf

I normally save the figures in pdf when i put them in latex.
4. orient landscape
   saveas(gcf,'a.pdf')

Subject: How to include an image into .tex files

From: B Sreedhar

Date: 26 Sep, 2008 10:41:02

Message: 6 of 6

"yousif salman" <yousifshamsa@hotmail.com> wrote in message <g1u1sd$9b4$1@fred.mathworks.com>...
> "Jeri wang" <cfwang828@gmail.com> wrote in message
> <g1tncp$1o6$1@fred.mathworks.com>...
> > Hi, I am writing a Latex file. And I want to include an
> > image into it. But I find that the image included must be PS
> > file. So how to change the image into PS file?
>
> You can use saveas as well.
>
> 1. saveas(gcf,'star.ps', 'psc2') % colored save
> 2. saveas(gcf, 'star.ps') % without color
>
> 3. set(gcf, 'PaperPositionMode', 'auto');
> print signal.pdf
> % this one controls the mode of the saved pdf
>
> I normally save the figures in pdf when i put them in latex.
> 4. orient landscape
> saveas(gcf,'a.pdf')
>

A small improvement
saveas(gcf,regexprep(get(gcf,'FileName'),'fig','pdf'))

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
print us 1 Jun, 2008 05:50:05
reference us 1 Jun, 2008 05:50:05
image processing Jeri wang 1 Jun, 2008 04:45:04
rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com