Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Smart Quotes (Read 2970 times)
David Bertenshaw
Full Member
*
Offline



Posts: 182

Smart Quotes
Aug 19th, 2014, 1:49pm
 
There are two different menu items for Smart Quotes in v6 and I was having a bit of difficulty working out which to use where. Mark B has explained the differences to me, and as it's not in the Help file (yet), I thought it might be useful to record the distinction here in case anybody else is interested.

A. To set whether Smart Quotes will be on or off by default for new notes, go to Edit > Document Settings (cmd-8) > Text and tick or unstick Smart Quotes accordingly.

B. You can also set the default for notes of a prototype by setting $SmartQuotes in the prototype.

C. If you're editing a particular note and want to change the Smart Quote setting for that note, and want the setting to persist for the next time you visit the text, then choose Text > Format > Smart Quotes. This has the same effect as setting the notes $SmartQuotes attribute, but it takes effect immediately on the next quotation mark you enter. (Setting $SmartQuotes directly only takes effect the next time you visit the note.)

D. If you just want to override the note's Smart Quote setting temporarily until you stop editing the note (e.g. to enter a dumb quote or two in the middle of a sea of smart quotes), but don't want to change the note's default setting permanently, then use Edit > Substitutions > Smart Quotes. (This is the same setting you'll see in the Edit > Substitutions > Smart Quotes dialogue box.) The next time you visit the note, it will revert back to the $SmartQuotes setting.

No doubt this is all blindingly obvious to everybody else, but at least it's documented now for when I forget...
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Smart Quotes
Reply #1 - Aug 19th, 2014, 6:21pm
 
Thanks. This has been confusing me no end and has just removed an item from my need-to-test-this list!
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
David Bertenshaw
Full Member
*
Offline



Posts: 182

Re: Smart Quotes
Reply #2 - Aug 20th, 2014, 3:08am
 
Glad it's not just me then! I understand the Help file is a work in progress, and I'm sure there'll be an item on it in there in due course.

I've suggested that it would be helpful to rename the two menu items slightly as well (Smart Quotes (temp) / Smart Quotes (persistent) perhaps, although I'm sure there are better wordings). Not only would it give a hint as to what each does, but of course it would also allow both functions to be used with shortcuts.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Smart Quotes
Reply #3 - Aug 20th, 2014, 3:22am
 
As we've no longer any app settings, using a custom config.xml file is probably the route to do the correctly set the users choice of default prefs. For instance, I prefer smart quotes and outline darken colours off before I start work on a file. However, I've yet to figure the syntax for these settings.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
David Bertenshaw
Full Member
*
Offline



Posts: 182

Re: Smart Quotes
Reply #4 - Aug 20th, 2014, 3:49am
 
I came across the issue because I was trying to adapt the Send2Devon code note / stamp process (excellent work by Sumner Gerard!) to work with your very helpful 'quotify', so I was doing a lot of hopping round between smart and dumb quotes.

BTW, I noticed that quotify doesn't like more 'complicated' characters (em and en dashes, ellipses etc). I don't really understand sed, but from the look of your code it's a series of vim style regexp substitutions.

I've tried adding another clause,

sed "s::---:g"

but it's not working (it changes the to which is what your code does unaltered.) Do you have any pointers as to what I should do, please?

Thanks.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Smart Quotes
Reply #5 - Aug 20th, 2014, 5:28am
 
You've hit another substitution issue - this one with less fine control: Edit -> Substitutions -> smart dashes. I don't think there are any settings/attribute controls for this. There probably need to be. I too have been caught by this. Doing queries is hard is TB is messing with one's $Text and you can't control those changes.

I'd agree the overall substitutions area needs some documentation - even if only in terms of design intent. IOW, in what contexts should we expect TB to silently alter our $Text and how do we securely turn off those features if unwanted.

I hope I'll cover this in the next aTbRef but I won't be able to start on that until the Autumn, after I finish my current MSc course.
Back to top
 
« Last Edit: Aug 20th, 2014, 5:29am by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
David Bertenshaw
Full Member
*
Offline



Posts: 182

Re: Smart Quotes
Reply #6 - Aug 20th, 2014, 6:35am
 
Thanks Mark.

What I've done for the time being is to add a couple of lines to the stamp which calls quotify.

Code:
if($Quotified=false){$Name=$Name.replace("","---");$Name=$Name.replace("","--");$Name = runCommand($Text(quotify),$Name);$Quotified=true} 



It's ugly and it probably makes proper coders cry, but it seems to work, with the odd exception that is easy enough to catch.
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print