Current Version: 2.5 Implements WYSIWYG HTML! (See What's New in Version 2.5 and Version History) Last updated: 26 July 1995
Nisus Writer is a fantastic word processor for HTML writing because styled documents can be served directly, and its Find/Replace and non-contiguous selection features are outstanding. Here is a set of Nisus Writer macros to assist World Wide Web authors to generate HTML documents. These macro commands run unmodified in both version 3.25 and version 4 (Nisus Writer).
Thanks to Sandra Silcot for all the hard work and dedication to creating these HTML Macros and supporting Nisus Writer on the Internet. Sandra can be reached at ssilcot@www.unimelb.edu.au.
New in Version 2: It may be useful to have WYSIWYG visual cues in editing html. Version 2 now optionally supports styled html editing. In styled editing mode, when you run a macro command to insert HTML tags, the replacement is made attribute sensitive to the defined character styles in the macro file. If you prefer working with plain text, you may continue to do so by leaving styled editing turned off. Let me explain this a little more. Text between and including the angle brackets e.g. <...> is a HTML tag. Running the macro command * Apply HTML Styles
will apply the *tag
style to all such HTML tags regardless of whether styled mode editing is on or off. If you have styled editing mode turned on, the text in-between the opening and closing tags will also have an appropriate style applied "on the fly" by the tag inserting macro commands where appropriate e.g. Header- 1
, or Style-Strong
will apply styles, whereas the macro commands for list items and paragraphs do not.
The HTML Macros are distributed with styled editing OFF. If you want to try the styled editing, PLEASE read the documentation on styled mode first. Enable styled editing by running the macro command * HTML Styles ON in Macros
. To see what the distributed defined styles do, open a copy of a HTML document, run the * Apply HTML Styles
macro command, and be patient! Then toggle the display of Invisible Text on and off.
Enjoy!
Here's how to install the HTML Macros and obtain new versions:
Obtaining New Versions
The package is available for Nisus Software's Web Site at Demos, Updates and Extras.
The package, a binhexed self-extracting-archive, contains:
HTML_Macros_Read_Me2.5.html
HTML Macros
: The HTML macro suite.HTML Keyboard Shortcuts Setup
: Contains macro commands which will automatically define keyboard shortcuts for each macro command in the macro file.Install Keyboard Shortcuts Preferences.
HTML Keyboard Shortcuts Setup
. Execute the macro command named ***Assign Keyboard Short 3
or ***Assign Keyboard Short 4
depending on which version of Nisus you use. These assignments can be removed with the macro command ***Remove Keyboard Short 3
or ***Remove Keyboard Short 4
. The keyboard shortcuts assigned are noted below.Customise the Macro Suite
Open and Edit the macro file HTML Macros
. Customize the macro commands ×Template Footer
and ×Template Header
(not needed if you prefer to use a stationery document.). See also instructions for customizing defined character styles for the HTML tags.
Turn on Styled Editing (optional)
If you want to use styled editing, you must run the macro command * HTML Styles ON in Macros
(The HTML Macros are distributed with styled mode editing OFF).
You are now ready to start writing HTML.
Note: The shortcuts follow the abbreviation of the HTML tag name.
If you wish to assign different shortcuts, modify ***Assign Keyboard Short
as required before running it, or modify them later as required using Nisus Writer's Keyboard Shortcuts command.
These HTML Macros run unmodified in both version 3.25 and version 4 (Nisus Writer). You do NOT need to run the Nisus Writer conversion macro, "Convert version 3 to 4 Macros." They have been tested on 3.25 Nisus and 4 NisusWriter.
Probably the most powerful feature of these HTML Macros is that they are designed to support Nisus' non-contiguous selections. e.g. using command-option selections, or a find command, to select all your level 2 headings, then simply execute the Header- 2
macro command. All the selected headings will now be wrapped with h2 tags.
Includes:
Form tags not supported yet.
Includes: individual marking of list items (<li> tag only), list wrapper tags only for <ol>, <ul>, <dl> type lists, or wrappers as well as list item marking in one command. Two discursive list macro commands provided to enable dt/dd parts to be delimited by tabs or returns. Includes a macro command to quickly convert all bulleted paragraphs to html unordered lists (sorry, no smart list nesting yet).
These macro commands impose <p></p> and <li></li> syntax so your html won't break when browsers start conforming to the html DTD specs. Includes a macro command to quickly convert all non-tagged or non-bulleted paragraphs to html paragraphs.
Three template macro commands are supplied. One inserts a header at the top of a document and prompts for a title and h1 string. One inserts a standard footer at the bottom of a document. The other simply calls the other two.
Please customize these macro commands as required to suit yourself.
The List-Header to Unordered macro command generates properly nested unordered lists of all h2-6 tags in a document, including auto-calculated anchor names on headings, hypertext links on the contents items, and places the result in the Clipboard for you to copy into your document (very useful for a Table of Contents section). The List-Files to Unordered macro command works as per List-Header to Unordered except it works on all the files selected in the Catalog window, creates a new file, and includes the level 1 heading. Again, proper hypertext referencing is done for you.
Version 2 implements, optionally, automatic styling of tags and tagged text. The intention is to provide some basic visual editing assistance. This feature is not, I repeat not, intended to make these HTML Macros into a Web browser! The styles are totally brain-dead when it comes to embedded lists. Please use a proper Web browser to see what your HTML will actually look like.
For your convenience, a separate macro file is supplied to install keyboard shortcuts for each macro command. This works by mirroring the macro commands in the actual macro file, and supplying macro code to setup keyboard shortcuts.
Simply open the macro file named HTML Keyboard Shortcuts Setup
and execute the macro named ***Assign Keyboard Short the default keyboard shortcuts are assigned.
The OPTION key is used as the modifier
e.g.
option-command-hc
to generate the headings contents, option-command-h2
for level 2 headings. This is easily changed in the macro file itself. You only need run this once of course.
If you choose to work in styled mode, it is very important you understand how the styles have been implemented. For best results, please take the time to read the following documentation.
WARNING: When you run * Apply HTML Styles
, the styles applied are NOT ADDITIVE and will replace any existing formatting. If you are working with a document containing your own stylenames or formatting which you want to retain, do NOT use the styled HTML mode (ie. execute * HTML Styles OFF in Macros
) and do NOT execute * Apply HTML Styles
.
You may switch modes at any time by running * HTML Styles ON in Macros
or * HTML Styles OFF in Macros
as required. In all appropriate replace commands, styles exist in the replace text. With styled mode ON, the replacement is attribute sensitive - this will import and apply the stylename. With styled mode OFF the replacement is not attribute sensitive.
When working in styled mode, over time the styles will fragment. This can be minimized if you assign a function key to the *normal
style, and remember to press that key when adding text to the right of an opening HTML tag.
You can run * Apply HTML Styles
at any time to clean up the fragmentation.
A minimal set of defined character styles exist in the macro file (there is no use of rulers in these styles):
* Apply HTML Styles
, everything is first reset to this.<pre>
, <code>
and <tt>
tags. The define styles in the macro file can be edited to reflect your own stylistic choices but you should not change the additive attributes on any defined styles. Edit the macro file and select Define Styles
. Choose the style to change, make and save your changes.
If you change your mind later, the macro command * Remove HTML Style Names
should be run, followed by * Apply HTML Styles
, on any documents edited with your prior style formatting choices in order to bring them back in sync with the macro file's formatting choices.
*tag
Style Invisible* Show/Hide HTML Tags
Macro Command*tag
style may be kept as visible, so they will always appear when editing. Disadvantages: on large documents it may take some time to execute the formatting change.* Convert HTML to Text
Macro CommandUltimately, the best option is to save your work and view it in a Web browser!
When implementing HTML styles in this macro file, a critical design decision was whether or not to make the HTML define styles additive. Additive character styles would have the advantage of better coexisting with existing non-HTML related formatting. This is important if users want a single document suitable for hardtop and Web format, and they want additional formatting beyond the scope of html tags in the print version and have used styles to achieve this. On the other hand, without additive styles there would be no way of ensuring a consistent output from the macro command which applies HTML styles. For example, with additive styles, running * Apply HTML Styles
a second time would actually remove the HTML styles. To get consistent output, one needs to apply formatting from a consistent base. This means removing all existing formatting.
In this release, consistency of output was chosen i.e. implementing NON-additive HTML styles. The fact that applying HTML styles will remove any existing formatting is a conscious design choice. You can still make excellent use of these HTML Macros by simply using them in non-styled mode. In this case, no attributes are changed in replacements. You are free to make the macro file's define styles NON-additive but be warned you may be surprised with the results.
Note: I have chosen not to include any keyboard shortcuts for these style related macro commands in the distribution because their use and combinations will be very personal.
* Add HTML to Document * Reapply HTML Styles * Apply HTML Styles * Remove HTML Style Names * HTML Styles OFF in Macros * Remove HTML Styles * HTML Styles ON in Macros * Show/Hide HTML Tags * Ignore Spelling Tags
* Add HTML to Document
* Apply HTML Styles
yes
to continue. These styles are controlled by the formatting choices defined in the macro file define styles.. The macro does alot of processing and runs very slowly on large HTML documents. * HTML Styles OFF in Macros
* HTML Styles ON in Macros
* Ignore Spelling Tags
cmd-M
for Ignore. The macro only works if styled editing is off, as it is assumes that if you use styles you will want to retain no spelling on the *tag
style.* Reapply HTML Styles
* Remove HTML Style Names
* Remove HTML Styles
* Show/Hide HTML Tags
*tag
defined style. Very useful if you retain the Invisible Text attribute on your *tag
define style.cmd-opt-vt
.This section describes what each macro command concerned with inserting HTML markup tags does.
Note:
&
" indicates whatever is selected when the macro is executed.× Address × Title ×Stationery ×Template Footer ×Template Header *Header- 1 *Header- 2 *Header- 3 *Header- 4 *Header- 5 *Header- 6 *Link-Anchor *Link-To Document *Link-In Document *Link-Image *Link-Create Anchor List *List-Definition Descrip. *List-Definition (R) *List-Definition (Tabs) *List-Definition (Wrap) *List-Definition Term *List-Item *List-Ordered *List-Ordered (Wrap) *List-Unordered *List-Unordered (Wrap) *List-Bullet to Unordered *List-Header to Unordered *List-Files to Unordered *Netscape-Center *Netscape-Font *Special-Line Break *Special-Horizontal Rule *Special-Paragraph Break *Special-R to Paragraphs *Style-Bold *Style-Code *Style-Emphasis *Style-Italic *Style-Strike *Style-Strong *Style-Underline *Style-Block Quote *Style-Citation *Style-Preformatted *Style-Typewriter *Style-Delete Preformat R
× Address
cmd-opt-ad
.× Title
cmd-opt-t
.×Stationery
cmd-opt-tem
.×Template Footer
cmd-opt-tf
.×Template Header
cmd-opt-th
.*Header- 1
cmd-opt-h1
.*Header- 2
cmd-opt-h2
.*Header- 3
cmd-opt-h3
.*Header- 4
cmd-opt-h4
.*Header- 5
cmd-opt-h5
.*Header- 6
cmd-opt-h6
.*Link-Anchor
cmd-opt-a
.*Link-To Document
cmd-opt-h
.*Link-In Document
cmd-opt-hi
.*Link-Image
cmd-opt-img
.*Link-Create Anchor List
*List-Definition Descrip.
cmd-opt-dd
.*List-Definition (R)
cmd-opt-dlr
.*List-Definition (Tabs)
cmd-opt-dlt
.*List-Definition (Wrap)
cmd-opt-dlw
.*List-Definition Term
cmd-opt-dt
.*List-Item
cmd-opt-li
.*List-Ordered
cmd-opt-ol
.*List-Ordered (Wrap)
cmd-opt-olw
.*List-Unordered
cmd-opt-ul
.*List-Unordered (Wrap)
cmd-opt-ulw
.*List-Bullet to Unordered
cmd-opt-dpu
.*List-Header to Unordered
*List-Files to Unordered
cmd-opt-hc
.*Netscape-Center
<centre>...</center>
tag. cmd-opt-ce
.*Netscape-Font
<font size=N>...</font>
tag. cmd-opt-fo
.*Special-Line Break
cmd-opt-br
.*Special-Horizontal Rule
<hr>
at start of all selections. Also displays a line across the screen using a named ruler and a tab mark with leading. To modify the rulers appearance, change the ruler present in the xxxRulersOnHRs
macro. Supports non-contiguous selection, so now its easy to use Nisus Writer to select, say, all <h2>
tags and insert a horizontal rule in front of all level 2 headings. cmd-opt-hr
.*Special-Paragraph Break
cmd-opt-p
.*Special-R to Paragraphs
*Unbreak Lines
macro command. cmd-opt-rp
.*Style-Bold
cmd-opt-b
.*Style-Code
cmd-opt-c
.*Style-Emphasis
cmd-opt-em
.*Style-Italic
cmd-opt-i
.*Style-Strike
cmd-opt-ik
.*Style-Strong
cmd-opt-st
.*Style-Underline
cmd-opt-u
.*Style-Block Quote
cmd-opt-bq
.*Style-Citation
cmd-opt-ci
.*Style-Preformatted
cmd-opt-pre
.*Style-Typewriter
cmd-opt-tt
.*Style-Delete Preformat R
cmd-opt-kp
.
The package includes a number of other macro commands not specifically concerned with HTML tags, but of convenience to HTML authors.
*Convert HTML to Text *Convert Tags to "< >" *Convert to HTML Entities *Convert UNIX to Mac Text *Remove HTML Stylesheets *Remove Redundant R *RTF Stylesheet Extract *Select Content *Select HTML Tags *Unbreak Lines Add Marker Copy Pathname Copy Pathnames (All Docs) Delete Paragraph Rulers Find Selection
*Convert HTML to Text
.txt
instead of .html
. *Convert Tags to "< >"
cmd-opt-isi
.*Convert to HTML Entities
cmd-opt-iso
.*Convert UNIX to Mac Text
*Remove HTML Stylesheets
cmd-opt-k
.*Remove Redundant R
*RTF Stylesheet Extract
*Select Content
*Select HTML Tags
*Unbreak Lines
Add Marker
Copy Pathname
Copy Pathnames (All Docs)
Delete Paragraph Rulers
Find Selection
Document Macro File
//==================== MACRO macro-name-hereat the start of each macro command. The macro file contents are copied, these marker lines are picked up and the names are marked and indexed.
Version 2.5.2, 13 October 1995
Version 2.5.1, 22 September 1995
Version 2.5, 26 July 1995
*Convert to HTML Entities
.
* Apply HTML Styles
expectance responses made more robust.
Version 2.0, 8 Mar 1995
*Netscape-Center
and *Netscape-Font
.*Style-Delete Preformat R, *Remove Redundant R, *Link-Create Anchor List, Select All Not HTML, *Select HTML Tags, *Select Content, *Convert UNIX to Mac Text
-S
to all Find/Replace
commands to enable the macro commands to work with non-English documents. Note that this might cause problems with mixed-script documents. *Special-Horizontal Rule
to support non-contiguous selection.*List-Header to Unordered
macro command arbitrarily changing heads to bold has been "fixed" by new styles feature.ALIGN=
attribute for images.Version: 1.3, 27 Dec 1994
*List-Header to Unordered
- it now ignores text following an end heading tag. Also makes Clipboard contents plain text.Version: 1.2, 14 Dec 1994
Version 1.1 10 Dec 1994
Version 1.0 10 Nov 1994 - Initial version.
Sandra Silcot has allowed Nisus Software to distribute these HTML Macros with Nisus Writer and through Nisus Software's Web site. Click here to go to Nisus Software. You can reach Sandra Silcot at
You may forward all bug reports, comments, and requests to features@nisus-soft.com as well as any other suggestions you may have about Nisus Writer.
Sandra Silcot, Information Technology Services, University of Melbourne. Email: ssilcot@www.unimelb.edu.au WWW: http://www.unimelb.edu.au/~ssilcot/ Nisus Software 107 S. Cedros Ave. Solana Beach, CA 92075 USA Email: support@nisus-soft.com WWW: http://www.nisus-soft.com/~nisus FTP: ftp://ftp.nisus-soft.com/pub/nisus