[oXygen-user] Autocorrect smart quotes in editor mode? Or only author mode?

Alex Jitianu alex_jitianu at sync.ro
Mon Oct 28 02:20:44 CDT 2013


Please see my answer below.

Best regards,

On 26-Oct-13 5:50 AM, Robert Nagle wrote:
> Hi, there, I was happy to notice that in version 15 you now have 
> Autocorrect Preferences for autocorrecting smart quotes.
> But I'm not sure how to use it properly.
> First, does this autocorrect option only work in Author Mode? When you 
> go in Author Mode, will it automatically change all existing quotes 
> appearing in rendered text (as opposed to elements) into smart quotes?
The feature is only available in author mode and only when typing in 
text content. When the user types a single or double quote it will be 
replaced automatically with a substitute (the smart quote). This smart 
quote support is disabled by default but can be enabled and configured 
from Preferences->Editor / Edit modes / Author / AutoCorrect. If a smart 
quote was inserted but you don't want one there you can just hit UNDO 
(Ctrl+Z) and it will be replaced with the standard quote.
> Second, a more basic question. Can I assume that whenever I am editing 
> an attribute of an element that this Autocorrect option will not 
> change it?
The support will not alter attribute values.
> Actually, a third question which is even more elementary. If I were to 
> do a global substitution which resulted in attribute quotes as having 
> smart quotes instead of normal quotes, would the parser still process 
> it normally?
The quotes that surround an attribute value must not be changed into 
smart quotes as the parser will not process such attributes. But I think 
that if you want to do such a global substitution there are ways you can 
stop that from happening. For example in Oxygen's "Find and Replace" 
dialog you can use an XPath to restrict the scope to text nodes : 
//text() . Then you can use Regular expressions to replace the quotes:
- the start quote. Text to find:  (\s)" and Replace with: $1\u201c
- the end quote.   Text to find: (\S)" and Replace with: $1\u201d
> I publish a lot of fiction by myself and others. I often do a lot of 
> writing and editing both in editor mode as well as author mode. (I 
> often don't notice what mode I am in).
I'll add a feature request to support the smart quote feature in text 
mode too.
> Thanks for your help.
> -- 
> Robert Nagle
> 6121 Winsome Ln #56C, Houston TX 77057-5581
> (H) 713 893 3424/ (W) 832-251-7522 Carbon Neutral Since Jan 2010
> http://www.robertnagle.info
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20131028/bd7eb149/attachment.html 

More information about the oXygen-user mailing list