help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ampersand in graphics text?


From: Ben Abbott
Subject: Re: Ampersand in graphics text?
Date: Thu, 20 Oct 2016 08:26:39 -0400

> On Oct 20, 2016, at 08:19, Vic Norton <address@hidden> wrote:
> 
> 
>>> On Oct 20, 2016, at 7:51 AM, Vic Norton <address@hidden> wrote:
>>> 
>>> On Oct 20, 2016, at 6:45 AM, Vic Norton <address@hidden> wrote:
>>> 
>>> I would like to write bold faced
>>> RWR & SCHH
>>> text in a figure, but it comes out as
>>> RWRSCHH
>>> with the instruction
>>> text(25, 18, "RWR & SCHH”, “fontsize”, 12, “fontweight”, “bold”);
>>> 
>>> How can I write an ampersand in an Octave figure?
>> 
>> 
>>> On Oct 20, 2016, at 7:07 AM, Nir Krakauer <address@hidden> wrote:
>>> 
>>> The & shows up for me (with Octave 4.0.3). ​Maybe you can try to add a 
>>> backslash: \&
>> 
>> I was running Homebrew’s Octave 4.2.0-rc2 on a Mac. Now I have upgraded to 
>> Octave 4.2.0-rc2_1. There is a slightly improvement in the upgrade:
>> text(25, 18, "RWR & SCHH”, “fontsize”, 12, “fontweight”, “bold”);
>> now shows up as
>> RWR SCHH
>> The " & “ is now interpreted as a single space. Backslash ampersand produces 
>> the same result.
> 
> Problem solved. I am using "graphics_toolkit gnuplot”. The gnuplot advice
>  To use the ampersand (&) symbol in labels in the
>  postscript terminal you need to escape it twice: \\&
> works for my version of octave. The line
>  text(25, 18, "RWR \\& SCHH”, “fontsize”, 12, “fontweight”, “bold”);
> reads the way I want it to.

Hmmm, any chance the "interpreter" is set to "tex". If so, does "none" resolve 
the behavior.

Ben


reply via email to

[Prev in Thread] Current Thread [Next in Thread]