Search found 989 matches

by phspaelti
2019-07-21 20:06:59
Forum: Nisus Writer Pro Macros
Topic: Normal to Body Text
Replies: 1
Views: 16

Re: Normal to Body Text

Hello Todd, Assuming you want hints about how to solve this rather than a fully written out solution, let me suggest this. Start by giving all Body Text the same style. If you select these, then you will have an array of selections. The index/location of each selection block is the index of the firs...
by phspaelti
2019-07-09 16:01:35
Forum: Nisus Writer Pro
Topic: Automatic numbers lost in sort Table
Replies: 11
Views: 498

Re: Automatic numbers lost in sort Table

I don't really need the word 'Scene' at the start, would tha help? Exactly. "Numbers" of the form "Scene 1" are sorted alphabetically. So "Scene 101" will precede "Scene 25" which will precede "Scene 9". They would need to be 0-padded to sort correctly. But if you remove the "Scene " then they will...
by phspaelti
2019-07-06 04:47:48
Forum: Nisus Writer Pro
Topic: Variable substitution
Replies: 3
Views: 450

Re: Variable substitution

This type of thing can be done via the macro language. The detailed features of the macro language can be found in the Macro Language Reference which is in the Help menu. For example you can get the name of the current font like this: $sel = TextSelection.active $currentFont = $sel.displayTypingAttr...
by phspaelti
2019-06-10 20:17:17
Forum: Nisus Writer Pro
Topic: Find / Copy all hyperlinks in document
Replies: 2
Views: 861

Re: Find / Copy all hyperlinks in document

Hamid, what a quaint macro :wink:

Here is something that should do what Sccardais actually asked for.
(Note: Working with links is surprisingly cumbersome.)
by phspaelti
2019-05-24 23:45:06
Forum: Nisus Writer Pro
Topic: Pages inside a Document
Replies: 10
Views: 2960

Re: Pages inside a Document

Do you want to be able to see inside the pdf while viewing the Nisus document? Otherwise you could just put links to the pdfs into the file. Clicking on them will open them in the pdf viewer (e.g. Preview). If you really need the first option you could put images of pdf pages into the Nisus document...
by phspaelti
2019-04-28 10:43:51
Forum: Nisus Writer Pro
Topic: Changing selected fonts
Replies: 2
Views: 1566

Re: Changing selected fonts

Apply the font :?
by phspaelti
2019-04-21 06:50:45
Forum: Nisus Writer Pro
Topic: Applying a template to an existing document
Replies: 4
Views: 1725

Re: Applying a template to an existing document

I am sure a Nisus Writer Pro macro would solve the problem... Not sure this is the best solution, but … # Save Current File With Template $doc = Document.active $docPath = $doc.filepath $dmPath = User Property “document manager folder path” $templatePath = $dmPath.filePathByAppendingComponent "MyTe...
by phspaelti
2019-04-21 01:07:07
Forum: Nisus Writer Pro
Topic: Applying a template to an existing document
Replies: 4
Views: 1725

Re: Applying a template to an existing document

It's true that you can't apply a template to an existing file. And while you can easily replace the style sheet of an existing file, you can only change the margins etc. by hand through the settings in the palette. On the other hand what you can do easily is import a document into a (template-based)...
by phspaelti
2019-04-13 19:53:37
Forum: Nisus Writer Pro
Topic: creating and inserting a word index in a completed document
Replies: 7
Views: 2202

Re: creating and inserting a word index in a completed document

Hello Walt, your list should be in its own document, and it should contain a table with two columns; the first column should have the words to be indexed in your main document, and the second column should have the term under which they should be indexed. If you have created the list as lines with t...
by phspaelti
2019-04-13 18:30:34
Forum: Nisus Writer Pro
Topic: creating and inserting a word index in a completed document
Replies: 7
Views: 2202

Re: creating and inserting a word index in a completed document

Hello Walt, The "two column" file you need for generating an index should be a two column table . Note that the list you use should only contain words you actually want to index. With 20,000 words it sounds like you would be indexing every single word in the document (but maybe that's what you want?...
by phspaelti
2019-04-09 04:12:10
Forum: Nisus Writer Pro
Topic: How to search for a 1 cell table
Replies: 5
Views: 1815

Re: How to search for a 1 cell table

vwnisus wrote:
2019-04-09 03:19:15
The intention is to remove the text and the table.
Well in that case, use the first macro and press "delete". Though that might result in merged paragraphs. So maybe better:

Code: Select all

foreach $table in reversed $oneCellTables
  $table.enclosingText.replaceInRange $table.enclosingTextRange, "\n"
end
by phspaelti
2019-04-09 02:35:59
Forum: Nisus Writer Pro
Topic: How to search for a 1 cell table
Replies: 5
Views: 1815

Re: How to search for a 1 cell table

For instance you could follow up the code above with the following: foreach $table in reversed $oneCellTables $cell = $table.cellAtRowAndColumn(0,0) $cellText = $cell.text.copy & "\n" $lineAttrsTop = $cell.lineAttributesForEdge 'top' $lineAttrsBottom = $cell.lineAttributesForEdge 'bottom' $lineAttrs...
by phspaelti
2019-04-09 02:11:25
Forum: Nisus Writer Pro
Topic: How to search for a 1 cell table
Replies: 5
Views: 1815

Re: How to search for a 1 cell table

Since they all have the same text, wouldn't searching for the text work? What do you want to do with them when you find them? Macro code for finding one cell tables would be as follows: $doc = Document.active $oneCellTables = Array.new foreach $table in $doc.text.tables if ($table.rowCount == 1) && ...
by phspaelti
2019-03-01 08:21:38
Forum: Nisus Writer Pro Macros
Topic: A macro converting numbered texts to endnotes
Replies: 9
Views: 2712

Re: A macro converting numbered texts to endnotes

But then I don't understand the find pattern at the line 33: '^$0(.+$0\n)+'; if '$0' stands for the found reference number, the first one should be '^1(.+1\n)+'. But such a formula does not match any string... Martin comments for this part of the macro "# find the corresponding note text". If I und...
by phspaelti
2019-03-01 01:43:51
Forum: Nisus Writer Pro Macros
Topic: A macro converting numbered texts to endnotes
Replies: 9
Views: 2712

Re: A macro converting numbered texts to endnotes

Hello Nobumi, I'm glad you got it to work. So I guess it was worth providing more than one macro! Also it shows that with macros it's really best not just to hope someone can write one for you, but to at least have some idea how they work so you can get the result you want. I don't understand the me...