Graphics, Figures & TablesRemove Pathname from .pdf output

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
BMAcox
Posts: 40
Joined: Sun Dec 23, 2007 12:07 am

Remove Pathname from .pdf output

Post by BMAcox »

Hello:

I am using the following packages in my TeXnicCenter to output my file into .pdf.
\documentclass{article}
\ifpdf
\usepackage[pdftex]{graphicx}
\pdfcompresslevel=9
\else
\usepackage{graphicx}
\fi
\usepackage{pdflscape}
\usepackage{array}
\usepackage{amsmath}

My LaTeX code was:
\begin{figure}
\centering
\includegraphics[clip=true,trim=35 80 45 65]{D:/Mypapers/fig1.pdf}
\label{fig:fig1}
\end{figure}

But the output .pdf file has the pathname of my graphics file inserted in the figure! i.e., "Mypapers/fig1.pdf"

How do I remove the pathname literally written across the figures in my output .pdf file?

ThanQ

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

BMAcox
Posts: 40
Joined: Sun Dec 23, 2007 12:07 am

Re: Remove Pathname from .pdf output

Post by BMAcox »

When I first open up the latex file via TeXnicCenter, I do select 'load this project.' And I see all my figures and tables in the left pane under Navigator of the Editor.

I tried just deleting {D:/....} from
\includegraphics[]{D:/}

but then the graphs are not found. How do we delete the directory from the .pdf output? :oops:
BMAcox
Posts: 40
Joined: Sun Dec 23, 2007 12:07 am

Re: Remove Pathname from .pdf output

Post by BMAcox »

The following soln from poster Localghost worked:

"Regarding your problem you should avoid any special characters (blank spaces, underscores, ...) in the name and the path of the file. As an alternative you can try the grffile package from the oberdiek bundle."
Post Reply