larskotthoff / gnuplottex

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

Tex capacity exceeded happens when tics font is set #20

Closed adhefe closed 2 years ago

adhefe commented 2 years ago

This seems to be an issue: Setting tics font with,

\begin{gnuplottex}[terminal=tikz] ..... set tics font ",5" .... \end{gnuplottex}

causes pdflatex to failed with message: Tex capacity exceeded, sorry [input stack size=5000] .... no matter the chosen font size.

Further investigation shows that the "set tics font" command creates in the corresponding fig1.tex file the line,

\tikzset{every node/.append style={font={\fontsize{5.0pt}{6.0pt}\selectfont}}}

which is the cause for running out of capacity.

The workaround I've found was to set the font size by

{\fontsize{5.0pt}{6.0pt}\selectfont \begin{gnuplottex}[terminal=tikz] ... ... ;;; \end{gnuplottex} }

uhoefel commented 2 years ago

It's been a long time since I had these errors, but if I recall correctly, pdflatex can run into these capacity issues rather quickly, while lualatex doesn't have them. Is this in a document solely doing this one plot? Otherwise I would suggest switching to lualatex, which is anyway intended to be the successor of pdflatex as far as I know.

adhefe commented 2 years ago

Hi, thanks for replying,

Yes, just one single plot. I'm not a skillful gnuplot user. Anyway, I bet this problem is caused by the way gnuplottex implemented "set tics font" since my workaround did work well.

Just wanted to report a possible bug/issue

thanks again

larskotthoff commented 2 years ago

Thanks for reporting -- this seems to be an issue with the tikz code that gnuplot generates (the code in question is not generated by gnuplottex). I'm closing this here, but feel free to report to gnuplot.