Remove "Preserve Formatting" in Preferences [CONFIRMED]

So I was goofing around with the presets in the Formatting Preference pane just for giggles, and I found that if I selected a preset that included “preserve formatting,” e.g. the Essay Block Quote (Preserved), there appears to be no way to remove that “preserve formatting” box from the default Main Text Style pane–it, naturally enough, preserves it through all the other presets and the option is grayed out if you go to deselect it through the menu (Format>Formatting>Preserve Formatting).

Other than selecting a chunk of text from my project and hitting “use current,” is there a way to reset this?

Heh, whoops. It probably shouldn’t let you do that. I can think of no reason why anyone should want the Preserve Formatting attribute applied to everything by default. That is what Compile As-Is is for.

But yes, looks like selecting something “clean” and clicking Use Current is the only way out of that trap.

Heh. Nor could I, and actually I think that this explains a tech problem someone posted a few days ago, where they’d accidentally set preserve formatting and it was applying to new documents. I couldn’t figure out why new documents would pick it up…but I see it is possible to set that.

I don’t know if there’s anything to do about this, but I think what may be happening in some cases (like the above, potentially, and another case I’ve seen) is that people are attempting to define the presets via the Fomatting pane. I don’t know that it would necessarily be a good idea to remove the preset list from that pane entirely, even if it’s possible, but…I don’t know, I can’t really think of a case where someone would want to make a preset the default for all text. And if you did, you could do it by selecting the properly formatted text in the editor and using the “use current” option. It might be an extra step, but it might also save a lot of headaches for people misusing the preset list there–you’d have to be deliberate about it and know what you were doing, for one thing. But I don’t know, I rarely use presets anyway except for academic stuff, so I’m probably biased.

Moving this to bugs.

Keith, reproduction is:

  1. Open Preferences:Formatting
  2. In the condensed Format Bar, use the Presets menu to select any preset with Preserve Formatting attached to it; the default Essay Block Quote works fine
  3. Select another Preset at random; Preserve Formatting sticks.

Only way to clear it is to click the Use Current button. Also tested Use Current on a paragraph that has Preserve Formatting on it, but Scrivener rightly scrubs that out of the mix; so you might just need to apply the same filter to preset actions.

Before I do that, could you please take a look and see if there are any other formatting attributes that shouldn’t be allowed to be set as part of the preferences? Annotation and footnote, for instance - I don’t think these are prohibited either.

Oh, yeah, and asking you to do this and reply here is partly just because there’s no way of asking the forum to mark a post as “unread”, and I’m not on my development machine and am too lazy to e-mail myself right now. :slight_smile:

Selecting from the editor and applying via “use current”:

Highlight color, text color, revision text color all get set.

Tables don’t SEEM to get set actually, but the border appears in the text pane in the preferences–it just doesn’t seem to actually carry over to a new document.

The ruler settings of lists get set, but the bullets don’t.

Footnotes and annotations don’t save.

If you create presets with all the above and then apply via the preset, the results ultimately are the same but the text box in the preference pane will show the footnote and annotation bubble/box and background coloring, though they don’t actually “take.”

A few more results from Presets, unless otherwise stated:

I was able to get inline annotations and footnotes into the formatting window. The preset must have all properties saved into it, and it must be added with the preset drop-down in formatting, not with Use Current. As with Preserve Formatting, once you trigger this case it sticks no matter what. And yeah, I noticed tables are wonky too, they do end up as an actual table in the formatting preview area (if you right-click, you can add columns and other fun things), but they don’t propagate fortunately.

Table cells also come in via “Use Current” button.

I think text colour/revisions and highlights are fine to leave. Highlights is a bit weird, but text colour definitely for people that prefer to work in anything other than black on white.

Probably no good way around the ruler settings for lists, as that is technically valid information. At least the bullet doesn’t come in from either Use Current or Presets (lists don’t get saved in the latter, anyway).

While you are digging around in here, I noticed OpenType stuff doesn’t get saved. If you change ligatures, old figures, or other typographic features in the font palette, they don’t stick.

Anyway they can all be set in the format bar right there in the pane, so it doesn’t really make a difference.

Also, this is completely unrelated but it’s entertaining me–is there are method to your use of “colour” vs. “color”? I notice the manual has both and I haven’t decided if I think there’s a secret system behind it, or if it’s just the madness of British/American collaboration. But then I use “gray” and “grey” both for different things, because I happen to think “grey” is so much nicer looking…but things I don’t like are “gray.” I decided that at some point in elementary school when I first learned about spelling variations and I haven’t been able to shake it. :slight_smile:

I’m a mess when it comes to that, but I’ve attempted to stick with one standard for the manual so it isn’t terribly strange, and I’ve cut out some of my idiosyncratic fondnesses, such as the legacy spelling for “connexion”. So unless I made a mistake, the manual should all be British spellings except when addressing a specific piece of interface, which is all American English. So you’ll see such monstrosities as "To reset the colour of the index card background to default, click Use Default Color".

