Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Latex Pdf figs insertion

  1. May 12, 2015 #1

    ChrisVer

    User Avatar
    Gold Member

    Hi, I have some figures in a pdf form, and I'd like to pass them into latex as figures ->meaning I want to be able to use a caption.
    I used the:
    \usepackage{pdfpages}

    but this inserts the pdf page as it is, and I can't "edit" it (by adding a caption).

    Is there any possible way to do it?
     
  2. jcsd
  3. May 12, 2015 #2
    You mean something like:
    Code (Text):
    \usepackage{graphicx}
    ...
    \ begin{figure}
    \includegraphics[width=\textwidth]{file.pdf}
    \caption{This is a caption}
    \end{figure}
    ?
     
  4. May 12, 2015 #3

    ChrisVer

    User Avatar
    Gold Member

    would that work?
     
  5. May 12, 2015 #4
    As long as the pdf is in the same folder as your .tex file, then yes. If it isn't, you can use:
    Code (Text):

    \graphicspath{ {path1}{path2}... }
     
    in the preamble. This has some issues if the folder name has spaces though, so I prefer just putting the pdfs in the same folder as the .tex file and not bother with it. If you absolutely want that though, there's also the "grffile" package, but it can be slow (on my computer the compilation takes about 20x longer than without the package). Also, I forgot to mention, remove the space between the backslash and "figure", together it gave me some weird formatting on the site so I separated them.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Latex Pdf figs insertion
  1. MATLAB FIG to PDF (Replies: 1)

Loading...