Statalist


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

st: RE: Quoted quotes


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Quoted quotes
Date   Mon, 5 Oct 2009 15:01:38 +0100

sysuse auto 

scatter mpg weight, ti(`"A "good" graph"') note(`"scatter mpg weight,
title(A "good" graph)"')

works fine for me in Stata 10 and 11. 

Nick 
n.j.cox@durham.ac.uk 

Allan Reese (Cefas)

This may be trivial but I can't find it in help or manuals.  (Using v10
still), how can I include a quote character in the string of an
added-text on a graph?

The context is that having created a graph command that seems good, an
easy way to record the event is to highlight the command and copy it
inside a note:

scatter y x, ti(Record this) note("scatter y x, ti(Record this)" )

But if the command already includes a quoted string, the note matches
each quote to the preceding one, and doesn't nest them; they turn into
line breaks. It doesn't like Stata's compound quotes `".."' and my only
workaround so far is to replace each quote in the string with
`=char(147)' .. `=char(148)' which seems rather overkill. [147 and 148
actually print the same but might not always.]


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index