Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
Welcome to TeX.sx! –  egreg Jan 20 '13 at 16:03

1 Answer 1

up vote 2 down vote accepted

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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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