Professional Documents
Culture Documents
Edd Formatting
Edd Formatting
FrameMaker 12/13
Overview
Introduction ......................................................................... 2
Terminology.................................................................... 3
General procedure for customisation............................... 5
UI properties ........................................................................ 7
Workspaces..................................................................... 7
Toolbars ......................................................................... 8
Files for the UI................................................................. 9
Relationship between the UI files................................... 10
Menus ................................................................................ 11
Customising menus ...................................................... 12
Example menu customisation........................................ 13
Toolbars............................................................................. 14
Customising Toolbars ................................................... 14
Example toolbar............................................................ 14
Configuration files.............................................................. 17
Statements in configuration files ................................... 18
Debugging customisation files ...................................... 19
Tags in toolbar files............................................................ 20
Tool tags....................................................................... 21
Detail tag ...................................................................... 22
Toolbar commands ....................................................... 23
Toolbar icons ................................................................ 24
Extract icons ................................................................. 26
Commands......................................................................... 27
Command examples ..................................................... 27
Command statements ................................................... 28
Modify statement .......................................................... 29
Command details .......................................................... 30
Some particularities of commands................................. 34
Command names from plugins and scripts ................... 38
Menu statements .......................................................... 41
Workspace definition .......................................................... 44
Initialisation files maker.ini and others ............................... 46
Customising FrameMaker 12/13
Introduction
From the beginning FrameMaker could be customised.
Menus can be switched from complete to quick. This is a
standard feature.
Menus can be modified.
Commands can be created and referenced in menus and
toolbars.
Until the arrival of the new user interface with FM-9 the pro-
cess was described in an Adobe file, which was lastly issued
for FM-7. The text provided by this file was grosso modo still
valid for FM 11. However, the new interface requires signifi-
cantly more information, which is not available from Adobe
until now.
Document history
This document is not 2013-02 Use FM-11 version of document as a base.
sacrosanct. In particular it FM-12-M1 introduces two button sizes and colours.
has not been verified by Image reference in toolbar.xml files can use a base-
Adobe and hence may name. The additional product interface XML-Author
contain errors or has no influence on this document.
misinterpretations.
2014-05 Clarify the situation with non-existing toolbar-
Readers are requested to
icons.
communicate errors or
enhancements to the author 2014-09 Check the situation with FM-13-M1. It seems that
klaus(daube.ch) nothing related to the customisation has changed.
2015-03 Reworking the structure of the document in some
places to get a ‘more logical’ sequence.
2015-12 Add text concerning scripts as commands. Amend
the example toolbar with this.
2016.01 Change the document title to reflect scope of docu-
ment; rework structure; add scheme and examples.
2016-02 Clarifications concerning command names from
scripts and plugins, clean up the example files.
2016-03 Clarifications with the help of an Irishman.
Explanation of fonts and Menus and names from the user interface are in > this > font.
highlights Variables (place holders) use italic script.
Keywords and the like are in fixed pitch font.
This is sample code
24 – 2
Introduction
Terminology
Note: IMHO the terminology of FM has not yet settled. The term pod
should be eliminated - but is used since FM-9 and confuses
more than it clarifies. Panel, palette and dialogue are some-
what synonymous. Terminology is not coherent between the
workspace files, the tool tips and context menus.
For better understanding of some terms look at the picture
Elements of the workspace on page 5
2016-03-29
use the short cut for Exit, you type left ALT f x.
Dialogue Prior to FM-9 a dialogue was either modal or non modal. Some
of these have been replaced by dockable panels which can be
grouped into panel groups and minimised to icons.
Even in FM-12 there are still many of the old dialogues active.
Dock A dock is an area on the application window to which UI ele-
ments can be docked (anchored) and aligned.
Dock content What can be in
palatte toolbar Iconised or expanded dialogs/pds, the graphics palette
multi-controlbar Horizontal groups of toolbars on top of the application
window
palette Special tab panes such as the bottom pod (palette-kit data)
1 The installation program does not allow to modify the last level. This is
due to new mechanism (introduced with FM-10) using a data base for in-
stallation/de-installation.
2 The Adobe document calls this a mnemonic shortcut. The access character
must be carefully chosen to avoid duplicates within a menu.
24 – 3
Customising FrameMaker 12/13
24 – 4
Introduction
Elements of the The workspace contains various elements, which are demon-
workspace strated on the following screen shot:
1 2
4
3
5 7
2016-03-29
9
E:\_DDDprojects\FM-toolbar00\AllETB\etb-customising-fm12.fm
1 Menu bar
2 Arrangement panel. A chosen arrangement (e.g. 2 docu-
ment panes side by side) is not saved in the workspace file.
3 Multi control bar (dock) spanning multiple rows of tool
bars. In the workspace file a row of this is a Control Bar
Pane.
4 Toolbar, docked. In the workspace file this is a Control Bar.
5 Toolbar, undocked = floating
6 Graphic toolbar (undocked, horizontal arrangement)
7 Tab group (docked ) with minimised panels.
8 Tab group (undocked)
9 Bottom pod - a special palette.
If used, work space information (workspace, tool bars,
menus), are copied from $HOME to the user area. Any modifica-
tions are only kept there.
For details see Relationship between the UI files on page 10.
D
24 – 5
Customising FrameMaker 12/13
Download example You can download the example customisation files from my
customisation website.
24 – 6
UI properties
UI properties
Workspaces
A workspace is a saved set of frequently used panels/toolbars
in a desired arrangement for repeated use. It also offers flexi-
bility of screen usage, by allowing a user to place panels in
numerous possible forms/arrangements: default, iconic, mini-
2016-03-29
} Custom workspaces
} Initial workspaces
24 – 7
Customising FrameMaker 12/13
Toolbars
Tool-set The toolbars available for the UI are listed in an xml file which
is referenced in the workspace file (see Relationship between
the UI files on page 10). The standard name is fmtoolbar.xml3).
There may be more toolbar files, but only those listed in this
file are visible in the menu.
fmtoolbar.xml
<?xml version="1.0" encoding="UTF-8"?>
<FMTOOLBARLIST version="1">
<TOOLBAR file="graphics.xml"/>
<SEPARATOR sep_id="0"/>
<TOOLBAR file="quick_access.xml"/>
<TOOLBAR file="structured.xml"/>
<SEPARATOR sep_id="1"/>
<TOOLBAR file="text_format.xml"/>
<TOOLBAR file="table_format.xml"/>
<TOOLBAR file="para_format.xml"/>
<SEPARATOR sep_id="2"/>
<TOOLBAR file="align_object.xml"/>
<TOOLBAR file="object_properties.xml"/>
<SEPARATOR sep_id="3"/>
<TOOLBAR file="trackchanges.xml"/>
</FMTOOLBARLIST>
Toolbar The toolbars themselves are defined in xml files The only tool-
bar which can not be customised is the graphics tool palette.
Toolbars can be docked in the top toolbar pane, to the right
or left of the application window or undocked (floating).
Note: Toolbars containing a drop-down list can not be docked to the
left or right!
24 – 8
UI properties
a
Commands mathcmds.cfg wincmds.cfg mathcmds.cfg mathcmds.cfg
wincmds.cfg wincmds.cfg wincmds.cfg
b
Work spaces Authoring.fws Authoring.fws Authoring.fws Authoring.fws
none.fws c none.fws Blank.fws Blank.fws
Design.fws Design.fws
Manage Graphics.fws Manage Graphics.fws
none.fws none.fwsReview.fws
Review.fws
Structured Authoring…
Menus menus.cfg menus.cfg menus.cfg menus.cfg
menus_review.cfg menus_review.cfg
menus_structured_au- menus_ts.cfg
thoring.cfg
menus_ts.cfg d
Tool bars fmtoolbar.xml e fmtoolbar.xml align_object.xml align_object.xml
graphics.xml quick_access.xml fmtoolbar.xml fmtoolbar.xml
quick_access.xml xpathtoolbar.xml fmtoolbar_review.xml fmtoolbar_review.xml
quick_element.xml xslttoolbar.xml graphics.xml graphics.xml
structured.xml object_properties.xml object_properties.xml
trackchanges.xml para_format.xml para_format.xml
quick_access.xml quick_access.xml
quick_access_review. quick_access_review.
xml xml
structured.xml structured.xml
table_format.xml table_format.xml
tag-description.xml tag-description.xml
text_format.xml text_format.xml
trackchanges.xml trackchanges.xml
Customisation $HOME\ fminit\configue\cusomui.cfg
D
This file contains both menu defintions and (hypertext) command defintions.
a. Commands are located in fminit\configui\interface\view\
b. Work spaces are located in fminit\WorkSpaces\interface\view\
c. none.fws is an empty workspace used if no document or book is open. It can be used to build a custom work
space from scratch. It can refer to a custom menu, but does not honour the definition of a custom toolbar
set — IMHO this is an error.
d. The purpose of menus named menus_ts.cfg is IMHO unclear.
e. fmtoolbar.xml does not define commands and icons for a tool bar, but lists all the tool bars available in this
work space.
24 – 9
Relationship between the UI files
tb-icon_R_M_S.png
… <FrameUI version="1"> quick_element.xml
…
maker.ini
–10
Menus
customui.cfg For FM versions prior to FM-11 all customisation was estab-
lished in the file fminit\configui\customui.cfg.
The possibilities in this file are explained extensively in the
Adobe document Customisation of Frame Products (FM-7).
This file is still required if the menu modifications are to be
visible from the beginning.4)
2016-03-29
$HOME\fminit\configui\
cmds.cfg
sample.cfg
UnStructured\
WYSIWYGView
mathcmds.cfg
wincmds.cfg
$HOME\fminit\WorkSpaces
UnStructured
WYSIWYGView\
Authoring.fws
Blank.fws
Design.fws
Manage Graphics.fws
Review.fws
menus\
menus.cfg
menus_review.cfg
toolbars\
align_object.xml
fmtoolbar.xml
fmtoolbar_review.xml
graphics.xml
object_properties.xml
para_format.xml
quick_access.xml
quick_access_review.xml
D
structured.xml
table_format.xml
tag-description.xml
text_format.xml
trackchanges.xml
24 – 11
Customising FrameMaker 12/13
Customising menus
Customisation To create your custom menu, take the appropriate standard
menu and copy it to a new file. Name this file with a prefix of
your customisation project. For example custom-menus.cfg.
You develop the customisation in a file customui.cfg which is
located in $HOME\fminit\configui\. As long as you have not a
customised menu assigned to a workspace, the menu custo-
misation is only visible during the display of the splash
screen (before you have opened a document or book).
To be available regularly the contents of customui.cfg must
also be appended to a menu file, which is referenced in the
workspace (see Relationship between the UI files on page 10).
To be available also with no document or book open, work-
space $HOME\fminit\WorkSpaces\UnStructured\none.cws must
point to the modified menu file (see table footnote c on page
9):
<FrameUI version="1">
<data type="all" menuFile="custom-menus.cfg" toolbarFile="fmtoolbar.xml"/>
<fm-workspace>
Testing menus You do not need to restart FM to test a modified menu. With
View > Menus > Modify… it can be read into the current
workspace.
Errors in the customisation file are reported in the FM console
window. Even if an error is found, reading and interpreting
the file continues.
Commands in menus In the various existing menus you can find a desired com-
mand for your special menu entry. You may however need to
set up a new command:
Open a file. For example the offline user guide pdf.
Execute a program.
Execute a FrameScript
Execute an ExtendScript
The first two tasks are performed by hypertext commands:
Open a file Hypertext message openfile H:/Adobe/AdobeFrameMaker12/fminit/
configui/FM12-help.pdf
Execute a program <Command ETBfmConsole <Label Console Log File>
<Hypertext message openfile H:/Adobe/AdobeFrameMaker12/
fminit/configui/GetLogFile.exe>>
Hyper-links with relative paths always point to files in the
same directory as the parent file. While for documents this
can be interpreted, it is not clear what it means for menus.
Relative paths do not start in $HOME as in pre-FM9. They start
in the current document folder:
$path[initdir]/fminit does not work (neither upper/lower/
mixed case, nor with path in quotes or double quotes).
For addressing scripts see Note concerning scripts on page 23.
Execute a FrameScript <Add iFrameMultiCatalog <Menu FormatMenu>>
Execute an ExtendScript <Add ImportFormatsSpecial <Menu FormatMenu>>
24 – 12
Menus
customui.cfg In a plain vanilla FM installation this file does not exist (or it
is empty). Hence you need to create it. This file must be in
Windows code page (cp 1252), not in UTF-85)!
E:\_DDDprojects\FM-toolbar00\AllETB\etb-customising-fm12.fm
Modify the relevant menu The customisation by customui.cfg is only active when no
document or book is open 6).
In our case the menu to be modified is menus.cfg. The file
contents of customui.cfg must be appended to the relevant
menu of the workspace to be available for open documents or
books.
Since it is not a good idea to just modify a standard menu, we
copy it to menus_custom.cfg and then add the contents of
customui.cfg to this file.
24 – 13
Customising FrameMaker 12/13
Toolbars
Customising Toolbars
Customising toolbars or creating new toolbars is more elabo-
rate then customising menus, because more files are involved
(See Relationship between the UI files on page 10):
The toolbar file itself (e.g. custom-tb.xml).
The list of toolbars in fmtoolbars.xml.
The icons needed for the toolbar.
Probably a workspace file Custom.fws to refer to the cus-
tomised tool bar (and probably also customised menu).
Note: Toolbars containing a drop-down list can not be docked at left
or at right to become oriented vertically!
Example toolbar
Note: This example is part of the download of FM-customisation-
example.zip.
The following is an example toolbar with all types of widgets.
We want to integrate it into the workspace Custom.fws already
used for the menu customisation.
Invoke ExtendScript
Invoke FrameScript
Command
Drop-down list
Command
24 – 14
Toolbars
File example-tb.xml This file describes the contents of the toolbar. This example
references standard commands as well as a FrameScript and
an ExtendScript.
These files are available in the already mentioned download.
<!-- simpleversion="1.0"
1 <?xml ExtendScript encoding="UTF-8"?>
-->
2016-03-29
Toolbar commands When setting up a toolbar you need to have an idea which
commands to use. Get the exact names from the appropriate
menus (see Configuration files on page 17) or from a command
D
Note on drop-down lists More than one drop-down list can appear in a tool bar 7):
24 – 15
Customising FrameMaker 12/13
Toolbar icons The button images use a base name to avoid listing all 8 vari-
ants (large/small, colour/monochrome, normal/rollover).
Standard icons These (e.g. P_TextAlignLeft_Md) are located in fmres.dll or
owlres.dll of FrameMaker. Names of these can be deducted
from existing tool bars or from my web site (look for “tool bar
resources”).
Custom icons Those named etb-xxx and tst-xxx are custom icons which
must reside in the user area (no subdirectory possible).
Integrating toolbar into The toolbar will appear in menu View > Toolbars. There you
workspace activate it and it will initially float around.
The workspace mechanism has assumed a certain width of
the toolbar which can be adjusted with the lower resize han-
dle:
Docking handle
Resize handle
Custom workspace You may also update the Custom workspace as defined in
Customising menus on page 12 and modify it to directly use
the custom tool set:
<data type="all" menuFile="menus_custom.cfg" toolbarFile="Custom_toolset.xml"/>
24 – 16
Configuration files
Configuration files
Configuration files define both commands and menus. These
files still have the format as in previous FM versions. That is,
they are named xxx.cfg and use the well-known MIF syntax
(not xml).
The names of these configuration files are specified in the ini-
tialisation file for FrameMaker (see [Files] in maker.ini).
2016-03-29
$HOME\fminit\configui:
File Contents
cmds.cfg General commands, Escape sequences
mathcmds.cfg Commands for the Equation Editor
wincmds.cfg Platform dependent commands, definition of shortcuts
24 – 17
Customising FrameMaker 12/13
Initialisation sequence When FrameMaker starts, it first reads the standard menu and
command configuration files and then a customisation file 8).
The information in each file overrides the information in files
read previously. Hence the following order is necessary:
1 Definition of the commands.
2 Modification of labels, shortcuts.
3 Definition of a menu item referring to a command.
4 Order of the menu item or sub menu within parent menu.
24 – 18
Configuration files
9 Please note that even a plain vanilla FrameMaker installation will create
a huge number of such messages, because definitions are ‘overloaded’. It
may be difficult to find real errors this way …
10 I’m not certain whether this method with View > Menus > Modify…
works reliably in FM-11 and beyond. We have now at least two modifica-
tion files…
24 – 19
Customising FrameMaker 12/13
TOOLBAR This tag defines the toolbar and is a wrapper for the items on
the toolbar.
Syntax <TOOLBAR attributes />
tool tags (ACTION, DROPDOWN, …)
</TOOLBAR>
Attributes file File name of the toolbar, if the description is to be
picked from somewhere else. If this attribute exists
no other attributes are parsed here.
This attribute is not present in any of the Adobe
toolbars up to FM-13.
id Unique identifier for the toolbar, for workspace
identification, FDK access and API notifications
name Name of the toolbar as visible in the menu.
This may contain character entities, for example
name = "Paragraphs #amp; Characters"
orientation Keyword defining the default orientation of the
toolbar:
horizontal: Default orientation is horizontal.
vertical-narrow: Default orientation is vertical and
the items are arranged in a single col-
umn.
vertical-wide: Default orientation is vertical and
the items are arranged in two col-
umns.
dock Keyword defining the preferred/default dock (cur-
rently horizontal toolbars can be docked only at
the top):
24 – 20
Tags in toolbar files
none)
readOnDocChange I have no idea, what this is good for. Found
only in quick_element.xm.
Tool tags
E:\_DDDprojects\FM-toolbar00\AllETB\etb-customising-fm12.fm
24 – 21
Customising FrameMaker 12/13
DROPDOWN This is used to (generally) define a menu whose sub items are
a list of options that can be chosen one at a time, for example,
fonts.
Syntax <DROPDOWN attributes />
Attributes command Identifier of an already defined FM Menu - required
field"
tooltip Tool tip that is displayed on mouse hover (default=
name of the drop-down)
help Help String for the drop-down command (default=
none)
Note: There is no width indication for this widget. The width is
assumed by the workspace mechanism. If more than one drop-
down list appears in a tool bar then resizing ins applied to all
proportionally.
Detail tag
Detail tags are optional. Currently only the IMAGE tag is in this
category.
24 – 22
Tags in toolbar files
Toolbar commands
See also section Commands on page 27.
All the menu items/commands that end up executing an FCode
can be used here. Hence hypertext commands can not be
used. However, scripts (FrameScript, ExtendScript) can be ref-
erenced. See Example toolbar on page 14.
24 – 23
Customising FrameMaker 12/13
Toolbar icons
Standard icons Icons for toolbars and for the dialogues are located in
resource files: fmcustom.dll, fmres.dll, owlres.dll. fmdlg.dll
and are not relevant in this context.
Names of such icons can be deducted from existing tool bars
or from my web site (look for “tool bar resources”).
Custom icons If images are needed, which are not in these resources, they
must be of type png (Portable Network Graphic) and be
located in the user-area (in the same directory as maker.ini).
Hovered (roll over) icons are framed. When clicked the icon it
gets a darker background. Hence the icons must be transpar-
ent.
Large and coloured icons Since FM-12 both large and/or coloured icons are supported.
Regular sized icons are 18×18 pixels, large icons are 26×26
pixels. Hence the maximum number of icon images is 8.
You can have 8 image files for the following possible combi-
nations of preferences with base name e.g. xyz:
Preferences Icon names
Size Colour Normal Rollover
Size Colour Normal Roll over
Large (L) Coloured (C) xyz_C_L.png xyz_R_C_L.png
Greyscale (M) xyz_M_L.png xyz_R_M_L.png
Regular (S) Coloured xyz_C_S.png xyz_R_C_S.png
Greyscale (M) xyz_M_S.png xyz_R_M_S.png
In most cases the R_X_X forms are copies of the _X_X forms.
Using icon-images 1 Add the base name of the icon in the base attribute of the
image element.
<ACTION command="RepeatLastParaCommand"
tooltip="Repeat last ¶ command [F4]">
<images base="etb-para-repeat" />
</ACTION>
2 Create at least 2 icon images for normal and rollover state
of the icon. For example if the icon name is xyz the image
names will be xyz_C_S.png and xyz_R_C_S.png. (Here, C= col-
our, S=regular, and R=rollover.) If, however, your icon pref-
erences are set to have large or greyscale icons instead of
regular and colour, you will use M and L in the icon names.
3 You can further add more icon files for icon states, such as
dark_normal and dark_rollover by specifying attributes
with data in the relevant element. For example:
<ACTION command="CenterPara">
<images base="P_TextAlignCenter_Md"
dark_normal=”<icon_name>.png” <!-- regular size -->
dark_rollover=”<icon_name>.png”
dark_normal_l=”<icon_name>.png”<!-- large size -->
dark_rollover_l=”<icon_name>.png”
/>
/>
24 – 24
Tags in toolbar files
Example icons These are all from fmcustom.dll, base name = P_AddRows
S - Regular (18 × 18) L - Large (26 × 26)
C - Coloured M - Grey C - Coloured M - Grey
Normal Roll over Normal Roll over Normal Roll over Normal Roll over
_C_S _R_C_S _M_S _R_M_S _C_L _R_C_L _M_L _R_M_L
2016-03-29
Default icons The result of missing images depend on the ‘severity’ of the
E:\_DDDprojects\FM-toolbar00\AllETB\etb-customising-fm12.fm
problem:
If size does not fit, the defaults are boxes with text in them:
Tool bar icons and A workspace defines the toolbars to be active in it.
workspaces
References to all sorts of icons (small/large, grey/coloured)
exist in the tool bar.
The size and colour of icon to be displayed is only defined
in Preferences > Global > Interface > Icons.
If you do not see coloured icons after switching to a work-
space which should have them, check your settings in
Preferences. After changing these preferences a restart of
FrameMaker is required.
Contents of the resource With the new UI two additional resource files were intro-
files in fminit duced: owlres.dll and owlres.res. These contain png images
which are not handled by (to me) known resource editors.
Also fmcustom.dll now contains png images, no more bit maps
(bmp).
File Icons, pictures Dialogues Other
D
fmcustom.dll Images for toolbar also icons for the panels none version info
and graphic toolbar. 2 to 8 variants per image.
fmdlg.dll Rubi-bit maps [bmp]. Many new items (panels) classic dialogues, panels, Icongroup (icons for the dia-
panel-lists logues) version info; 500 (?)
fmres.dll Button images for dialogues, palettes and pan- none Cursor group (32x32 cursors);
els (16x16), [bmp]. Some items no more used Icongroup (icons in panels etc.)
owlres.dll Images for the new toolbars [png]. 2 to 4 vari- C-like definitions for appli- Xstr (strings with all text in xml
ants per image. This file is new with FM-9 cation bar a , grafix bar, UI notation); version info (correct)
preference dialogue etc.
a. This relate to functions to the right of the menu bar (UI visibility, Arrange documents, Screen mode)
24 – 25
Customising FrameMaker 12/13
Extract icons
To get the icons out of the DLLs – to have individual files to
work on for the tool bar buttons – my procedure is the follow-
ing:
24 – 26
Commands
Commands
There are three command files in $HOME\fminit\configui:
cmds.cfg
mathcmds.cfg
wincmds.cfg
In the various views there are different versions of these files,
since not all commands are relevant in a particular view.
2016-03-29
Command examples
For explanation of the keywords see Command statements on
page 28.
Normal command <Command NewDocument Name of the command
<Label Document...> What you see in the menu
<KeySequence \!fn> Shortcut (ESC sequence)
<Definition \x300> FCODE, the command definition
<Mode All>> Valid contexts for this command
Command with restricted <Command SelectAll
context <ReservedLabel Flow Select All in Flow>
<ReservedLabel Frame Select All in Frame>
<ReservedLabel Page Select All on Page>
<KeySequence \!ea>
<Definition \x327>
<Mode All>>
Modify the shortcut <Modify SelectAll
<KeySequence ^a> >
… and indicate it in the menu <Modify SelectAll
<KeySequenceLabel CTRL+A> >
Combine these two <Modify SelectAll
modifications <KeySequence ^a>
<KeySequenceLabel CTRL+A >>
D
24 – 27
Customising FrameMaker 12/13
Command statements
Command The command statement is the wrapper definition for the
command:
Syntax <Command cmd-name <detail1> <detail2> <detailn>>
Details may be added to a command also by the Modify
statement on page 29.
Cmd-name A unique name of the command. This serves as a reference
between the various statement types.
Details For the detail specifications see Command details on page 30.
Examples See also Command examples on page 27.
<Command PrintingDisplay
<ReservedLabel Document &Printing Display>
<KeySequence \!qqp >
<KeySeqLabel Esc q q p>
<Definition \x4F1 \x4F2 \x4F3 \x3F8>
<Mode All>>
Note: This command is defined by 4 function codes which imposes
some problems. See the remark at Multi-code commands on
page 35.
Custom command A custom command must not use an already existing name.
Hence it is good practice to prefix the name with an indicator,
for example:
<Command ETBVertToolBar …> Enhanced Toolbar
<Command _MTCharSet …> Microtype’s Customisation
ShiftCommand This statement defines a command for a menu item that is
chosen while the Shift key is held down. This statement nor-
mally appears in a menu file (not a command file).
Syntax <ShiftCommand cmd-unshifted cmd-shifted>>
Cmd-unshifted This is the identifier of the command as it normally appears.
Cmd-shifted This is the identifier of the command you want to appear
when you hold down the Shift key.
Examples <ShiftCommand Save SaveAll>
<ShiftCommand FindNext FindPrevious>
Note: 12)Commands defined by ShiftCommand can not be placed in
context menus. The insertion of the command (by Add) does not
create an error, although the command is not inserted. A fur-
ther Order command will not find the (not) inserted command
and create an error. Example creating the error:
<ShiftCommand GraphicsObjProps GraphicsPickObjProps> ...
<Add GraphicsPickObjProps <Menu !GraphicsContextMenu>>
<Order !GraphicsContextMenu.GraphicsPickObjProps
<After !GraphicsContextMenu.GraphicsObjProps>>
Remove You can not remove commands. Only the menu entry is
removed.
Syntax <Remove cmd-name <Menu menu-id>>
Examples <Remove GraphicsReshape <Menu GraphicsMenu>>
<Remove GraphicsReshape <Menu QuickGraphicsMenu>>
24 – 28
Commands
Modify statement
Modify The Modify statement is used to change details of a com-
mand. This command must be defined already. The change
may affect:
the label(s)
the key sequence aka shortcut(s)
the key sequence label(s)
2016-03-29
24 – 29
Customising FrameMaker 12/13
Command details
Definition This defines the function of the command.
Syntax <Definition Fcode1 [Fcode2 … Fcoden]>
Fcode The function code is the connection between the command
and the routine in the application which performs the func-
tion. A command may issue several functions, although most
commands have only one Fcode associated.
The Fcode is noted as \xnnn with nnn being a hexadecimal
number. You can find relevant Fcodes in the FDK 14) documen-
tation or in the command files or in special lists derived from
these files.
Examples <Definition \x300> Create new document
<Definition \x302> Command Help
<Definition \x3F1 \x3F2 > Borders and Text symbols On
Label The label defines the entry in a menu. It also provides a
default for tool tips on buttons using this command.
24 – 30
Commands
Context-id Condition
Ditamap Ditamap is active
Document Document is active
Flow Flow is selected
Frame Frame is selected
Generic Set up any generated file
History History window
2016-03-29
Label string The same rules as with the Label detail apply. See Label on
page 30
Example <Command SelectAll
D
24 – 31
Customising FrameMaker 12/13
24 – 32
Commands
Descriptive string This echoes the key sequence of the command. You should
distinguish the two cases of key sequences by different nota-
tion:
Key group Key names concatenated with a ‘+’ sign.
Key sequence A list of key-names (separated by blank or
comma).
Examples <KeySeqLabel CTRL+A> Key group
<KeySeqLabel Escape, q, q, e> Key sequence
2016-03-29
24 – 33
Customising FrameMaker 12/13
18 For example: The shortcut !ph in file FMPublisher overrides one or more
previous shortcuts.
19 For example The shortcut !SFL in file
$HOME\fminit\configui\structured\wysiwygview\wincmds.cfg is a dupli-
cate of an existing shortcut.
20 Lynne Price, 2014-10-23
24 – 34
Commands
Multi-code commands For multi-code commands only two of the three UI elements
may be defined: button, menu item, shortcut. If all three are
defined, then only the first code will be executed.21)
For the following no menu item will be defined:
<Command EditingDisplay
<ReservedLabel Document &Editing Display>
<KeySequence \!qqe >
<KeySeqLabel Esc q q e>
<Definition \x3F1 \x3F2 >
2016-03-29
<Mode All>>
And for the following only a menu item (and no shortcut or
button) will be defined:
<Command ETBGoToMasterPage
<Definition \x343 \x345 >
<Label Go to a Specific Master Page... >>
<Add ETBGoToMasterPage <Menu ViewMenu>>
<Order ViewMenu.ETBGoToMasterPage
E:\_DDDprojects\FM-toolbar00\AllETB\etb-customising-fm12.fm
<Before ViewMenu.ViewMasterPages>>
<Mode All>>
Standard mode (UI, normal <Command SceenModeStandard
size) <Label Standard Screen Mode>
<KeySequence \!SMs>
<Definition \x979>
<Mode All>>
Full width with UI <Command ScreenModeFullWithUi
<Label Full Screen Mode with UI>
<KeySequence \!SMu>
<Definition \x97A>
21 This is a problem since FM-9 and is most likely a consequence of the new
user interface.
24 – 35
Customising FrameMaker 12/13
<Mode All>>
Full screen, no UI <Command ScreenModeFullScreen
<Label Full Screen Mode>
<KeySequence \!SMf>
<Definition \x97B>
<Mode All>>
Peferences > Interface <Command UiPreferences
<Label Interface...>
<KeySequence \!ip>
<Definition \x980>
<Mode All>>
Preferences > Alert Strings <Command UiAlertStringsPreferences
<Label Alert Strings...>
<KeySequence \!asp>
<Definition \x981>
<Mode All>>
Show all tool bars <Command ToolBarShowAll
<Label Show All>
<KeySequence \!TSA>
<Definition \x989>
<Mode All>>
Hide all tool bars <Command ToolBarHideAll
<Label Hide All>
<KeySequence \!THA>
<Definition \x98A>
<Mode All>>
24 – 36
Commands
Viewer popup command The commands for the viewer also work in the ordinary edit
window:
Command KeySequence Definiiton
GotoNextPage \!pn \x34D
GotoPreviousPage \!pp \x34C
GotoFirstPage \!pf \x340
GotoLastPage \!pl \x341
2016-03-29
24 – 37
Customising FrameMaker 12/13
ExtendScript
Note: This example is part of the download of FM-customisation-
example.zip.
ExtendScript simple.jsx contains the following statements
and thus
/ creates the commands listed below.
6 #target framemaker
7
8 var msg1 = "JavaScript alert message\nYou always get an i
9 var msg2 = "FrameMaker Alert dialogue\nIcon/Buttons depen
10
11 // set up menu with just two items
12 var mMenu = app.GetNamedMenu("!MakerMainMenu");
13 var simpleMenu = mMenu.DefineAndAddMenu("Simple", "Alerts
14 simpleMenu.DefineAndAddCommand(1,"msgJS","JS alert","");
15 simpleMenu.DefineAndAddCommand(2,"msgFM","FM Alert","");
16 UpdateMenus();
17
18 // watch the suptle difference in syntax: alert | Alert
19 function Command(cmd){
20 switch(cmd) {
21 case 1:
22 alert (msg1, "Message title");
23 break;
24 case 2:
25 Alert(msg2, Constants.FF_ALERT_CONTINUE_NOTE);
26 break;
27 }
28 }
Command name Command label FCode
msgJS JS alert 18B0DF0
msgFM FM Alert 18C0DF0
You see that there is no relation between the script file name
and the command names.
24 – 38
Commands
FrameScript
Note: This example is part of the download of FM-customisation-
example.zip.
Ordinary scripts get generic names (ESLRUNxxx) which may
change form FrameMaker start to start. Hence a menu or tool
bar using these can not be distributed to other installations.
Command name Command label FCode
ESLSSRUN306 Primitive 18E0DF0
2016-03-29
Initialize.
It is good practice to remove the menu with Event
Terminate.
A menu item is not necessary, if the command is used in a
toolbar only.
Installing FrameScript primitive.fsl containing the following
statements creates the command MyCommand1.
g p
13 // A menu item is not necessary, for example if the comma
14
15 // --- Set up a command name and the event trigger
16 Event Initialize
17 // Get Object Type(Menu) Name('!MakerMainMenu') NewVar(gv
18 // New Menu Label('My Menu') NewVar(gvMyMenu) AddTo(gvMai
19 New Command Name('MyCommand1') Label('My Command 1')
20 EventProc(evtCmdEvent) NewVar(gvMyCmd1) // AddTo(gvMyM
21 EnabledWhen(EnableAlwaysEnable)
22 EndEvent
23
24 // --- Remove command and menu at de-installtion time
25 Event Terminate
26 // Remove CommandObject(gvMyCmd1) From(gvMyMenu);
27 // Remove MenuObject(gvMyMenu) From(gvMainMenu);
28 EndEvent // Terminate
29
30 // --- The event procedure is the real task
31 Event evtCmdEvent
D
32 If ActiveDoc = 0
33 MsgBox 'No active document --- Nevertheless: Welcome to
34 Else
35 MsgBox 'We have a document open --- Eventhough: Welcome
36 EndIf
37 EndEvent // evtCmdEvent
The installed script gets the following properties:
Command name Command label FCode
MyCommand1 My Command 1 A0DF0
Note: Be aware that the FCodes generated for the script may differ
from FM session to FM session! Hence do not use them.
24 – 39
Customising FrameMaker 12/13
Since this example script has no menu entry, you do not see
an action of it as long as you do not have a toolbar with a but-
ton …
24 – 40
Commands
Menu statements
Note: Commands do not need a corresponding menu entry. They
may be invoked by a keyboard short cut or a button only.
Reserved menu Many of the menus defined in the standard menu files for
FrameMaker are reserved menus. FrameMaker has intrinsic
knowledge about reserved menus; it can refer to these menus
directly by name.
Syntax <ReservedMenu !menu-name <Label menu-label>>
E:\_DDDprojects\FM-toolbar00\AllETB\etb-customising-fm12.fm
!RulerAlignMenu
!RulerControlMenu Formatting bar: commands !ShowRulerToggle,
!ShowRulerAlignmentSpacingAndTabs and !ShowRulerParagraphTags –
all with an empty defintion (\x0).
!RulerParaMenu ¶-formats pop-up menu in the formatting tool bar
!RulerSpaceMenu Line-spacing pop-up menu in the formatting tool bar
a Structure menu bar (structured product interface only)
!StructureViewMainMenu
a View-only menu bar
!ViewOnlyMainMenu
a. Not used in any of the FM-13 *cfg files - depreciated?
24 – 41
Customising FrameMaker 12/13
Context menus The default context menu for a particular selection does not
contain every possible command. If a menu item is not appli-
cable to the selection and the current state of FM, he menu
item will be dimmed.
Context menus can not contain shifted commands. See
ShiftCommand on page 28).
Context menus can also be displayed by pressing Shift+F10.
In this case, the appearing menu depends on whether there
exists a selected object, an insertion point, or neither.23)
Context menu id Object providing the context
!AnchoredFrameContextMenu an anchored frame
!AutoSpellCheckContextMenu
!BookContextMenu a book window
!DocumentContextMenu the document as a whole (no active insertion point and nothing selected)
!EmbeddedObjectContextMenu an OLE object
!GraphicsContextMenu all graphic objects except an anchored frame
!MathContextMenu an equation
!MultiGraphicsContextMenu any grouped graphic object
!QuickBookContextMenu a book window when Quick Menus is the current menu set up
!StructureContextMenu the Structure View in FrameMaker+SGML
!StructuredTextContextMenu text in a structured text flow in FrameMaker+SGML
!TableContextMenu a table
!TableTextContextMenu text in a table
!TextContextMenu text
!TextLineContextMenu text line selected as text
!TextLineGraphicContextMenu text lines selected as graphic objects
!ViewerPopup a View-only document window
!ViewOnlyBookContextMenu a View-only book window
!ViewOnlyDitamapContextMenu DitaMap
!ViewOnlyDitamapContextMenuCon
tainer
TableMenuInTextContextMenu
23 This table is deducted from the various cmdxxx.cfg files of FM-13. See
also FP_EnabledWhen value in the FDK reference.
24 – 42
Commands
the menu.
Syntax <Order menu.new-item <First menu>>
<Order menu.new-item <Last menu>>
<Order menu.new-item <Before menu.ref-item>>
<Order menu.new-item <After menu.ref-item>>
Menu The menu we are talking about, defined by a Menu statement.
New-item The item to be placed. It has been defined in the menu.
E:\_DDDprojects\FM-toolbar00\AllETB\etb-customising-fm12.fm
Ref-item The reference item in menu relative to which the new item is
inserted.
Examples <Order !TextLineContextMenu.SpecialCharsContext
<Before !TextLineContextMenu.Undo>>
<Order !TextLineContextMenu.Separator1
<Before !TextLineContextMenu.Undo>>
<Order ViewMenu.ViewGraphicsOn
<Before ViewMenu.Separator3>>
D
24 – 43
Customising FrameMaker 12/13
Workspace definition
Workspaces are defined in files xxx.cfws (current) and xxx.fws
(last saved). In most cases we need not create or modify
(besides line 2) such a file.
Modify or create Menus and toolbars appear in a view due to the file location
workspace of them. Multiple workspaces can be defined for a particular
view. Activating a newly introduced toolbar (docked or
undocked) modifies the current workspace, which can be
saved to a new name.
1 <FrameUI version="1">
2 <data type="all" menuFile="custom_menus.cfg" toolbarFile="custom_toolset.xml"/>
3 <fm-workspace>
4 <workspace version="1">
5 <dock anchor="left" content="palette toolbar" is-closed="false"/>
6 <dock anchor="right" content="palette toolbar" is-closed="false">
7 <tab-pane mode="expanded" preferred-iconic-length="0" layout-mode="auto-flow">
8 <tab-group active-palette="00070CB2" is-closed="false">
9 <palette id="00070CB2" is-closed="false" preferred-unconstrained-size="135
10 <palette id="00060F46" is-closed="false" preferred-unconstrained-size="135
11 <palette id="000A10CE" is-closed="false" preferred-unconstrained-size="135
12 <palette id="00060BAA" is-closed="false" preferred-unconstrained-size="135
13 </tab-group>
14 <tab-group active-palette="00060DD6" is-closed="false">
15 <palette id="000C1118" is-closed="false" preferred-unconstrained-size="317
16 <palette id="00060DD6" is-closed="false" preferred-unconstrained-size="359
17 </tab-group>
18 </tab-pane>
19 </dock>
20 <dock anchor="top" content="multi-control-bar" is-closed="false">
21 <control-bar-pane >
22 <control-bar id="00060B9A" origin="4 35" size="858 34" is-closed="false" app-
23 </control-bar-pane>
24 </dock>
25 <dock anchor="bottom" content="palette" is-closed="false"/>
26 </workspace>
27 </fm-workspace>
28 </FrameUI>
Key in the workspace file are the palette and control-bar
statements, which hold various information about the panels
and toolbars.
Note: For customisation we are normally only dealing with the sec-
ond line which defines the menu set and the toolbar set.
Be aware that xml comments are removed from workspace
files!
Size of toolbar Only if a drop down box appears in the toolbar you may need
to adjust the size parameters in the control-bar statement.
You do this after the workspace file has been created. Nor-
mally you adjust the parameters size = preferred-size and
then minimum and maximum.
<control-bar id="004C0966" origin="874 31" size="255 34" is-closed="false" app-
24 – 44
Workspace definition
Custom menu If you want to refer to a custom menu you will change the ref-
erences in line 2, for example
from
<data type="all" menuFile="menus.cfg" toolbarFile="fmtoolbar.xml"/>
to
2016-03-29
Custom toolbar set If you want to refer to a custom toolbar set, you will change
the references in line 2, for example
from
E:\_DDDprojects\FM-toolbar00\AllETB\etb-customising-fm12.fm
24 – 45
Customising FrameMaker 12/13
Other ini files Special features are supported by additional ini files 24):
Initialisation file Purpose, used by
AuthorView.ini Set-up of the Author View
ditafm-output.ini Set-up for DITA output processing
ditafm.ini Set-up for DITA processing
DynaHelpPreview.ini Publisher: Dynamic Help extension
MathFlowPlugin.ini Set-up of the none-Adobe plug-in MathFlow
ModalDialogPosition.ini Save the current positions of the modal dialogues
pdfsize.ini Settings from Format > Document > Optimise PDF
Size > Options
SkinGallery.ini Publisher: skins (WebHelp, WildFire, AirHelp)
sqPalmXmlViewer.ini Publisher: Palm xml viewer
sqSkin.ini Publisher: sqSkin extension
WHATSTHS.INI Set-up for the What’s This function of Publisher
XmlCodeView.ini Set-up of the XML Code View
24 – 46
Initialisation files maker.ini and others
Entries in ini files To a void redundancy I do not list the entries of maker.ini
and other ini files here. Look at www.daube.ch for a main-
tained list.
Note: Since FM-12 Adobe maintains a document describing the
entries in maker.ini - See Help > Help Topics > 5 th icon
(FrameMaker Help Center) > FrameMaker Resources.
2016-03-29
E:\_DDDprojects\FM-toolbar00\AllETB\etb-customising-fm12.fm
D
24 – 47
Customising FrameMaker 12/13
24 – 48