|
From: Mojca M. <moj...@gm...> - 2014-11-08 08:04:14
|
On Sat, Nov 8, 2014 at 4:13 AM, Philipp K. Janert wrote:
>
> How much experience do people have with the Lua/Tikz
> terminal? I have been experimenting with it a bit,
> and I found some of the behavior bizarre (not to
> mention obscure).
This won't solve all of the problems, but you need to make sure that
you finish writing to a file before running TeX.
> Below is a log of various sessions. Three problems
> that I seem to have narrowed down: when I try to
> write successively to more than one file during one
> gnuplot session, the subsequent tex files do not
> compile. Tex stops at some point, waiting for input.
> (See session 2 below.)
Try compiling 't3.tex' again. I'm almost sure that it will work now.
Please check the contents of the file before compiling it. Either exit
gnuplot, change the terminal or run 'set o[utput]' before compiling
the tex file.
> When using arrows, gnuplot fails to create the proper
> lua script (which is bad), but when I then try to
> exit gnuplot, it gets completely wedged, continuously
> spewing messages about "Missing Lua context". One has
> to kill it from a separate shell. (Session 3)
>
> I can use arrows when I set the terminal option
> "gparrows". I tried this after seeing something
> about "misusing the angle value" in the doc. I am
> not sure, though, what the doc is really saying -
> what should I do if I want to use Lua/Tikz-arrows?
There must be some arrow-related bug somewhere. I suspect that the
number of people using both arrows and tikz could be small enough that
nobody noticed the problem so far.
> Finally, how do I include Tex constructs in text labels
Just like you would expect (except that you need to use proper quotes
or escapes, see below).
> (which, I assume, is the whole point). The documentation
> does not seem to be mention that at all. I tried the
> same syntax as in the epslatex terminal, namely simply
> including Tex code:
> set label "Hello $\int e^{-x}$" at 0,0
> but this only led to one of those tex files that
> don't compile. (Session 6)
Just because you didn't finish the file.
> At this point, I find it all rather obscure. I also
> wonder whether it is worthwhile trying to figure this
> out - what can this terminal do that none of the
> others can do? I searched the web a little and did
> not find much.
>
> Any experiences, insights, opinions?
>
> Best,
>
> Ph.
>
>
> SESSION TRANSCRIPTS FOLLOW
>
>
> SESSION 1
>
> plot sin(x)
> set t tikz standalone
> set o 't1.tex'
> replot
> set o
>
> shell> pdflatex t1.tex : OK
>
> ============================================================
> SESSION 2
>
> plot sin(x)
> set t tikz standalone
> set o 't2.tex'
> replot
> set o
> set o 't3.tex'
> replot
>
> shell> pdflatex t2.tex : OK
> shell> pdflatex t3.tex :
>
> Preview: Fontsize 10pt
> Preview: PDFoutput 1
>
> Overfull \hbox (10.65929pt too wide) in paragraph at lines 1083--1083
> [][]
> Preview: Tightpage 0 0 0 0
> [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}])
> *
You tried to compile unfinished file.
> ============================================================
> SESSION 3
>
> plot sin(x)
> set arrow from -5,-.4 to 2,.6
> set t tikz standalone
> set o 't4.tex'
> replot
> .../rc52/staging/share/gnuplot/5.0/lua/gnuplot-tikz.lua:346:
> attempt to concatenate local 'direction' (a nil value) stac
I get the same problem. This looks like a bug in gnuplot-tikz.lua.
> BUT THEN:
>
> I wish to quit gnuplot using ^D, but it doesn't terminate,
> instead it prints FOREVER (unstoppable, must close window):
Side effect of the lua script taking over everything and failing to do
the right thing.
> ============================================================
> SESSION 6
>
> plot sin(x)
> set label "Hello $\int e^{-x}$" at 0,0
You are making one mistake here. You should use either single quotes:
'Hello $\int e^{-x}$'
or you should escape the backslash.
Please check the output in the resulting tex file before you compile
to make sure that the label is correct.
> set t tikz standalone
> set o 't7.tex'
> replot
>
> shell> pdflatex t7.tex :
>
> Preview: Fontsize 10pt
> Preview: PDFoutput 1
>
> Overfull \hbox (10.65929pt too wide) in paragraph at lines 561--561
> [][]
> Preview: Tightpage 0 0 0 0
> [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}])
> *
I strongly suspect that you are experiencing the same problem as
elsewhere: you tried to compile unfinished file. The example works for
me (I tested with both gnuplot 4.6.6 as well as with 5.0.rc2).
Mojca
|