Search found 8 matches

by janklug
2014-05-15 04:48:23
Forum: Nisus Writer Pro Macros
Topic: extract image information and insert into text
Replies: 7
Views: 14602

Re: extract image information and insert into text

Dear Philip, thank you so much for your enlightening help! here's the final script that works very well: $doc = Document.active Select Document Start While Find Next '\[s*(.+?)\s*\]IMG\(s*(.+?)\s*\)', 'E$'    Delete    $path = $2    $image = Image.newFromFileAtPath $path    Image.insertInlineImage $...
by janklug
2014-05-13 10:47:39
Forum: Nisus Writer Pro Macros
Topic: extract image information and insert into text
Replies: 7
Views: 14602

Re: extract image information and insert into text

ha, thanks a lot! I'm almost there... I extended this a bit to include the styles: $doc = Document.active Select Document Start $imageStyle = $doc.styleWithName 'Image' $captionStyle = $doc.styleWithName 'Caption' While Find Next '\[s*(.+?)\s*\]IMG\(s*(.+?)\s*\)', 'E$'    Delete    $path = $2    $im...
by janklug
2014-05-13 10:43:24
Forum: Nisus Writer Pro Macros
Topic: transforming paragraph style to pagebreak
Replies: 6
Views: 13115

Re: transforming paragraph style to pagebreak

fantastic, that works!
a bit strange is that still Horizontal Lines are there after the Macro did its thing, but that was easily solved by changing the 'Horizontal Line' style to a style without a horizontal line ;)

Thanks a lot,

Jan
by janklug
2014-05-12 14:43:30
Forum: Nisus Writer Pro Macros
Topic: transforming paragraph style to pagebreak
Replies: 6
Views: 13115

Re: transforming paragraph style to pagebreak

thank for the quick reply! indeed I run into problems (although it's great to be able do do this; didn't expect that Nisus can do so many tricks!). Problem seems to be that if I apply the 'Horizontal Style" to the search string, it is also applied to the replace string, which means that it plac...
by janklug
2014-05-12 11:21:46
Forum: Nisus Writer Pro Macros
Topic: extract image information and insert into text
Replies: 7
Views: 14602

Re: extract image information and insert into text

Thanks! I still have to absorb A a bit I guess (and see in the examples how things connect)... The macro I had already tried (including trying to understand it ;) ). In the previous way that I referenced images in Scrivener it worked well: ![My boxed image][image] [image]: /imagetester/images/DD3.pn...
by janklug
2014-05-12 11:06:23
Forum: Nisus Writer Pro Macros
Topic: transforming paragraph style to pagebreak
Replies: 6
Views: 13115

Re: transforming paragraph style to pagebreak

Thanks a lot! The find-and-replace works well; the macrioze-version unfortunately not. This is what I get from the 'copy to clipboard' macroization: Find and Replace '(End of Paragraph)', '(Page Break)', 'eauU' The 'Horizontal Line' attribute is somehow not included, so all 'end of paragraph's are r...
by janklug
2014-05-11 04:02:39
Forum: Nisus Writer Pro Macros
Topic: extract image information and insert into text
Replies: 7
Views: 14602

extract image information and insert into text

Hello, in my current workflow (writing in Scrivener with MultiMarkdown formatting; exporting as .fodt to keep all the style information intact; importing into Nisus Writer Pro), I encountered a problem with images. For MMD, the image info is included in the source file like this: ![image caption tex...
by janklug
2014-05-11 03:36:39
Forum: Nisus Writer Pro Macros
Topic: transforming paragraph style to pagebreak
Replies: 6
Views: 13115

transforming paragraph style to pagebreak

Hey, I'm having some problems with my workflow: writing in Scrivener, exporting as .fodt, finishing up in Nisus Writer Pro. One of the issues is that pagebreaks in Scrivener are translated to a paragraph style containing a horizontal line in Nisus Writer (happens because the .fodt export assumes tha...