Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20

Math Help - Problem Inserting EPS Figure into File

  1. #16
    MHF Contributor
    Joined
    Oct 2009
    Posts
    5,561
    Thanks
    785
    I think so. This works for me in Linux.

    You could also save files from Mathematica as PNG or JPG since publishing presumably does not require scaling.
    Follow Math Help Forum on Facebook and Google+

  2. #17
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    I was finally able to include the pdf files. I had to get rid of the dvips option in the \documentclass command! That was the big piece I was missing. I converted the files, and they all show up in the file. The problem is, they aren't getting placed anywhere near where I want them. They're all getting bunched onto a few consecutive pages; some pages have one graphic in the middle of the page (and that's all there is on that page), and other pages have one graphic at the bottom of the page (and that's all there is on that page). Not too good! My text doesn't assume the figures are right in any one spot, but I would like them to be within a page or two of the reference! Any ideas? Why does the dvi file put them in a different location from the pdf?

    Thanks for your patience and help here! It's been great.
    Follow Math Help Forum on Facebook and Google+

  3. #18
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    Ok, I've got the graphics mostly where I want them. My sole remaining issue is that 2 of the 8 graphics seem to think they're bigger than they really are. There's a lot of white space that the graphic seems to own, but I don't want it to own. Here's what I mean:

    Problem Inserting EPS Figure into File-graphic-taking-too-much-white-space.jpg

    The code to produce this was

    Code:
    \begin{figure}[H]
    \begin{center}
       \includegraphics[totalheight=3in]{Momma_k_0_First.pdf}
       \end{center}
       \caption{First Component $|v_{1}(is,0,d_{2})|$ as a function of $s$}\label{Fi:Momma_k=0_First}
    \end{figure}
    I have one other figure that is doing this. Do I fiddle with the bounding box parameters?

    Thanks!
    Follow Math Help Forum on Facebook and Google+

  4. #19
    MHF Contributor
    Joined
    Oct 2009
    Posts
    5,561
    Thanks
    785
    Concerning pictures taking too much space, this may be a problem with the bounding box. You can wrap \includegraphics in \fbox to see the boundary. Also compare the behavior with EPS and DVI; if pictures have the correct size in DVI, the information about the bounding box in EPS may not be taken into account when EPS is converted into PDF. The manual page for epstopdf on my system says that "it is guaranteed to start at the 0,0 coordinate, and it sets a page size exactly corresponding to the BoundingBox".

    Even if the bounding box in PDF is incorrect, you can use the \includegraphics options to set it. Look at the options bb, viewport and trim in the graphicx documentation.

    Concerning the placement of the floats, it's a standard problem that standard LaTeX parameters are rather conservative. There are the following parameters.

    topnumber (counter): the maximum number of floats at the top of the page. Also bottomnumber, totalnumber and dbltopnumber for two-column floats.

    \topfraction (number, changed with \renewcommand): maximum fraction of the page that can be occupied by the top floats. Also \bottomfraction, \dbltopfraction.

    \textfraction (number, changed with \renewcommand): minimum fraction of a normal page that must be occupied by text. Also \floatpagefraction (minimum fraction occupied by floats on a purely float page) and \dblfloatpagefraction.

    \floatsep (glue, changed with \setlength): space between floats at the top or bottom of a page. Also \textfloatsep (between text and a float at top or bottom), \intextsep (between text and float in the middle of text), \dblfloatsep and \dbltextfloatsep.

    I usually set

    \renewcommand{\floatpagefraction}{0.9}
    \renewcommand{\topfraction}{0.9}
    \renewcommand{\textfraction}{0.05}

    See also this FAQ.
    Follow Math Help Forum on Facebook and Google+

  5. #20
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    emakarov, I can't thank you enough. Putting in the bounding box manually for those two troublesome graphics solved all my problems, along with using the float package, and a bunch of other suggestions you've made. I couldn't have done it without you!
    Follow Math Help Forum on Facebook and Google+

Page 2 of 2 FirstFirst 12

Similar Math Help Forum Discussions

  1. Problem inserting image in LaTeX file
    Posted in the LaTeX Help Forum
    Replies: 15
    Last Post: July 12th 2010, 07:47 AM
  2. Inserting matrices into equations
    Posted in the LaTeX Help Forum
    Replies: 3
    Last Post: January 14th 2010, 12:53 PM
  3. Mat lab - Referencing M-file in another M-file
    Posted in the Math Software Forum
    Replies: 5
    Last Post: December 16th 2009, 03:53 AM
  4. Inserting Graphs Into Latex
    Posted in the LaTeX Help Forum
    Replies: 1
    Last Post: September 13th 2009, 10:52 PM
  5. Replies: 1
    Last Post: May 30th 2009, 11:25 PM

/mathhelpforum @mathhelpforum