patchGNU Octave - Patches: patch #9129, wish: rewrite __tex2enhanced__()...


patch #9129: wish: rewrite __tex2enhanced__() of __gnuplot_draw_axes__.m to add color processing

Submitted by:  Dan Sebald <sebald>
Submitted on:  Sun 02 Oct 2016 08:50:01 PM UTC  
Category:  Core : other Priority:  1 - Later
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Add a New Comment(Rich Markup)

You are not logged in

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


Sun 02 Oct 2016 08:50:01 PM UTC, original submission:

Currently gnuplot toolkit doesn't handle the "\color" TeX keyword to change color of individual items within a string. However, it is possible to mimic such a thing in a roundabout way. gnuplot enhanced text has a space command for which a string will not be displayed, but the point position advanced. For example &{string so wide} will leave a blank space that "string so wide" would occupy. With such a feature, it is possible to break a string into a series of strings. Say that we want "Bold and Italic markup" to have "Bold" in red and "Italic" in green. We could do it as follows:

So, in theory, the _tex2enhanced_() routine could return a cell of strings along with color RGBs that can be used to create the associated gnuplot label code.

Trying to do such a thing, I looked at the _tex2enhanced_() code and began to wonder if it couldn't be done easier with a recursive routine. For example, currently there is a first pass to process the TeX codes, then a second pass to inject "@" for alignment. Perhaps it might be easier if _tex2enhanced_() called itself when it finds another opening bracket. Seems it should be, in my experience.

So the patch would be to redo _tex2enhanced_ for more simplicity and general handling of embedded \code{\code{\code{}}} sorts of syntax. At the same time, create a series of strings for each color change.

Dan Sebald <sebald>


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by sebald (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.4