Reply to topic  [ 26 posts ]  Go to page 1, 2  Next
note end paragraph 
Author Message

Joined: 2012-08-12 17:00:17
Posts: 28
I would like to have note after every paragraph. how can i write a macro for that and configurate the numbering of these notes or by page or by section of the document. Someone can help me
thank's


2013-10-08 08:32:14
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
It certainly would be possible to write a macro to insert a note at the end of every paragraph. But what is going to be the content of these notes?.

_________________
philip


2013-10-08 09:06:15
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
Here is the code for a macro that inserts an empty footnote at the end of every paragraph. A macro file for download is given below:
Code:
$doc = Document.active
$paraEnds = $doc.text.findAll '.$', 'Ea'
foreach $paraEnd in reversed $paraEnds
Note.insertFootnoteInTextAtIndex $doc.text, $paraEnd.bound
end


Attachment:
Note after every Paragraph.nwm [16.35 KiB]
Downloaded 225 times

_________________
philip


2013-10-08 09:27:23
Profile

Joined: 2012-08-12 17:00:17
Posts: 28
Thank´s for the answer but im sorry i didnt explain Well what i need. I need to insert notes in each paragraph and not only one. Exactly the same way of à regular footnote with style sheet but instead of end of page or section, i need these notes to be at end of every paragraph. For now im doing that manually but it´s Very long and if a want to ad a note for any reason i need to number back all the notes....


2013-10-08 09:38:08
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
Did you try using the macro I made?
If you do please make sure to use it on a copy of your file. (Nisus' Undo works pretty well, but just in case.)

If the result is not what you want, how would you like the macro to work differently?

_________________
philip


2013-10-08 09:43:07
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
Okay, sorry I think I see what you want. You want the footnotes you insert in each paragraph to be at the end of that paragraph.
In Nisus this will require that you make every paragraph a section break. Then you can have the placement of the notes at the end of the paragraph, I believe.

If you want to replace all paragraph end marks in your document with section breaks, this can be done quite easily and does not require a macro.
  1. Open the Find/Replace box
  2. Set Using to Powerfind (or Powerfind Pro)
  3. In the Find box put "Gear" > Special characters > Return
  4. In the Replace box put Section Break > Same Page (from the Insert menu)
  5. Do Replace all

Addendum: I am adding a macro that will change all paragraph breaks into Section breaks:
Attachment:
Paragraph Breaks to Section Breaks.nwm [16.28 KiB]
Downloaded 226 times

_________________
philip


2013-10-08 09:58:11
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
Anyhow, once your paragraph breaks have been replaced with section breaks, you can insert *Endnotes* in the usual way. Make sure to go to the style sheet to change the placement of the notes to "End of Section" (from "End of Document"). I believe you will also be able to set the notes to restart the numbering "each section".

Attachment:
Endnotes per section.jpg
Endnotes per section.jpg [ 74.69 KiB | Viewed 7594 times ]


Hope this helps.

_________________
philip


2013-10-08 10:43:06
Profile

Joined: 2012-08-12 17:00:17
Posts: 28
Thank´s à lot i''l try it and give you feed-back


2013-10-08 11:38:50
Profile

Joined: 2012-08-12 17:00:17
Posts: 28
hi,
The first macro is fine but the note i got go to the end of the page. What i want is a macro to help me to make what i do manually and make me a lot pf bps
her's an example of what i do manually

i tried the second macro and i got the following error message (in french)
error on the line 5
about the find and replace solution if i'm not wrong it could be done only once the text is written. And i need to ad note when i'm writing, like a simple food note but at the end of every paragraph.
perhaps macro is not the solution,
two beers and a bagel to whom who help me
posting.php?mode=reply&f=17&t=5474#


Attachments:
capture 5774-02-05 à 01.12.46.png
capture 5774-02-05 à 01.12.46.png [ 34.1 KiB | Viewed 7583 times ]
capture 5774-02-05 à 01.07.17.png
capture 5774-02-05 à 01.07.17.png [ 56.76 KiB | Viewed 7583 times ]
2013-10-08 15:20:58
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
msebban wrote:
i tried the second macro and i got the following error message (in french)
error on the line 5

This is because of localisation. The macro contains a Menu command which is the English name of the command. But since you are using French, you would need to replace that with the French command.


msebban wrote:
about the find and replace solution if i'm not wrong it could be done only once the text is written. And i need to ad note when i'm writing, like a simple food note but at the end of every paragraph.
perhaps macro is not the solution,

As I was trying to indicate before the way to do what you want is to use "Section breaks" rather than simple returns at the end of the relevant paragraphs.(Judging from the sample, in your case this would be after every French translation paragraph.) This should ideally be done while you are working. The macro/Find&Replace method would be useful for the sections already written, but in your case should be adjusted to only put section breaks after the French paragraphs. To make inserting the breaks easier, I would suggest assigning a convenient keyboard shortcut to the "Section break:Same page" command.

If you use section breaks in that way you can use (section) endnotes for what you want. Beyond that it is difficult to understand what kind of speeding up and/or automatisation you are hoping for.

PS: One thing for which a macro might be useful in your case, would be to convert the hand-written notes you have made so far to real notes. If you did need such a macro, it would probably best be "tailor-made" and for that it would really be best to have a short sample (a few paragraphs) of your document.

_________________
philip


2013-10-08 16:40:25
Profile

Joined: 2012-08-12 17:00:17
Posts: 28
1) i fix the macro, it's fine
i made a test and it's going this way


