3

How to redefine draft mode for graphicx package not to draw figure borders but only image path? I would like to print the document without pictures and then stick photos.

1

1 Answer 1

3

The box drawing depends on the rather complex command \Gin@setfile; however some patches can be "easily" applied:

\documentclass{article}
\usepackage[draft]{graphicx}

% Let's patch \Gin@setfile rather than copying its definition and change it
\usepackage{etoolbox}
\makeatletter
\patchcmd\Gin@setfile{\vrule\hss}{\vrule\@width\z@\hss}{}{}
\patchcmd\Gin@setfile{\hss\vrule}{\hss\vrule\@width\z@}{}{}
\patchcmd\Gin@setfile{\hrule\@width}{\hrule\@height\z@\@width}{}{}
\patchcmd\Gin@setfile{\vss\hrule}{\vss\hrule\@height\z@}{}{}
\makeatother

\begin{document}

\includegraphics{filename}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .