bugGNU Octave - Bugs: bug #36349, print -dpflatex with empty...

 
 

bug #36349: print -dpflatex with empty \includegraphics{}

Submitted by:  Ben Abbott <bpabbott>
Submitted on:  Mon 30 Apr 2012 11:39:22 AM UTC  
 
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Ben Abbott <bpabbott>
Originator Name: Jose ValletOpen/Closed: Closed
Release: devOperating 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 Jump to the original submission)

Fri 19 Jul 2013 03:30:40 PM UTC, comment #8:

No reports of problems, so I'm closing this report.

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Sat 08 Jun 2013 03:29:01 AM UTC, comment #7:

I added some checks when extracting the graphic file name and pushed the changeset below.

http://hg.savannah.gnu.org/hgweb/octave/rev/3806afcf974a

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Fri 07 Jun 2013 01:53:06 PM UTC, comment #6:

I'm attaching a second changeset all in c++. The approach is clumsy.

The fltk toolkit calls drawnow() twice. Once for the image file to be included and a second time for the tex file. A static variable has been added to store the prior file name. When the tex file is written the prior file is assumed to be the image file to be included in the tex document.

(file #28280)

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Thu 06 Jun 2013 08:51:27 AM UTC, comment #5:

Assuming the print command is,

The diff below needs to have "gl2ps-inc" replaced with "test-inc".

I haven't figured out how to do this yet. Help from someone who is familiar with c/c++ would be appreciated.

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Thu 06 Jun 2013 08:44:03 AM UTC, comment #4:

A proper fix requires the "gl2ps-inc" to be replaced by the equivalent of print_cmd.c_str + "-inc".

My c/c++ knowledge is too low for me to figure this part out :-(

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Tue 01 May 2012 11:17:11 PM UTC, comment #3:

I've attached a changeset that works for me.

(file #25766)

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Tue 01 May 2012 12:12:26 AM UTC, comment #2:

I don't see how to properly fix this, but can easily produce a changeset that does a search-and-replace in the tex-file that is equivalent to

s/includegraphics{} /includegraphics{foo-inc.pdf} /g

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Mon 30 Apr 2012 12:41:19 PM UTC, comment #1:

I think the problem is that the gl2psPrintTeXHeader routine in gl2ps.c does not extract the "name" correctly. It is always empty.

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Mon 30 Apr 2012 11:39:22 AM UTC, original submission:

There is a problem when saving a figure using the pdflatex device (with fltk backend, as gnuplot does not support it, and octave 3.6.1).

Do:

This will produce two files:foo.tex and foo-inc.pdf. As I understand it, foo.tex should contain a reference to foo-inc.pdf, and there is not such a reference. There is, however, a suspicious empty "\includegraphics{}" inside a picture environment.

When using foo.tex as it is in a latex document there is an error complaining about this empty includegraphics. Changing it manually to "\includegraphics{foo-inc.pdf}" solves the problem.

Ben Abbott <bpabbott>
Project MemberIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #28280:  changeset.patch added by bpabbott (3KiB - application/octet-stream)
file #25766:  changeset.patch added by bpabbott (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bpabbott (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 20 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 01 Aug 2013 11:50:44 AM UTCbpabbottStatusReady For Test=>Fixed
      Summaryprint -dpflatex with empty \\includegraphics{} =>print -dpflatex with empty \includegraphics{}
    Fri 19 Jul 2013 03:30:40 PM UTCbpabbottOpen/ClosedOpen=>Closed
      Summaryprint -dpflatex with empty \\includegraphics{} =>print -dpflatex with empty \includegraphics{}
    Sat 08 Jun 2013 03:29:01 AM UTCbpabbottStatusPatch Submitted=>Ready For Test
      Summaryprint -dpflatex with empty \\includegraphics{} =>print -dpflatex with empty \includegraphics{}
    Fri 07 Jun 2013 01:53:06 PM UTCbpabbottAttached File-=>Added changeset.patch, #28280
      Release3.6.1=>dev
      Summaryprint -dpflatex with empty \\includegraphics{} =>print -dpflatex with empty \includegraphics{}
    Thu 06 Jun 2013 08:51:27 AM UTCbpabbottSummaryprint -dpflatex with empty \\includegraphics{} =>print -dpflatex with empty \includegraphics{}
    Thu 06 Jun 2013 08:44:03 AM UTCbpabbottSummaryprint -dpflatex with empty \\includegraphics{} =>print -dpflatex with empty \includegraphics{}
    Thu 03 May 2012 12:32:18 AM UTCbpabbottStatusReady For Test=>Patch Submitted
      Summaryprint -dpflatex with empty \\includegraphics{} =>print -dpflatex with empty \includegraphics{}
    Thu 03 May 2012 12:22:10 AM UTCbpabbottAssigned toNone=>bpabbott
      Summaryprint -dpflatex with empty \\includegraphics{} =>print -dpflatex with empty \includegraphics{}
    Tue 01 May 2012 11:17:11 PM UTCbpabbottAttached File-=>Added changeset.patch, #25766
      StatusNone=>Ready For Test
      Summaryprint -dpflatex with empty \\includegraphics{} =>print -dpflatex with empty \includegraphics{}
    Tue 01 May 2012 12:12:26 AM UTCbpabbottSummaryprint -dpflatex with empty \\includegraphics{} =>print -dpflatex with empty \includegraphics{}
    Mon 30 Apr 2012 12:41:19 PM UTCbpabbottSummaryprint -dpflatex with empty \\includegraphics{} =>print -dpflatex with empty \includegraphics{}

    Back to the top


    Powered by Savane 3.1-cleanup1