|
From: Craig D. <def...@bo...> - 2014-01-21 03:06:41
|
Ah. Sorry, I completely misunderstood the nature of the double-quotes in question -- I assumed they were in some shell command. In the past (and earlier versions of gnuplot) I've had trouble on occasion using single quotes and just emitted double-quotes for everything.
Thanks for the clarification.
Cheers,
Craig
On Jan 20, 2014, at 6:33 PM, Ethan A Merritt <EAM...@gm...> wrote:
> On Monday, 20 January 2014 05:41:04 PM Craig DeForest wrote:
>> In enhanced-mode, escaped characters such as ampersand require not one escape but two.
>> For example, the string 'S\&P 500' renders as "S P 500" in a title.
>
> I think you will find that is not quite true.
> The single-quoted string you show will print as S&P 500.
> It would act as you show if the string were in double-quotes.
>
>> The string 'S\\&P 500' renders correctly. This is reproducible with pdf, eps, and all the cairo terminals.
>
> Again true for double-quotes but not for single-quotes.
>
>
>> I googled for the problem, and found this thread
>> ("http://comp.graphics.apps.gnuplot.narkive.com/GtFk5Tfg/ampersand-in-title")
>> from 8 years ago, complete with in-character comments from both Juergen and Ethan.
>> As far as I can tell, the behavior has been neither documented nor repaired in that time.
>
> It is documented under "help enhanced" and "help quotes".
> Those bits may have been added in response to that query 8 years ago.
> I don't recall.
>
>> Or is it now established behavior that instead needs to be documented?
>
> It is an integral part of the enhanced text processing.
> The same is true for all the special characters: & _ ^ @ ~
>
> The suggestions in that thread from 8 years ago are still valid.
> You have the options:
>
> - Turn off enhanced mode
> or
> - Use single quotes and a single backslash to escape each special character
> or
> - Use double quotes and two backslashes to escape each special character
> or
> - (kind of obscure but nonetheless "correct" if you are in a UTF-8 locale)
> use the character at unicode FF06 &
> instead of the one at unicode 0026 &
>
>> Is this something about which a patch would be welcome?
>
> A patch to do what, exactly?
> Maybe each of the enhanced text markup characters should
> have its own help index entry?
>
> Ethan
>
>
>> Cheers,
>> Craig
>>
>>
>> ------------------------------------------------------------------------------
>> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>> Learn Why More Businesses Are Choosing CenturyLink Cloud For
>> Critical Workloads, Development Environments & Everything In Between.
>> Get a Quote or Start a Free Trial Today.
>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
>> _______________________________________________
>> gnuplot-info mailing list
>> gnu...@li...
>> Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
>
|