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.

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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.