Attachments:
capture 5774-02-05 à 04.04.42.png
capture 5774-02-05 à 04.04.42.png [ 19.4 KiB | Viewed 7572 times ]
2013-10-08 18:10:37
Profile

Joined: 2012-08-12 17:00:17
Posts: 28
i need now to fix the space between notes and paragraphs and insert new section to come back to a new paragraph etc…
here's a sample of the way i do it manually. all my current work is based on the same model.
I don't know how i can automatize the process…and make it it faster and easier
Thank's again for your help…..


Attachments:
File comment: sample
Vaéra Lundi.rtf [27.74 KiB]
Downloaded 213 times
2013-10-08 18:17:39
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
Hello again.

I am attaching a folder below with your sample and a macro that will transform it in the way I have been suggesting. I must warn you, that I have had some (strange) difficulties with the macro, that really have nothing to do with the problem at hand. I can get the macro to work, but if it does not work for you, this may be due to such technical issues. Perhaps the guys at Nisus Soft (Martin?) can give some feedback here. I have sent them a short report of the issue.

Anyhow, if the macro does not work for you right away, try the following:
  1. Open the file you want to edit
  2. Open the macro file, so you can see the macro code
  3. Select the macro code ("Select All")
  4. Choose "Run Selection as Macro" from the "Macro" menu

At any rate, only use the macro on a copy. Keep your original file.

Finally when the macro has finished, go to the style sheet and set the endnote settings the way you want them, as explained previously.
Hope this is helpful

Attachment:
msebban.zip [15.68 KiB]
Downloaded 191 times

_________________
philip


2013-10-09 02:28:19
Profile

Joined: 2012-08-12 17:00:17
Posts: 28
For now, the macro doesn't run. I have to translate it to french command.
I understood the process and it's very smart and logic
let me know if you fix the issue you get with this macro
posting.php?mode=reply&f=17&t=5474&sid=f83cfa5de4fc294d072e938ff7b1abbf#


2013-10-09 04:25:38
Profile

Joined: 2012-08-12 17:00:17
Posts: 28
i translated the menu command as you indicated and it doesn't run
i also try the select and run selection macro it doesn't run either
the file msebban_after is very fine
Thank's a lot for your help


Attachments:
capture 5774-02-05 à 14.38.53.png
capture 5774-02-05 à 14.38.53.png [ 15.15 KiB | Viewed 7557 times ]
File comment: macromsebbanfrench
msebban macrofr.nwm [20.8 KiB]
Downloaded 211 times
2013-10-09 04:48:40
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 26 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software