I would like to force using external graphics (if exist) for a few figures in my document. The following does what I want but document-wide:

\tikzset{external/mode=graphics if exists}

however, I would like to apply it for selected figures only. Is there any command working similar way to

\tikzset{external/export next=false}

but instead of remaking the tikz figure, make tikz use the external graphics?

  • You can say \tikzexternaldisable after \tikzexternalize to switch off externalisation globally and then use \tikzexternalenable to switch it on for specific images. But I'm not sure if this is what you mean... – cfr Jul 1 '14 at 0:15
  • Thanks! I am aware of that method, though it switches of the externalization and LaTeX will compile the tikz image. I am looking for some method, which tell tikz to use external graphics (PDFs generated by tikz) and not compile the tikz image. – M.Reza Jul 1 '14 at 5:44

You can restrict the application of external/mode to the current "scope". In TeX, a "scope" is a group, and a group is (typically) defined by curly braces:

\tikzset{external/mode=graphics if exists}%

The group can be as huge as needed, but the braces need to be balanced. The comment characters suppress spurious spaces and should be added as in the example.

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.