bugGNU Octave - Bugs: bug #62668, TeX \color[rgb] not working. ...

 
 

bug #62668: TeX \color[rgb] not working. Gives syntax error.

Submitter:  None
Submitted:  Thu 23 Jun 2022 09:03:01 PM UTC
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 7.1.0
Operating System:  * Any
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

( Jump to the original submission )

Tue 05 Jul 2022 02:48:33 PM UTC, comment #9: 

Verified patch.  Marking bug as fixed and closing report.

Rik <rik5>
Project Administrator
Tue 28 Jun 2022 06:05:28 PM UTC, comment #8: 

Ok, I was able to push with my other machine. Marking ready for test.

Pantxo Diribarne <pantxo>
Project Member
Tue 28 Jun 2022 07:35:04 AM UTC, comment #7: 

@Markus: Sorry, I don't seem to be able to push from the machine I have access to. I updated my public ssh key on savannah to no avail. I'll try with my other machine later.

Pantxo Diribarne <pantxo>
Project Member
Sun 26 Jun 2022 10:15:04 AM UTC, comment #6: 

@Pantxo: Thanks for the quick fix. That change looks good to me. Please, push it to the stable branch if you come around to it.

Markus M├╝tzel <mmuetzel>
Project Member
Fri 24 Jun 2022 06:18:41 PM UTC, comment #5: 

agree, that looks like an inadvertant change.  would also recommend this getting pushed to stable before the 7.2 release.

Nicholas Jankowski <nrjank>
Project Member
Fri 24 Jun 2022 05:39:31 PM UTC, comment #4: 

The attached cset, meant for stable, fixes the issue for me.

(file #53378)

Pantxo Diribarne <pantxo>
Project Member
Fri 24 Jun 2022 04:49:14 PM UTC, comment #3: 

The regression is due to this cset:
http://hg.savannah.gnu.org/hgweb/octave/rev/fa65184b7c76

where "rgb" in a search pattern was mistakenly replaced by the name of a class member variable "m_rgb". The workaround, until this is fixed, is to replace "rgb" by "m_rgb", e.g.

text (0.5, 0.5, '\color[m_rgb]{0,0.5,0.5} text');

I think this could be fixed on stable so I changed the release to 7.1.

Pantxo Diribarne <pantxo>
Project Member
Thu 23 Jun 2022 09:15:54 PM UTC, comment #2: 

oops, sorry for missing the verbatim tag. marking as a regression since it worked in v6.4.0

also confirmed the same error occurs on the v8 default branch in linux, so updating categories.

Nicholas Jankowski <nrjank>
Project Member
Thu 23 Jun 2022 09:12:35 PM UTC, comment #1: 

Confirmed in 7.1.0 on windows.  the following works for me in Octave 6.4.0 on Windows:

plot([1:10],[1:10])
text (5, 5, '\color[rgb]{1 0 0}{Hello world}')
+verbatim+

line plot looks normal, and a red Hello world appears at the center.

in 7.1.0 on Windows, the terminal gives the 'Tex parse error: syntax error'

and the plot shows the text '\color[rgb]{1 0 0}{Hello world}' on the plot in black.

Nicholas Jankowski <nrjank>
Project Member
Thu 23 Jun 2022 09:03:01 PM UTC, original submission:  

According to Octave documentation (https://docs.octave.org/v7.1.0/tex-interpreter.html) and this (https://savannah.gnu.org/bugs/?47907#comment4) comment to bug 47907, Octave follows MATLAB TeX syntax.  See, https://www.mathworks.com/help/matlab/creating_plots/greek-letters-and-special-characters-in-graph-text.html

MATLAB syntax for specifying text color in RGB is not working.

This should work:

>> text (100, 100, '\color[rgb]{0,0.5,0.5} text');
>> TeX parse error: syntax error

But as the error shows, doesn't.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #53378:  bug62668.patch added by pantxo (778B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by nrjank (Posted a comment)
  • -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 project members can vote.

     

     

     

     

    Follow 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-07-05 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2022-06-28 pantxo StatusPatch Submitted Ready For Test
    2022-06-24 pantxo Attached File- Added bug62668.patch, #53378
        StatusIn Progress Patch Submitted
    2022-06-24 pantxo CategoryPlotting Plotting with OpenGL
        StatusConfirmed In Progress
        Releasedev 7.1.0
    2022-06-23 nrjank Item GroupUnexpected Error or Warning Regression
        Release7.1.0 dev
        Operating SystemMicrosoft Windows Any
    2022-06-23 nrjank StatusNone Confirmed

    Back to the top


    Powered by Savane 3.9