[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #35916] Backslashes in TeX string: MATLAB inco
From: |
Burkart Lingner |
Subject: |
[Octave-bug-tracker] [bug #35916] Backslashes in TeX string: MATLAB incompatibility |
Date: |
Tue, 20 Mar 2012 19:00:13 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:11.0) Gecko/20100101 Firefox/11.0 |
URL:
<http://savannah.gnu.org/bugs/?35916>
Summary: Backslashes in TeX string: MATLAB incompatibility
Project: GNU Octave
Submitted by: burkart
Submitted on: Tue 20 Mar 2012 07:00:12 PM GMT
Category: Plotting with gnuplot
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.6.1
Operating System: GNU/Linux
_______________________________________________________
Details:
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.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?35916>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #35916] Backslashes in TeX string: MATLAB incompatibility,
Burkart Lingner <=