|
From: Ethan M. <eam...@gm...> - 2025-02-26 07:49:17
|
On Tuesday, 25 February 2025 23:10:07 PST Dmitry wrote:
> Hi Ethan,
>
> set term tikz standalone preamble "\\usepackage{derivative}"
>
> Does not work either, fails with the same error.
I don't know what to say. It works here.
Is it possible that your file /usr/share/gnuplot/6.1/lua/gnuplot-tikz.lua
is not current? It should be
pgf.REVISION = "120"
pgf.REVISION_DATE = "2024/10/14 16:17:00"
Although gnuplot_5.4 works for me also, and the lua file for that is from 2020.
So maybe corrupt rather than out of date?
I can't really think what else to check.
lua version? I've got Lua 5.4.4 Copyright (C) 1994-2022 Lua.org, PUC-Rio
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[~/temp] gnuplot
G N U P L O T
Version 6.1 last modified 2025-02-19
Copyright (C) 1986-1993, 1998, 2004, 2007-2025
Thomas Williams, Colin Kelley and many others
gnuplot home: http://www.gnuplot.info
mailing list: gnu...@li...
faq, bugs, etc: type "help FAQ"
immediate help: type "help" (plot window: hit 'h')
Terminal type is now qt
gnuplot> set term tikz standalone preamble "\\usepackage{derivative}"
Terminal type is now 'tikz'
Options are 'latex preamble "\\usepackage{derivative}" color standalone nogparrows notikzarrows nogppoints picenvironment nooriginreset bitmap rgbimage noclip notightboundingbox noexternalimages '
gnuplot> set output 'foo.tex'
gnuplot> plot sin(x)
gnuplot> quit
[~/temp] pdflatex foo
This is pdfTeX, Version 3.141592653-2.6-1.40.24 (TeX Live 2022/Mageia) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./foo.tex
[snip]
Output written on foo.pdf (1 page, 30414 bytes).
Transcript written on foo.log.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- Ethan
>
> $ gnuplot
>
> G N U P L O T
> Version 6.1.0 last modified 2025-02-19
>
> Copyright (C) 1986-1993, 1998, 2004, 2007-2025
> Thomas Williams, Colin Kelley and many others
>
> gnuplot home: http://www.gnuplot.info
> mailing list: gnu...@li...
> faq, bugs, etc: type "help FAQ"
> immediate help: type "help" (plot window: hit 'h')
>
> Terminal type is now qt
> gnuplot> set term tikz standalone preamble "\\usepackage{derivative}"
>
> Terminal type is now 'tikz'
> /usr/share/gnuplot/6.1/lua/gnuplot-tikz.lua:1773: bad argument
> #1 to 'load' (function expected, got string)
> stack traceb
>
> gnuplot> set term tikz standalone header "\\usepackage{derivative}"
>
> Terminal type is now 'tikz'
> /usr/share/gnuplot/6.1/lua/gnuplot-tikz.lua:1773: bad argument
> #1 to 'load' (function expected, got string)
> stack traceb
>
> gnuplot> set term cairolatex header "\\usepackage{derivative}"
>
> Terminal type is now 'cairolatex'
> Options are ' pdf input header "\usepackage{derivative}" blacktext
> nobackground noenhanced fontscale 0.6 size 5.00in, 3.00in '
> gnuplot>
>
>
>
>
> On 26.02.2025 02:43, Ethan Merritt wrote:
> > On Tuesday, 25 February 2025 02:15:22 PST Dmitry wrote:
> >> So, documentation says that we can add latex preamble with tikz terminal
> >> as *preamble "<preamble string>".*
> >>
> >> But this actually does not work, it fails with
> >>
> >> /usr/share/gnuplot/6.1/lua/gnuplot-tikz.lua:1773: bad argument #1 to
> >> 'load' (function expected, got string)
> >>
> >> Instead of *preamble "<preamble string>" *one should use *preamble
> >> '<preamble string>' *(single quotes vs double quotes).
> > Remember that inside double quotes backslash is an escape character,
> > so your command needs to be
> >
> > set term tikz standalone preamble "\\usepackage{derivative}"
> >
> > This has nothing to do with tikz. It is the usual difference between string
> > handling in single vs double quotes.
> >
> > Ethan
> >
> >
> >
> >
> >> I'm not sure if its bug or it's wrong documentation. Below I listed the
> >> full console output
> >>
> >> Thanks!
> >>
> >>
> >>> $ gnuplot
> >>>
> >>> G N U P L O T
> >>> Version 6.1.0 last modified 2025-02-19
> >>>
> >>> Copyright (C) 1986-1993, 1998, 2004, 2007-2025
> >>> Thomas Williams, Colin Kelley and many others
> >>>
> >>> gnuplot home: http://www.gnuplot.info
> >>> mailing list: gnu...@li...
> >>> faq, bugs, etc: type "help FAQ"
> >>> immediate help: type "help" (plot window: hit 'h')
> >>>
> >>> Terminal type is now qt
> >>> gnuplot> set terminal lua tikz standalone preamble
> >>> "\usepackage{derivative}"
> >>>
> >>> Terminal type is now 'lua'
> >>> /usr/share/gnuplot/6.1/lua/gnuplot-tikz.lua:1773: bad
> >>> argument #1 to 'load' (function expected, got string)
> >>> stack traceb
> >>>
> >>> gnuplot> set terminal lua tikz standalone preamble
> >>> '\usepackage{derivative}'
> >>>
> >>> Terminal type is now 'lua'
> >>> Options are 'latex preamble "\\usepackage{derivative}" color
> >>> standalone nogparrows notikzarrows nogppoints picenvironment
> >>> nooriginreset bitmap rgbimage noclip notightboundingbox noexternalimages '
> >>> gnuplot>
> >> _______________________________________________
> >> gnuplot-info mailing list
> >> gnu...@li...
> >> Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
> >>
> >
> >
> >
>
>
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
|