bugGNU Octave - Bugs: bug #46517, Missing $ inserted for...

 
 

bug #46517: Missing $ inserted for pdflatexstandalone

Submitted by:  ederag <ederag>
Submitted on:  Tue 24 Nov 2015 07:38:17 PM UTC  
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Mon 21 Dec 2015 06:29:51 PM UTC, comment #9: 

Thanks Rik. I noticed the patch didn't include the "eepic" terminal and pushed a change fixing that.

http://hg.savannah.gnu.org/hgweb/octave/rev/3894a672799e

Ben Abbott <bpabbott>
Project Member
Mon 21 Dec 2015 04:31:33 PM UTC, comment #8: 

I committed the patch here (http://hg.savannah.gnu.org/hgweb/octave/rev/249a4659dfa5).  I did one small edit which was to pull the reference to the bug number from the bug tracker in to the first line of the commit message.  The convention is that it be in the first line so that you can use grep to easily find all changesets that are associated with a given bug report.

Rik <rik5>
Project Administrator
Sat 19 Dec 2015 02:02:47 AM UTC, comment #7: 

I'm attaching a changeset with some minor editing.

(file #35794)

Ben Abbott <bpabbott>
Project Member
Sat 19 Dec 2015 02:01:13 AM UTC, comment #6: 

Regarding #44187, I think this change may be contributed prior to that one without triggering any problems.

Ben Abbott <bpabbott>
Project Member
Sat 19 Dec 2015 01:03:08 AM UTC, comment #5: 

Opps. I see I mixed up the "++" / "--" parts and that "pdflatex" is implicitly included. What about "pstricks"?

Ben Abbott <bpabbott>
Project Member
Thu 17 Dec 2015 11:15:25 PM UTC, comment #4: 

@Ederag,

The patch doesn't include pdflatex, Is that intentional?

diff -r c4cbc41fb208 -r e270423953ee scripts/plot/util/private/__gnuplot_draw_axes__.m
--- a/scripts/plot/util/private/__gnuplot_draw_axes__.m        Sun Nov 22 15:51:12 2015 +0100
+++ b/scripts/plot/util/private/__gnuplot_draw_axes__.m        Tue Nov 24 20:04:08 2015 +0100
@@ -2163,7 +2163,7 @@
   endif
   if (strcmp (scale, "log"))
     num_mtics = 10;
-    if (any (strcmp (gnuplot_term, {"tikz", "pstex", "pslatex", "epslatex"})))
+    if (strcmp (gnuplot_term, "tikz") || strfind(gnuplot_term, "tex"))
       fmt = "$10^{%T}$";
     else
       fmt = "10^{%T}";

Ben Abbott <bpabbott>
Project Member
Wed 25 Nov 2015 04:16:24 PM UTC, comment #3: 

I linked this bug to to #44187 so that when that patch is committed this one can too.

Rik <rik5>
Project Administrator
Wed 25 Nov 2015 08:51:51 AM UTC, comment #2: 

This has been added by Dan's patch: file #34657, in bug #44187
(in _gnuplot_has_terminal_, pdflatex is changed to cairolatex)

To be complete, my patches to the size problems (bug #46292) have also been applied, but they are not interfering there.

I did check the list of all terminals in the gnuplot user manual,
http://www.gnuplot.info/docs_5.0/gnuplot.pdf
p.13
that all names containing "tex" are indeed related to TeX.
So the patch proposed should be good.

ederag <ederag>
Tue 24 Nov 2015 11:07:22 PM UTC, comment #1: 

I can't even use the 'pdflatexstandalone' device with gnuplot.  See below:

octave:1> graphics_toolkit("gnuplot")
octave:2> plot(1:100)
octave:3> set(gca, "yscale", "log")
octave:4> print -dpdflatexstandalone try.tex
error: print.m: PDFLATEXSTANDALONE output is not available for the Gnuplot graphics toolkit

This was with cset 20748:bb219f1d92db "Fix indexing error in cset 69aeef6736df".

Rik <rik5>
Project Administrator
Tue 24 Nov 2015 07:38:17 PM UTC, original submission:  

graphics_toolkit("gnuplot")
plot(1:100)
set(gca, "yscale", "log")
print -dpdflatexstandalone try.tex
system("pdflatex -interaction=nonstopmode try.tex")

=> plenty of
! Missing $ inserted.
...

The patch attached fixes this (should work for all tex terminals, hopefully)

ederag <ederag>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #35794:  changeset.patch added by bpabbott (1KiB - application/octet-stream)
file #35537:  octave-4.1.0+_pdflatex_logscale.hg.diff added by ederag (836B - text/x-patch - add $ signs around 10^{%T} for all tex terminals)

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by ederag (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-12-21 bpabbott Operating SystemGNU/Linux => Any
    2015-12-21 rik5 Open/ClosedOpen => Closed
    2015-12-21 rik5 StatusPatch Submitted => Fixed
    2015-12-19 bpabbott StatusNeed Info => Patch Submitted
    2015-12-19 bpabbott Attached File- => Added changeset.patch, #35794
    2015-11-25 rik5 Dependencies- => Depends on bugs #44187
    2015-11-24 rik5 StatusNone => Need Info
    2015-11-24 ederag Attached File- => Added octave-4.1.0+_pdflatex_logscale.hg.diff, #35537

    Back to the top


    Powered by Savane 3.5