larskotthoff / gnuplottex

Gnuplot graphs in LaTeX. See http://www.ctan.org/pkg/gnuplottex
3 stars 1 forks source link

TikZ externalize | Error handling #4

Closed fostermaier closed 8 years ago

fostermaier commented 8 years ago

The recent implementation does not allow non-gnuplot TikZ pictures to be inserted. Apparently, externally generated and inserted TikZ graphs do not feature a \jobname.gnuploterrors file which results in an exception when calling \CatchFile at \AtEndDocument. Commenting the respective lines (bypassing the check for \jobname.gnuploterrors) resolves the issue, as expected. This, however, deactivates any error handling in general. Maybe a conditional error handler could be implemented for gnuplottex jobs only.

suggestion:

\AtEndDocument{% \ifmiktex \else +\IfFileExists{\jobname.gnuploterrors}{ \CatchFileDef\gnuploterrors@{\jobname.gnuploterrors}{\endlinechar=^^J \catcode\ =12 }% \expandafter\gnuploterrors@eatpar\gnuploterrors@\@nil \ifx\gnuploterrors@\@empty\else \PackageWarningNoLine{gnuplottex}{Gnuplot execution produced errors:^^J% \detokenize\expandafter{\gnuploterrors@}}% \fi +}{} \fi }

larskotthoff commented 8 years ago

Thanks for your report. Can you give me some more detail on your setup please? In particular OS, TeX version.

fostermaier commented 8 years ago

OS: Debian 4.6.3-1 (2016-07-04) TeX: TeX Live 2016.20160623-1 gnuplottex: 2015/12/13 v0.9.1

main document compiled using XeTeX, version 3.14159265-2.6-0.99996 tikz externalized on LuaTeX, Version 0.95.0

larskotthoff commented 8 years ago

Thanks, I'll have a look as soon as possible.

larskotthoff commented 8 years ago

This should be fixed in the new version, which I've just uploaded to CTAN. It should be available shortly.