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.

I have a couple of pictures in my work so I started to build them extern in order to increase build speed. But I don't want to externalize all of them, I want a few little pictures to be build on-the-fly.

I found an interesting changelog on sourceforge (maybe the source code for a manual) where it says

how to disable the externalization partially with |\tikzset{external/|\declareandlabel{export}|=false}| or completely with |\tikzexternaldisable|,

but that didn' work for me. I activate externalization with

\tikzexternalize[prefix=figures/,figure list=true] 

so what kind of command could either externalize only flagged graphics or prevent flagged graphics from being externalized?

share|improve this question

1 Answer 1

up vote 18 down vote accepted

There are a couple of ways to turn on and off the externalisation stuff. To globally switch it off, use

\tikzexternaldisable

and then to turn it back on again,

\tikzexternalenable

An alternative way of doing that is to use

\tikzset{external/export=false}

and

\tikset{external/export=true}

These two methods use slightly different ways of disabling: the second is "lighter" than the first.

To disable externalisation for an individual picture, use

\tikzset{external/export next=false}

One thing to be ware of when enabling/disabling externalisation is that if you don't name the pictures explicitly then they are assigned names in numerical sequence. This means that if you put a new picture in the middle (or enable/disable externalisation for one in the middle) then all the following ones will be out of sequence. But TikZ won't know that so you have to tell it yourself (the easiest way is by deleting the relevant image files).

A quick experiment shows that if you want to externalise most but to switch it off for one or two, then use the \tikzset{external/export next=false} command just before.

If you want to externalise only one or two, then you need to switch it on just before and off again just after (using one of the two methods given above). It seems that if it is disabled using \tikzset{external/export=false} then it cannot be turned back on for a single picture using \tikzset{external/export next=true} (which would have been nice).

share|improve this answer
1  
The "To globally switch it off, use" is not technically correct, is it? \tikzexternaldisable is locally scoped, isn't it? –  Martin Scharrer May 3 '12 at 22:16

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.