-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Setup: Win7+TeXLive 2015 (tikzscale 0.2.6, pgfplots 1.13), TexStudio
Problem also described here by me:
and probably here
When using pgfplots in conjunction with tikzscale the tikz-files get recompiled every time when running pdflatex, although they should only get recompiled when the pdf-output-files are not there or the file changed.
I played around with the different "up to date check" and "mode" settings, nothing seems to help. If I include files with input instead of includegraphics, so the tikzscale package is not used, it works as expected, tikz-files do not get recompiled, if the output files already exist.
The recompilation needs a lot of time, so i would like to omit it. According to the tikzscale-documentation, tikzscale supports the TikZ’ externalization library.
The attaced MWE shows this behaviour. Test.tikz (included via includegraphics) is recompiled everytime, Test2.tikz only, if the output-pdf was deleted manually before.
MWE
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{pgfplots}
\usepackage{tikzscale}
\usepgfplotslibrary{external}
\tikzexternalize[prefix=tikzTest/]
\newlength\figureheight
\newlength\figurewidth
\begin{document}
\begin{figure}
\tikzsetnextfilename{test}
\includegraphics[width=0.75\textwidth]{tikzTest/test.tikz}
\end{figure}
\begin{figure}
\setlength\figureheight{0.75\textwidth}
\setlength\figurewidth{0.75\textwidth}
\tikzsetnextfilename{test2}
\input{tikzTest/test2.tikz}
\end{figure}
\end{document}
Test.tikz
\begin{tikzpicture}[%
trim axis left, trim axis right
]
\begin{axis}[%
separate axis lines,
every outer x axis line/.append style={black},
every x tick label/.append style={font=\color{black}},
xmin=0,
xmax=10,
every outer y axis line/.append style={black},
every y tick label/.append style={font=\color{black}},
ymin=0,
ymax=100
]
\addplot [color=black,solid,forget plot]
table[row sep=crcr]{%
0 0\\
1 1\\
2 4\\
3 9\\
4 16\\
5 25\\
6 36\\
7 49\\
8 64\\
9 81\\
10 100\\
};
\end{axis}
\end{tikzpicture}%
Test2.tikz
% This file was created by matlab2tikz.
% Minimal pgfplots version: 1.3
%
%The latest updates can be retrieved from
% http://www.mathworks.com/matlabcentral/fileexchange/22022-matlab2tikz
%where you can also make suggestions and rate matlab2tikz.
%
\begin{tikzpicture}
\begin{axis}[%
width=0.95092\figurewidth,
height=\figureheight,
at={(0\figurewidth,0\figureheight)},
scale only axis,
separate axis lines,
every outer x axis line/.append style={black},
every x tick label/.append style={font=\color{black}},
xmin=0,
xmax=10,
every outer y axis line/.append style={black},
every y tick label/.append style={font=\color{black}},
ymin=0,
ymax=100
]
\addplot [color=black,solid,forget plot]
table[row sep=crcr]{%
0 0\\
1 1\\
2 4\\
3 9\\
4 16\\
5 25\\
6 36\\
7 49\\
8 64\\
9 81\\
10 100\\
};
\end{axis}
\end{tikzpicture}%
[MWE.zip](https://github.com/MagicMuscleMan/tikzscale/files/122757/M