Incidentally, it spits up in console when you, in the Formatting preference pane, use a preset created from text linking to an inspector comment or footnote, and repeats this when you switch to another preset. Just using the preset normally within the editor doesn’t get this.

12/1/10 5:19:46 PM Scrivener[26042] HIToolbox: ignoring exception '*** -encodeObject:forKey: only defined for abstract class. Define -[NSArchiver encodeObject:forKey:]!' that raised inside Carbon event dispatch ( 0 CoreFoundation 0x949336ba __raiseError + 410 1 libobjc.A.dylib 0x93f28509 objc_exception_throw + 56 2 CoreFoundation 0x949333e8 +[NSException raise:format:arguments:] + 136 3 CoreFoundation 0x9493335a +[NSException raise:format:] + 58 4 Foundation 0x994ef0f3 NSRequestConcreteImplementation + 184 5 ScrAppKit 0x003dbc79 -[KBComment encodeWithCoder:] + 112 6 Foundation 0x99455281 _encodeObject_old + 258 7 Foundation 0x9944a53a -[NSDictionary(NSDictionary) encodeWithCoder:] + 255 8 Foundation 0x99455281 _encodeObject_old + 258 9 Foundation 0x994550cf -[NSArchiver encodeRootObject:] + 234 10 Foundation 0x99463b30 +[NSArchiver archivedDataWithRootObject:] + 171 11 Scrivener 0x0007cbe6 -[SCRPreferencesPanelController textDidChange:] + 173 12 Foundation 0x993ca4df _nsnote_callback + 176 13 CoreFoundation 0x948ba793 __CFXNotificationPost + 947 14 CoreFoundation 0x948ba19a _CFXNotificationPostNotification + 186 15 Foundation 0x993bf384 -[NSNotificationCenter postNotificationName:object:userInfo:] + 128 16 AppKit 0x92f7618d -[NSTextView(NSSharing) didChangeText] + 480 17 ScrAppKit 0x003a14bb -[KBStylesManager applyStyleToSelection:] + 1447 18 AppKit 0x92dc8c46 -[NSApplication sendAction:to:from:] + 112 19 AppKit 0x92dc8af9 -[NSMenuItem _corePerformAction] + 435 20 AppKit 0x92dc87eb -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 174 21 AppKit 0x92dc86da -[NSMenu performActionForItemAtIndex:] + 65 22 AppKit 0x92dc868d -[NSMenu _internalPerformActionForItemAtIndex:] + 50 23 AppKit 0x92dc85f3 -[NSMenuItem _internalPerformActionThroughMenuIfPossible] + 97 24 AppKit 0x92dc8537 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 336 25 AppKit 0x92dbcc61 NSSLMMenuEventHandler + 404 26 HIToolbox 0x90afaf2f _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1567 27 HIToolbox 0x90afa1f6 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411 28 HIToolbox 0x90b1c9bb SendEventToEventTarget + 52 29 HIToolbox 0x90b48fa7 _ZL18SendHICommandEventmPK9HICommandmmhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 448 30 HIToolbox 0x90b6dd1c SendMenuCommandWithContextAndModifiers + 66 31 HIToolbox 0x90b6dcd1 SendMenuItemSelectedEvent + 121 32 HIToolbox 0x90b6dbda _ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2_ + 152 33 HIToolbox 0x90cef342 _ZL19PopUpMenuSelectCoreP8MenuData5PointdS1_tjPK4RecttmS4_S4_PK10__CFStringPP13OpaqueMenuRefPt + 1851 34 HIToolbox 0x90cef699 _HandlePopUpMenuSelection7 + 678 35 AppKit 0x93052d2b _NSSLMPopUpCarbonMenu3 + 3938 36 AppKit 0x932482e2 -[NSPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 590 37 AppKit 0x92ea1c5f -[NSControl mouseDown:] + 812 38 AppKit 0x92e9fc68 -[NSWindow sendEvent:] + 5549 39 AppKit 0x92db8817 -[NSApplication sendEvent:] + 6431 40 Scrivener 0x00039f38 -[SCRApplication sendEvent:] + 412 41 AppKit 0x92d4c2a7 -[NSApplication run] + 917 42 AppKit 0x92d442d9 NSApplicationMain + 574 43 Scrivener 0x00002c65 _start + 208 44 Scrivener 0x00002b94 start + 40 45 ??? 0x00000002 0x0 + 2 )

Re: colour/color…Ah, yes. Alas.

This is a separate issue and one I can’t do anything about - Apple don’t seem to save this info in NSFont. I archive all of the formatting as passed to the text view.

Ah, yes. Comments can’t be encoded in that way, so they really should be disallowed there…

Okay, these are the attributes I’ll strip when using “Use Current” then:

• Scrivenings divider
• Preserve formatting
• Tables
• Bullets
• Annotation, footnote, inspector comments and footnotes (incl. links and tooltips)
• Links (Scrivener links or regular links of any kind)

(I know highlighting is a bit of a weird one, but I’ll leave it there.)