Graphics, Figures & Tables ⇒ Problem using .pdf in figure
-
- Posts: 9
- Joined: Wed Dec 17, 2008 3:16 am
Problem using .pdf in figure
I've been drawing diagrams using a vector graphics program and converting svg to jpeg to include them in my latex file. However, this produces a significant loss in quality, and thus I want to save the graphics as a pdf and then include them in latex. I've had no problem doing this, however, after compiling, latex has changed the graphic slightly; namely all of the colours are darker and more drab, and two polygon gradient fills have just disappeared (the other polygons I've used a gradient fill on keep their fill).
I checked the pdf file that the graphic is in, and it looks fine, so I'm not really sure what's going on here! Any help would be greatly appreciated.
Thanks,
Nick
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: Problem using .pdf in figure
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 9
- Joined: Wed Dec 17, 2008 3:16 am
Re: Problem using .pdf in figure
Drawing with LaTeX packages is not an option at this point, by the sheer number of diagrams that need to be done over the next few weeks!
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: Problem using .pdf in figure
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 9
- Joined: Wed Dec 17, 2008 3:16 am
Re: Problem using .pdf in figure
I am using Inkscape to draw the vector graphics. .svg files are not allowed as attachments so I have zipped the .svg file.
As a point of interest, the gradient shading on P3, P4, P3' and P4' disappears with the following in my latex file:
\begin{figure}[h]
\centering
\includegraphics[width=10cm]{nonaltnotrot.pdf}
\caption{An edge $e$ in $B$ glues to $P_3$, but it's neighbouring edges in $B'$ do not glue to $P'_3$}
\end{figure}
- Attachments
-
- nonaltnotrot.rar
- svg file (zipped)
- (2.88 KiB) Downloaded 363 times
-
- nonaltnotrot.pdf
- pdf file
- (35.42 KiB) Downloaded 396 times
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: Problem using .pdf in figure
When I open the SVG file with GIMP, I get an according look with your drawing elements on a transparent layer.
- Attachments
-
- The PDF file opened with Adobe Reader.
- openPDF.png (30.88 KiB) Viewed 12741 times
-
- The SVG file opened with Inkscape.
- openSVG.png (46.85 KiB) Viewed 12743 times
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 9
- Joined: Wed Dec 17, 2008 3:16 am
Re: Problem using .pdf in figure
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Problem using .pdf in figure
Try to reduce the problem to a minimal working example (MWE) that reproduces the undesired effect you described in your initial post. Attach the source file, the final PDF output and a screenshot of the MWE as seen with your viewer.
- Attachments
-
- The PDF file viewed with SumatraPDF.
- openPDF-S.png (23.18 KiB) Viewed 12722 times
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 9
- Joined: Wed Dec 17, 2008 3:16 am
Re: Problem using .pdf in figure

Nick