2

I am working on a document with many images. Thus, I set the option

\documentclass[draft]{scrbook}

to have a fast compiliation process. If I still want to look at a specific image, I use

\includegraphics[draft=false]{image.pdf}

However, I heavily use Inkscape to create pdf_tex files with an SVG background and LaTex rendered labels for the drawing. In draft mode, the labels are rendered, but the SVG is not loaded (which is expected behavior).

No I would like to see a specific one of these images. I tried

\begin{figure}
    \input[draft=false]{image.pdf_tex}
\end{figure}

But it does not work. My current workaround is to get into the .pdf_tex file, find all \includegraphics and add the [draft=false] option there. But is there a better way?

4

You can use (locally) \setkeys{Gin}{draft=false}:

% emulate SVG inclusion
\begin{filecontents*}{\jobname.pdf_tex}
\includegraphics[width=3cm]{example-image.pdf}
\end{filecontents*}

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

\begin{document}

\includegraphics[width=3cm]{example-image-a}

\includegraphics[draft=false,width=3cm]{example-image-a}

\begin{figure}[htp]
\setkeys{Gin}{draft=false}
\input{\jobname.pdf_tex}
\end{figure}

\begin{figure}[htp]
\input{\jobname.pdf_tex}
\end{figure}

\end{document}

enter image description here

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.