AGJustify

Introduction

Justify.rexx is an ARexx script for use with GoldED. Its purpose is to perform paragraph justification in AmigaGuide documents. It detects AmigaGuide tokens and accounts for link length, unlike GoldED's standard justification commands.

Authors and copyright

This script is copyright ©2002 by Francesco Borghese and Giacomo Di Giacomo.
Email: fraborg@tiscali.it, g.digiacomo@ieee.org.

Distribution

This script is public domain.

Requirements

  • GoldED (tested with version 6.1).
  • An Amiga or other machine able to run GoldED and Rexx.
  • Of course you need to have the ARexx interpreter running.

Usage

Invoke the script with:

rx justify <L|R|C|J> (with path if required)

where the required parameter selects respectively left, right, center and full justification. When invoked, the script will format the paragraph (as delimited by top and bottom empty lines or AmigaGuide commands) of the selected window of GoldED containing the cursor. Indention is accounted for if the Layout->Keep Indention menu item is checked.

Installation

If you have the MakeGuide add-on installed, it is advisable to put the script in the GoldED:add-ons/makeguide/rexx/ directory.

If you want fast access, you may replace the standard menu items of GoldED for the AmigaGuide file type with calls to the script. As an example, a menu configuration is supplied with the script. You can associate it with the AmigaGuide file type as follows:
  • Copy the AmigaGuide.menu file coming with this archive into the GoldED:etc/registry/presets/ directory.
  • Now start GoldED (or quit and restart it if it was already open).
  • In GoldED, select the menu item Extras->Customize.
  • Choose the "File types" tab.
  • From the tree list, select the AmigaGuide->Configuration folder.
  • Press the Add (plus sign) icon on the bottom right of the window.
  • Select Pool->Menus->AmigaGuide.menu and click OK.
  • Finally, click on Save.
Now you can use the script in replacement of the standard GoldED justification commands whenever you are editing an AmigaGuide file, from the Layout menu, items Format Paragraph - Block, Left, Center and Right.

Limitations

You need a blank line at the end of the file to currently justify the last paragraph.

Download

Shift click to download AGJustify 1.0 (12k)

email7.gif (2241 bytes) Contact us at fraborg@tiscali.it.