bugGNU Octave - Bugs: bug #56338, [wish] Automatically escape Latex...


bug #56338: [wish] Automatically escape Latex special character when using -pdflatex for printing

Submitted by:  vasiliy <vasiliy22>
Submitted on:  Fri 17 May 2019 10:25:45 AM UTC  
Category:  Plotting Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  GNU/Linux

Add a New Comment (Rich Markup)

You are not logged in

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


Sat 18 May 2019 07:00:35 PM UTC, comment #1: 

The responsibility for handling Latex special characters belongs to the programmer, rather than Octave.  "help print" for -pdflatex says.

The text that is written to
the LaTeX file contains the strings *exactly* as they
were specified in the plot.  If any special characters of
the TeX mode interpreter were used, the file must be
edited before LaTeX processing.  Specifically, the
special characters must be enclosed with dollar signs
('$ ... $'), and other characters that are recognized by
LaTeX may also need editing (e.g., braces).

It might be possible to write some sort of script, in Octave or in a more text-oriented language like Perl, that uses regular expressions to automatically protect special characters.

This seems like a feature request.

Rik <rik5>
Project Administrator
Fri 17 May 2019 10:25:45 AM UTC, original submission:  

to reproduce:

a=[1 2];
print("test", "-dpdflatex");

results in a test.tex that cant be compiled by pdflatex. The reason ist, that the pie chart does not escape the % sign, when the labels on pie chart are constructing automatically

vasiliy <vasiliy22>


(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 rik5 (Posted a comment)
  • -email is unavailable- added by vasiliy22 (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 project members can vote.




    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-05-18 rik5 Severity3 - Normal => 1 - Wish
        Item GroupOther => Feature Request
        StatusNone => Confirmed
        Release5.1.0 => dev
        Summaryprinting the pie chart with -pdflatex does not escape the %-sign => [wish] Automatically escape Latex special character when using -pdflatex for printing

    Back to the top

    Powered by Savane 3.5