Legacy Documentation

Publicon® (2004)

This is documentation for an obsolete product.
Current products and services

Documentation  / Publicon  / User Guide  / Custom Modules  /

Creating Custom Modules

You can create your own custom modules to implement specific styles. The fastest and easiest method is to copy an existing source document, edit it, and rename it when generating the actual palette with the Make Palette button provided in all Publicon default source documents. As you name the palette you can browse for a location to save it. That process actually creates the entire module, but without the style sheet. Save it in Publicon's application directory in /AddOns/Autoload, or in your Publicon preferences directory within Autoload.

Module Layout Details:

For each module must contain the following files.

• A custom palette source document

• A custom document palette

• A custom style sheet

Place these files in a directory created specially for this purpose in the AddOns/Autoload directory in the Publicon layout or in preferences. The directory must have a structure that is parallel to the structure of the built-in custom modules.

For example, suppose you want to create a custom module called MyArticle. You should create a directory called MyArticle for this module in the AddOns/Autoload directory of the Publicon layout. This directory must have the following subdirectories.

A schematic view of the directory structure of a custom module called MyArticle.

Front End--This contains subdirectories called StyleSheets, Palettes, and DocumentPalettes to hold the custom style sheet and custom palette for the module. The style sheet and palette can both share the same name, MyArticle.nb, since they are in different directories. The palette in the Palettes directory is actually just a stub with code that points to the document palette in the DocumentPalettes directory. The stub file is a device that allows Publicon to open the document palette an a template document at the same time from the File RightTriangle New menu. This stub is created automatically when using the automated palette generation process discussed above.

PaletteSource--This contains a notebook that defines the document palette for the module. Typically, the source notebook has the same name as the document palette followed by the suffix "Src". For the MyArticle.nb palette, the source notebook would be called MyArticleSrc.nb. This naming convention is not necessary, but it is useful for maintaining consistency between the different modules as well as differentiation from the actual palette.