From: Jim Lambaugh on
Hi all

In Mathematica I have the following code: Export["plot.pdf", Plot[x^2,
{x, 1, 2}], ImageSize -> 100]

Now, when I include "plot.pdf" in my LaTeX-document, my compiler says
that there is no bounding-box, and hence it will not compile. What is
the issue here? Mathematica or LaTeX?

Also, is it possible to change the font of the numbers on the plot?


Sincerely,
Jim Lambaugh.

From: Murray Eisenberg on
That's a common problem that is easily solved in either of two ways:

(1) Process the LaTeX file with pdfTeX so as to directly convert from
..tex source to .pdf output. This should avoid the bounding box problem.

(2) Instead of doing the Mathematica Export to .pdf, Export to .eps.
Next, run an ordinary LaTeX processor that produces .dvi output.
Finally, convert from .dvi to .ps and then from .ps to .eps.

I do (2) all the time, since I get the quickest workflow that way. But I
use (1) sometimes, too.

To be sure, I tried both solutions using MiKTeX 2.8 and the following
..tex source file. I show the version for method (1); change the
extension from "pdf" to "eps" for method (2).

\documentclass{article}
\usepackage{graphics}

\begin{document}

Here's a plot:

\begin{figure}[h!]
\includegraphics{plot.pdf}
\end{figure}

\end{document}



On 3/4/2010 5:27 AM, Jim Lambaugh wrote:
> Hi all
>
> In Mathematica I have the following code: Export["plot.pdf", Plot[x^2,
> {x, 1, 2}], ImageSize -> 100]
>
> Now, when I include "plot.pdf" in my LaTeX-document, my compiler says
> that there is no bounding-box, and hence it will not compile. What is
> the issue here? Mathematica or LaTeX?
>
> Also, is it possible to change the font of the numbers on the plot?
>
>
> Sincerely,
> Jim Lambaugh.
>

--
Murray Eisenberg murray(a)math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305

From: Christoph Lhotka on
hi, I usually export to "EPS" without problems; the textstyle can be
controlled using TextStyle, e.g.

Export["fig.eps",Plot[x^2,{x,1,2},TextStyle->{FontSize->14,...}],"EPS"]

christoph

On Do, 4.03.2010, 11:27, Jim Lambaugh wrote:
> Hi all
>
> In Mathematica I have the following code: Export["plot.pdf", Plot[x^2,
> {x, 1, 2}], ImageSize -> 100]
>
> Now, when I include "plot.pdf" in my LaTeX-document, my compiler says
> that there is no bounding-box, and hence it will not compile. What is
> the issue here? Mathematica or LaTeX?
>
> Also, is it possible to change the font of the numbers on the plot?
>
>
> Sincerely,
> Jim Lambaugh.
>
>
>


--
Mag. Christoph Lhotka
University of Vienna / Institute for Astronomy
Tuerkenschanzstrasse 17, A-1180 Vienna, Austria
fon. +43 (1) 4277 51841
mail. lhotka(a)astro.univie.ac.at


From: Tyler on
Sounds like you're struggling with LaTeX to me. Are you running
pdfLaTeX to compile the code? To verify that it's not the Mathematica,
what version (and operating system are you running)?




From: Peter Breitfeld on
I suspect you tried to compile with latex not with pdflatex. Only
pdflatex can handle pdf-pictures.

Depending on your system you may choose the way tex ---> pdf, not
tex-->dvi ...


Jim Lambaugh wrote:

> Hi all
>
> In Mathematica I have the following code: Export["plot.pdf", Plot[x^2,
> {x, 1, 2}], ImageSize -> 100]
>
> Now, when I include "plot.pdf" in my LaTeX-document, my compiler says
> that there is no bounding-box, and hence it will not compile. What is
> the issue here? Mathematica or LaTeX?
>
> Also, is it possible to change the font of the numbers on the plot?
>
>
> Sincerely,
> Jim Lambaugh.
>

--
_________________________________________________________________
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de