TeX parse error: syntax error with command "title"

If I try use the “__” in part of title text it gives parse syntax error…

octave:46> title("__")
TeX parse error: syntax error

The default interpreter for text objects is "tex".
See: Text Properties (GNU Octave (version 6.3.0))

_” is a formatting character for TeX. If you don’t want to use that interpreter, turn it off:

title('__', 'interpreter', 'none')

Tks. I actually I tried to make case:

title('_', 'interpreter', 'none')

But the ‘_’ was used to show ‘underscore’ by the default parser…

I’ve no idea what you are trying to express…

Single underline. It works well now.
The Latex expression should not be used this case.

Below cases makes “parse error”:

>> legend('_', 'interpreter', 'none');
error: legend: no valid object to label
error: called from
    legend>parse_opts at line 762 column 7
    legend at line 206 column 8

But the command seems to be fully effective, even it gives these errors…

Do you have any objects in the axes to which the label could apply?

Yes. The plot was done 1st and the ‘title’-command interpreter settings works fine:

    title('_', 'interpreter', 'none');
    xlabel("Time [ms]");
    legend('_', 'interpreter', 'none');

but legend case, I may use something wrong syntax, etc.

Can you show a complete minimal example that reproduces the issue for you?

Let me see if I can do, but I’m sure the error comes from the 1st legend command:
legend('_', 'interpreter', 'none');

>> x=1:5
x =
   1   2   3   4   5
>> plot(x,x)
>> legend('_', 'interpreter', 'none')
TeX parse error: syntax error
TeX parse error: syntax error

Thanks for these steps to reproduce.
I can confirm seeing the (invalid) warnings.

Could you please open a bug report including these steps and a cross-reference to this thread on savannah?
GNU Octave - Bugs: Submit Item [Savannah]

I guess it would not work as this…
so i changed it to:
where “text” is text to be displayed, and it can not specify the “_” in this case, but all them must be set off.

Did you open a bug report? If you did, please post a link to it here.

I don’t know 100% if this is bug… it could be.

It is a bug. Please, open a bug report!

Link to bug report for cross-reference: bug #61311, When “_” used as legend text it gives parse error

@jarkky: It would have been nice if you had posted that link here after I asked you to…

2 posts were split to a new topic: Can I use the <, >, <=, and >= operators in a switch expression?

Also something happened, when I typed accidentally something wrong, like
sin(^), sin(#) and sin (%)…
especially with the two last cases…
Need check more.