Any of the standard paragraph separators can be used (\n, \r, \r\n, Unicode 
paragraph separator). Use the Unicode line separator character to start a new 
line without a paragraph break. It is best to apply a paragraph style to an 
entire paragraph; if that is not done, then the paragraph style attribute will 
be automatically fixed at attribute fixing time so that it is constant over 
each paragraph range, because that is needed at layout time. 

Douglas Davidson 

On Dec 11, 2010, at 1:10 PM, Rob Nikander <rob.nikan...@gmail.com> wrote:

> Hi,
> 
> I first asked this question on stackoverflow, so I'll include the link:
> 
> http://stackoverflow.com/questions/4404286/how-is-a-paragraph-defined-in-an-nsattributedstring
> 
> Here is the copied text:
> 
> I see that there is an attribute name (NSParagraphStyleAttributeName)
> for applying paragraph styles to text in Cocoa. Text is stored in an
> NSAttributedString, but what defines a "paragraph" in that string --
> is it the newline character \n? Other characters? If it's a \n, then
> how do you create a new line without starting a new paragraph?  And
> lastly, when you attach a ParagraphStyle to the string, do you have to
> use the exact range of the whole paragraph, or can you put it on any
> sub-range in the paragraph. If it can be a sub-range, how does the
> system handle two or more ParagraphStyles on the same paragraph?
> 
> thanks,
> Rob
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/ddavidso%40apple.com
> 
> This email sent to ddavi...@apple.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to