bugGNU Octave - Bugs: bug #35916, Backslashes in TeX string: MATLAB...

 
 

bug #35916: Backslashes in TeX string: MATLAB incompatibility

Submitter:  Burkart Lingner <burkart>
Submitted:  Tue 20 Mar 2012 07:00:12 PM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  1 - Later Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.6.1 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 22 Nov 2013 01:36:12 AM UTC, comment #1: 

A TeX interpreter has been implemented for the FLTK toolkit and will be part of release 3.8.0. The behavior described in this bug report now works correctly. Closing report.

Mike Miller <mtmiller>
Group Member
Tue 20 Mar 2012 07:00:12 PM UTC, original submission:  

Octave handles backslashes in TeX string differently than MATLAB. The latter expects printable backslashes to be escaped as "\\" and prints an "unable to interpret TeX string" warning if it encounters a single backslash that does not start one of the known commands or character sequences. Octave, in comparison, treats any backslash that's not part of a command or character sequence as printable. This also results in a single printable MATLAB backslash "\\" to appear as two backslashes in Octave. Example:


axes
title('foo\\bar')


yields "foo\bar" in MATLAB but "foo\\bar" in Octave. On the other hand


axes
title('foo\bar')


yields "foo\bar" on both Octave and MATLAB. This is not a viable alternative for MATLAB, though. First of all it prints a warning and more importantly the discovery of an invalid TeX string makes MATLAB enter some sort of "panic mode" where it interprets the string as if it had interpreter=='none'.

Also note that backslash handling in Octave is currently somewhat inconsistent. For instance "\{" is interpreted as a printable opening brace and a single backslash as a single backslash. However, "\\{" yields "\\" instead of the expected "\{" (both of which are MATLAB incompatibilities). Another example would be the TeX string "\\alpha" which I'd expect to produce "\(a)" in Octave (but "\alpha" in MATLAB) when in fact it produces "{/Symbol a" and a warning about an ignored spurious "}". And "\ \alpha" doesn't produce "\ (a)" but omits the first backslash and yields "(a)".

To whom it may concern, this bug first came up in conjunction with https://github.com/nschloe/matlab2tikz/issues/71#issuecomment-4182220. You probably won't find additional relevant information there, though.

Burkart Lingner <burkart>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by jordigh (Updated the item)
  • -email is unavailable- added by burkart (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
    2013-11-22 mtmiller StatusDuplicate Fixed
        Open/ClosedOpen Closed
    2012-03-21 jordigh Priority5 - Normal 1 - Later
        Item GroupMatlab Compatibility Feature Request
        StatusNone Duplicate
    2012-03-21 jordigh Dependencies- Depends on bugs #35912

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code