check for \tikzexternalize directly

instead of \usepackage{tikz} and \usepackage{pgf}
This commit is contained in:
Brian Gough
2017-03-21 11:36:08 +00:00
parent 750576d1b0
commit 7ccc9500ed
2 changed files with 12 additions and 19 deletions

View File

@@ -21,11 +21,9 @@ module.exports = TikzManager =
return false
_includesTikz: (resource) ->
# check if we are loading tikz or pgf
content = resource.content.slice(0,4096)
if content.indexOf("\\usepackage{tikz") >= 0
return true
else if content.indexOf("\\usepackage{pgf") >= 0
# check if we are using tikz externalize
content = resource.content.slice(0,65536)
if content.indexOf("\\tikzexternalize") >= 0
return true
else
return false