Part of Nobumi Iyanaga's website. n-iyanag@ppp.bekkoame.or.jp. 1/28/98.

logo picture

Hypertext Macro

Hypertext Macro

This is a new_icon picture version of HyperText Macro. In addition to the original "Hypertext like" and "Document navigator" features, this new version implements some rudimentary Outliner features.

On the other hand, it seems that I have left by inattention some Japanese specific font or personal font in some file(s) (?) included in the previous release of this macro set. I am very sorry for the trouble that this careless mistake may have caused to those who have downloaded it. This time, I take care to not make the same mistake.


Click here to download the HyperText macros (39 kb)

How to Set up...
The macro file contains 14 macros:

You have first to cut and paste at least Option and oReplaceAll in Var into the Nisus Macros file. These macros must have exactly the same names (i.e. "Option" and "oReplaceAll in Var") in the Nisus Macros file.
Two other macros, Mark a and Jump to a are also useful in many cases, so you could place them in the Nisus Macros file, and assign to them some easy-te-remember shortcuts (I personally use "CMD + keypad [0]" for Mark a and "CMD + Shift + keypad [0]" for Jump to a).

On the other hand, if you want to use the nav TOC to HyperNavigator command, you will have to place the "HyperNavigator Stationery" file in the folder of your preference, and change the path to it, in that macro, according to the new file path.

The files "ExampleDocument" and "ExampleDocument.nav" are example files, and can be placed anywhare, as well as the file "Outliner ReadMe".

Now, before running any of the macros contained in this macro set, please run once the macro called oRun first this macro (actually, if InitInit macro worked, you could place this macro in your Nisus Macros, naming it "InitInit". But in Nisus Writer 5.1.1, this mechanism is broken...).


How To Make Links between Two Files...
Suppose that you have two files: the first one, "main document", and the second one "sub document". See below a picture:

hypermacro1 picture



Now, to make a link between these two documents...:

1) First, please select in the Main Document the text to link and choose Mark a in the macro menu.
2) Bring the second file, "Sub Document" at the front, and do the same thing.
3) Return to the Main Document, and choose TwoFile HyperText. A dialog will ask you if you want "Page reference in the main document?". If you press return (or reply "Yes"), the page of the linked text in the Sub Document will be inserted in your Main Document, in the format "(p. xx)".
4) The macro will work, and the linked texts in the two documents will be in blue.
Here is an example of the cross-referenced files:

hypermacro2 picture



Now, to activate the links, i.e. to jump from the linked texts in one or other way... (note that this command will work even if the linked file is not opened. It will open it automatically. But if you move the linked files in the hard disk, all the links will be broken, so that these macros will be messed up...! see below on this point):

you will doule-click on the blue colored text while pressing the Option key.

You can edit you two documents as you like. If you need to update a cross-reference page number in the Main Document, you will...:

place the cursor just before the linked (blue) text, or select that text in the Main Document, and execute the macro "Update XRef page".

If you need to update all the cross-reference page numbers in the Main Document, you will...:

simply run the macro "Update All XRef page" while the Main Document is at the front. The cursor can be at any place.

If you have moved your two documents in your hard disk, you will have to update the link informations.

run the macro Update TwoFiles Dir: it will update the file paths info in the Invisible macros embedded in the two documents.
To use this command, you must have the two documents open on your screen (of course...!).


How To Make a hyper-navigator of a document...:
What I call a "Hyper-navigator" is a kind of Table of Contents in a different file: each of the lines of that file will be linked to a heading of the Main Document. You will get an idea with this picture:

hypernav picture



If you have a big document that you would like to "navigate" through with a "hypernavigator", you will...:

1) First open a new file. You will place its window at the right hand of your Main Document, and make its window little. You could name it "Main Document nav" or something like that.
2) Return to your Main Document. Select the first heading, and choose Hypernavigator in the Macros menu. You will have a line in the "hypernavigator window" of the same wording as the selected heading in your Maind Document, preceded by a blue bullet.
3) You can repeat the same thing as long as you have headings that you want to place in the "hypernavigator".

Now, to activate the navigator, i.e. jump from the "hypernavigator" headings to the linked headings in the Main Document...:

Place the cursor just before the blue bullet and double-click while pressing the Option key.
That's all.

If you have marked your headings in the Main Document as "Table Of Contents" (with CMD + K), you can make your "hypernavigator" with only one command. That is the command nav TOC to HyperNavigator. This macro will open a new document, named your_document name + ".nav" (it uses the HyperNavigator Stationery file bundled in this package). Warning: if your document name is longer than 26 characters or so, it will generate a wrong file name! It must be shorter than 26 characters. I am sorry for this inconvinience...

If you have moved the two files in the hard disk, the link informations can be updated by the command nav Update Dir. To use it, you must have the two document (the main document and its "navigator") open, and the "navigator" document must be at the front.


Rudimentary outliner features

The "Hypernavigator" could be used as a very rudimentary outliner. Four macros, nav NextHeading, nav selectBetweenHeading, OL CutBeforeMove and OL InsertAfterMove are intended for such an use. I included in this package an "ExampleDocument" and an "ExampleDocument.nav" -- two files that will show you how these commands can be used. You will find some supplementary informations in another "Outliner ReadMe" file on these features included in this package.


All these macros work with "invisible macros" embedded in the documents. If you set invisible text to visible in the "Display attributes" dialog, you will see these macros. If you make changes to these invisible macros, these macros will be broken. So, please be sure to not edit these invisible macros.

You can use the macro oRemove All Invisible if you want to delete all these Invisible macro texts embedded in the documents by the other macros.

If you have any question or problem using these macros, please write me, at n-iyanag@ppp.bekkoame.or.jp.

Thank you in advance for any feedback!

And have fun!


Mail to Nobumi Iyanaga


frontierlogo picture

This page was last built with Frontier on a Macintosh on Wed, Jan 28, 1998 at 1:02:46. Thanks for checking it out! Nobumi Iyanaga