LaTeX Latex Pdf figs insertion

  • Thread starter ChrisVer
  • Start date

ChrisVer

Gold Member
3,327
434
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?
 
72
21
You mean something like:
Code:
\usepackage{graphicx}
...
\ begin{figure}
\includegraphics[width=\textwidth]{file.pdf}
\caption{This is a caption}
\end{figure}
?
 

ChrisVer

Gold Member
3,327
434
would that work?
 
72
21
As long as the pdf is in the same folder as your .tex file, then yes. If it isn't, you can use:
Code:
\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.
 

Related Threads for: Latex Pdf figs insertion

Replies
2
Views
1K
Replies
6
Views
6K
Replies
4
Views
20K
  • Posted
Replies
1
Views
29K
  • Posted
Replies
2
Views
4K
Replies
12
Views
5K
Replies
5
Views
33K
Replies
2
Views
2K

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top