When I am using \includegraphics with the draft option


the image name is shown instead of the image. Unfortunately it appears on one line without lines breaks, so that it extends to the beyond the border and becomes unreadable. Is it possible to fix this?

  • That's \texttt, most likely, this doesn't break
    – user31729
    May 30 '16 at 20:52

A horrible hack. But, hey! It works!


 {\edef\@tempa{#3}\rlap{ \ttfamily\expandafter\strip@prefix\meaning\@tempa}}
\tl_new:N \l_breitling_filename_tl
  \tl_set:Nx \l_breitling_filename_tl { #1 }
    \tl_map_inline:Nn \l_breitling_filename_tl { ##1 \hspace{0pt} }


Small height or width and a very long name might make the file name overlap the text above and below the rectangle.

enter image description here

  • Wow, what a hack! Thank you! I wish a solution would be implemented in \includegraphics because this is really an extreme hack and obfuscating tex files. Nevertheless I think it is important because without it the draft option is useless. May 31 '16 at 9:27

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.