note end paragraph

Get help using and writing Nisus Writer Pro macros.
User avatar
phspaelti
Posts: 1313
Joined: 2007-02-07 00:58:12
Location: Japan

Re: note end paragraph

Post by phspaelti »

Okay so here is another try. I removed the formatting of the macro (that I had added for readability). That formatting somehow caused the problem. As before you will have to replace that one line with the French equivalent (there must be a way around that, but I can think of it right now.)

Hopefully this one works.
msebban.nwm
(18.94 KiB) Downloaded 853 times
philip
msebban
Posts: 47
Joined: 2012-08-12 17:00:17

Re: note end paragraph

Post by msebban »

yeses the macros fine BUT when i want to add a new note after the macro had converted old manual note to real note, it open a new section and don't put the note in the same section of the others….
thank's for all but it seem still difficult,
User avatar
phspaelti
Posts: 1313
Joined: 2007-02-07 00:58:12
Location: Japan

Re: note end paragraph

Post by phspaelti »

So, I have to ask you how you are working: In the part where you will be inserting new notes is the main text already written? Both the Hebrew and the French? Or only the Hebrew? Or …?

The point is you will have to work like this:
  • If the paragraph where you want to insert a new note does not yet have a note, you must (1) insert a section break at the end of the paragraph, and then (2) insert the note
  • if the paragraph where you want to insert a new note already has a section break at the end, you should just insert a note
If the Hebrew/French text is already written, then for any paragraph where you want to insert a note, you will first need to locate the paragraph end marker and replace it with a section break.

So admittedly this a bit complicated. I will try to write a macro, that combines these steps into one, so that you could just have one insert new note command. But I have to go to bed now, so I'll try that tomorrow.
philip
User avatar
phspaelti
Posts: 1313
Joined: 2007-02-07 00:58:12
Location: Japan

Re: note end paragraph

Post by phspaelti »

Well I tried writing the macro anyhow.
Put it in the macro folder, adjust the Menu commands to the localization (there are two of them) and preferably give the macro a keyboard shortcut (for example command-option-E). Then you'll need just one keystroke to insert a new note.

Hope this helps
Insert New Note.nwm
(16.95 KiB) Downloaded 798 times
philip
msebban
Posts: 47
Joined: 2012-08-12 17:00:17

Re: note end paragraph

Post by msebban »

The macro make a section break and insert a note but i can't see the note himself


i'm so sorry for all the work you make for me and i adress you a million thank's
Attachments
capture 5774-02-06 à 04.09.47.png
capture 5774-02-06 à 04.09.47.png (11.63 KiB) Viewed 16532 times
msebban
Posts: 47
Joined: 2012-08-12 17:00:17

Re: note end paragraph

Post by msebban »

oupsss i forgot to put a end paragraph before running the macro, it goes perfect now
a lunch in paris, anytime…..
thank'sssss
User avatar
phspaelti
Posts: 1313
Joined: 2007-02-07 00:58:12
Location: Japan

Re: note end paragraph

Post by phspaelti »

msebban wrote:a lunch in paris, anytime…..
Sounds great!
Good luck with your writing
philip
msebban
Posts: 47
Joined: 2012-08-12 17:00:17

Re: note end paragraph

Post by msebban »

if you've got time, have allow to this document after running the macro. the first page is ok and the others no…..
thnk's
Attachments
3 Lekh Lekha.rtf
(65.41 KiB) Downloaded 754 times
User avatar
phspaelti
Posts: 1313
Joined: 2007-02-07 00:58:12
Location: Japan

Re: note end paragraph

Post by phspaelti »

Hello again,
yes that looks bad.
It looks to me like the problem is that starting with note 10, your hand-written notes do not have bold font applied to the note number. The macro that I wrote for you was actually using that bold as a crucial feature to determine where the notes are and which parts of your text to cut and move.

So how you (we?) proceed from here depends on how much work you have put into different versions of this file. (Are there more files?)

The simplest is to go back to the last version with only hand-written notes (and no section breaks). Then do a search for the notes. They should all be:
  • No longer than one paragraph
  • Have a number at the beginning of the paragraph, followed by a period and a space
  • Bold font applied to the number and the period
Check these conditions and fix them if necessary. Then run the macro, and check that the output is satisfactory.

If this strategy is not possible--for example because you already have made many changes, or some other reason--it would probably be necessary to find a more ad hoc solution. In that case it might be better to get in touch directly, and work how best to do that.

Best
philip
User avatar
phspaelti
Posts: 1313
Joined: 2007-02-07 00:58:12
Location: Japan

Re: note end paragraph

Post by phspaelti »

I just tried to write a macro that will work to fix the sample file you sent earlier. Here is the result of the fixing:
Lekha_3.rtf
(60.53 KiB) Downloaded 820 times
Here is the macro that I used to fix this case. In case you have more files like this you might try it. (Remember: Always keep back up copies ;-) )
msebban macro fix.nwm
(19.41 KiB) Downloaded 811 times
philip
msebban
Posts: 47
Joined: 2012-08-12 17:00:17

Re: note end paragraph

Post by msebban »

I'll try to have on my notes in bold
You're a genious
how can i be thankful to you….
Post Reply