Page 1 of 1

How to apply "pure" Style Sheet to a paragraph?

Posted: 20 Feb 2015, 06:37
by Jean-Marie Schwartz
Hi All! Everything's in the Subject.
If I simply set style sheet to "Normal" then some formattings are kept (the typical + sign aside the style sheet name in the palette). So I could set every properties to default but wondered if there is another way. For instance how to apply "no style" so I can apply "Normal" purely afterwards?

Re: How to apply "pure" Style Sheet to a paragraph?

Posted: 18 May 2015, 08:58
by medialog
This has changed from version to version ( because of paragraph styles and character styles).

You can try this:
1) Make a new style for the selected paragraph (while it is selected)
2) Choose this style for the selected paragraph
3) Select the 'original' style

... or
1) Make a new style
2) Duplicate the original style
3) Delete the original style, replace it with 'the new'
4) Delete 'the new', replace it with 'the duplicated'

(and maybe rename the style sheet to its original name)

Re: How to apply "pure" Style Sheet to a paragraph?

Posted: 19 May 2015, 04:32
by Jean-Marie Schwartz
Thanks for your reply. Just wondered if you noticed the AppleScript forum we are in?

Re: How to apply "pure" Style Sheet to a paragraph?

Posted: 19 May 2015, 06:38
by medialog
yes, you can do this by scripting (I don't have the syntax for style sheet.

Alternatively, you can try something like:
tell application "QuarkXPress"
activate
tell selection
set style of every word of every paragraph to {on styles:{bold}}
#set style of word 1 of every paragraph to {off styles:{italic, bold}}
# then do the the same with font, size, etc.
end tell
display dialog "done" with icon "100"
end tell

Re: How to apply "pure" Style Sheet to a paragraph?

Posted: 20 May 2015, 05:07
by pjanssen
Something like this:

Code: Select all

tell application "QuarkXPress"
	tell document 1
		tell story 1 of current box
			set style sheet of paragraph 1 to null
			set style sheet of paragraph 1 to "Normal"
		end tell
	end tell
end tell
Tested with QXP 9.5.4 on Mac 10.8.5

Re: How to apply "pure" Style Sheet to a paragraph?

Posted: 20 May 2015, 09:28
by Jean-Marie Schwartz
Oh great! I searched for the ID or wathever refering to "none" in the style sheets. Didn't think of using null. Thanks a bunch!

Re: How to apply "pure" Style Sheet to a paragraph?

Posted: 21 May 2015, 02:41
by pjanssen
Found out by using the get properties syntax :)

Re: How to apply "pure" Style Sheet to a paragraph?

Posted: 21 May 2015, 03:40
by Jean-Marie Schwartz
Clever! :) I stopped at Get every style specs :roll: