Page 1 of 1
List styles when importing from Scrivener
Posted: 2008-08-25 20:18:21
by braver
When I export a Scrivener document either straight away as RTF, or prepare it as MultiMarkdown->RTF, my bulleted lists
• One
• Two
become
?. One
?. Two
...
-- how do I set up Nisus so those imports will automatically show the original bullets?
When I open it in TextEdit, the bullets are whatever I set in Scrivener. Is it a Nisus problem, and even if so, is there a way to instruct Nisus to import an RTF which opens immediately with the right bullets?
The problem of changing the styles in Nisus is that for every list, a new style is created, so editing the styles takes the time proportional to the number of lists, which may be too much! Or, in the worst case of no easy automatic import, is there a way to change all list styles to one predefined somehow with simple bullets?
Re: List styles when importing from Scrivener
Posted: 2008-08-25 21:04:39
by martin
The cause of this problem is actually a bug in Apple RTF's export, which I believe Scrivener makes use of. We filed the bug with Apple long ago but nothing has been fixed on their end. However, I was under the impression that Keith, the developer of Scrivener, had specifically make some
efforts to work around this problem. You might make sure you're using the latest version of Scrivener or contact him about the problem to see if there's anything to be done.
Or, in the worst case of no easy automatic import, is there a way to change all list styles to one predefined somehow with simple bullets?
Probably the easiest way to fix this by hand is:
1. Place the insertion point in a paragraph with the errant list style applied.
2. At the bottom right corner of the document window are the document tags. Click list style tag, eg: the little red "#" icon.
3. From the pop-up menu choose "Select All Range". Now all paragraphs marked in the list style are selected.
4. Apply whatever alternate list style you'd like.
5. Repeat steps 1-4 for all bad list styles.
If you don't mind running a macro, use this:
Code: Select all
$listStyleName = 'Bullet List'
$menuPath = ":Format:Lists:$listStyleName"
# ensure the list style exists
$exists = Menu Exists $menuPath
If ! $exists
Prompt "This document does not have a list style named '$listStyleName'."
Exit
End
# move to start of document
Set Selection 1, 0
# change all list paragraphs to use the style
While Select Next List Item
$isInStyle = Menu State $menuPath
If ! $isInStyle
Menu $menuPath
End
End
It converts all lists in the document to use the Bullet List style, which it assumes already exists.
Re: List styles when importing from Scrivener
Posted: 2008-08-25 22:30:19
by braver
Thanks, Martin! Interestingly, Mellel 2.5 imports the Scrivener's export with the original bullets intact, just as TextEdit does...
Re: List styles when importing from Scrivener
Posted: 2008-08-25 23:15:09
by martin
I don't know about Mellel, but it's entirely expected that TextEdit imports the document without error. Any product that uses Apple's RTF capabilities will open the file properly because the same errors made during export are also made during import, eg: Apple's RTF import and export are broken in the same way. However, if you open the file in Word you will have the problem you encounter in Nisus Writer. Actually, last time we tested this Word would display random characters for list bullets or even crash.
But all this testing with various applications aside, Apple's RTF export is simply wrong. There's an RTF specification out there and files that don't adhere to it can't be expected to open properly in all applications.
Re: List styles when importing from Scrivener
Posted: 2008-08-26 21:35:32
by braver
Agreed -- still when there's a workaround, what counts is what works -- Apple may be wrong, but "all our base belong to they!"

Re: List styles when importing from Scrivener
Posted: 2008-08-27 10:28:25
by martin
Ahh, well true enough! The problem is that once we see the file it's hard to know how the malformed list should look. There's nothing illegal about the list information Apple emits, it's just effectively useless.
That said, there may be some way for NWP to suss out what the document author intended from the bad RTF without compromising other properly configured lists. I know we looked into it once before, but the issue comes up often enough that perhaps it's time to revisit it.