Joining Files

Get help using and writing Nisus Writer Pro macros.
Post Reply
adryan
Posts: 561
Joined: 2014-02-08 12:57:03
Location: Australia

Joining Files

Post by adryan »

G'day, all

I wonder if anyone having more facility with the Macro Language than I possess would be interested in augmenting Kino's "Join Files" Macro to address a few of its deficiencies, specifically:–

(1) The resultant joined file appears to be for a Paper Size of A4, even if the files to be joined (and, indeed, the Nisus New File template) are of a different Paper Size. It is not apparent to me where in the Macro this coercion occurs.

(2) The values for the Margins (including Headers and Footers) in the files to be joined are not respected in the resultant joined file, even when each of the files to be joined has the same settings.

(3) The contents of Headers and Footers are not preserved.

As the Macro stands, files are separated by a simple Page Break in the resultant joined file. My preference would be for them to be separated by a Section Break (Next Page) instead. This would facilitate matters where each of the files to be joined represents a chapter (say) with its own distinctive Header (and perhaps also Footer) content. Even if odd and even pages (for the joined files document) were not taken into account in the Macro, at least Header content would appear somewhere in the resultant file, which would make finding chapters easier and provide a source for a Copy-and-Paste operation if required.

Thanks for your consideration.

Cheers,
Adrian
MacBook Pro (M1 Pro, 2021)
macOS Ventura
Nisus Writer user since 1996
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Joining Files

Post by martin »

Dear Adrian: those all sound like reasonable and desirable enhancements to the Join Files macro. Unfortunately creating such a macro is currently very awkward or impossible. The settings you mentioned (paper size, margins, headers, etc) are all handled by sections, which macros do not have access to control.

I'll take your request here as an enhancement request for macros in general. The Nisus macro language should give macros control over section properties. Thank you!
adryan
Posts: 561
Joined: 2014-02-08 12:57:03
Location: Australia

Re: Joining Files

Post by adryan »

G'day, Martin et al

That'd be great. Thanks, Martin.

Perhaps another (additional?) way of going about things would be to have commands from the Section-related Palettes (such as "Different First Page") available in a Section set in the Format menu (analogous to the Paragraph set there). This would enable the lazy amongst us (in whose number I count myself) to write Macros using commands from the hierarchical menu structure without having to delve into the OOL beloved of the cognoscenti. But adding in all the Header and Footer content would still be quite a chore, hence the usefulness of an enhanced Join Files Macro.

I guess the upshot of this discussion is that, pending the availability of such an enhanced method of joining files, writers of long documents with multiple chapters are best advised to do it all in the one document rather than allocate each chapter to its own file and expect to unite them all at a later date with any degree of ease.

Cheers,
Adrian
MacBook Pro (M1 Pro, 2021)
macOS Ventura
Nisus Writer user since 1996
User avatar
phspaelti
Posts: 1313
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Joining Files

Post by phspaelti »

martin wrote: 2021-02-09 09:05:42 The Nisus macro language should give macros control over section properties. Thank you!
Yes!
philip
Post Reply