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

 
 

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

Submitter:  None
Submitted:  Thu 27 Feb 2014 12:34:39 AM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Confirmed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group Member
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

        ## FIXME The symbol font doesn't seem to support bold or italic


Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by huntj
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-04-27 mtmiller Release3.8.0 dev
    2014-11-03 mtmiller Dependencies- bugs #43498 is dependent
    2014-03-29 mtmiller Item 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
    2014-03-15 huntj Carbon-Copy- Added huntj

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code