bugGNU Octave - Bugs: bug #41715, Unable to print TeX labels to SVG...

 
 

bug #41715: Unable to print TeX labels to SVG format with gnuplot

Submitted by:  None
Submitted on:  Thu 27 Feb 2014 12:34:39 AM UTC  
 
Category: Plotting with gnuplotSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: ConfirmedAssigned to: None
Originator Name: Originator Email: -unavailable-
Open/Closed: OpenRelease: 3.8.0
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sat 29 Mar 2014 09:50:27 PM UTC, comment #2:

Confirmed in the development version as well. Updating the bug description to be a little more clear about the symptoms of this gnuplot-specific problem.

Printing TeX symbols to SVG with the fltk toolkit also fails but in a slightly different way, that might be a separate bug report.

Mike Miller <mtmiller>
Project Administrator
Sun 02 Mar 2014 09:10:41 PM UTC, comment #1:

Addendum:
The SVG standard was developed by the W3C, and uses the XML structure.
Because XML files can only contain one charset declaration, and because the Adobe Symbol font uses its own charset (Adobe-Symbol-Encoding, according to IANA), which is entirely incompatible with utf-8, the Symbol font cannot be used in SVG.

Anonymous
Thu 27 Feb 2014 12:34:39 AM UTC, original submission:

issue occurs when setting labels or legends with strings formatted in TeX.

internal function __go_draw_axes__ contains a subfunction __tex2enhanced__, which replaces named TeX special characters (such as \Gamma) with their equivalent in the gnuplot enhanced representation (such as {/Symbol G})

As this is passed to gnuplot, it is in effect told "please change the font to Symbol", which it obeys. Because SVG is an XML file to be handled by some external end device, as opposed to a raster, gnuplot does not draw the glyphs, and instead directs the end device to render the glyphs with a text tag and a font family class. But what gnuplot was told was "display the letter G in the Symbol font", rather than the greek letter Gamma.
So, when this SVG file is read by a device that has not been specially designed to handle Adobe's special encoding of this font, the resulting display is not what was intended.

We live in the Unicode Age now. The use of the Symbol font for mathematical characters is no longer necessary. The SVG files produced by gnuplot are defined with a character encoding of UTF-8 by default, so there is no need to use markup conventions that violate standards.

In summary, use Unicode instead of the Adobe Symbol font.
That should also solve your problem with

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by huntj
  • -unavailable- added by None (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 03 Nov 2014 01:22:17 PM UTCmtmillerDependencies-=>bugs #43498 is dependent
    Sat 29 Mar 2014 09:50:27 PM UTCmtmillerItem GroupInaccurate Result=>Incorrect Result
      StatusNone=>Confirmed
      SummaryEnhanced Plot labels, SVG terminal, XML deprecated use of Symbol font=>Unable to print TeX labels to SVG format with gnuplot
    Sat 15 Mar 2014 05:55:41 PM UTChuntjCarbon-Copy-=>Added huntj

    Back to the top


    Powered by Savane 3.1-cleanup1