## Configuring Amaya

Amaya uses different configuration files to get initial values for global parameters, dialogs, shortcuts, window size and position, user's style sheet, etc. You can change most of the configuration parameters by means of specific preferences menus. This document gives a walk-through of the different preference menus, then gives more specific information on how to configure the keyboard shortcuts.

## Conventions

### The Amaya/Config directory

This is the directory where most of the default values and all the dialogue messages are stored. The directory's parent is the one where you installed Amaya.

### The AmayaHome Directory

Amaya stores the user preferences as well as other user configuration files in a directory which we call the AmayaHome directory. The following table shows where this directory is stored under different architectures:

architecture | AmayaHome directory
Unix | $HOME/.amaya
Windows 95/ Windows 98 | AMAYA-INSTALL-DIR\users\username or, if the user didn't login to Windows, AMAYA-INSTALL-DIR\users\default
Windows NT | c:\winnt\profiles\username\amaya

The AmayaHome directory is preserved even when installing new versions of Amaya and may contain the following files:

- thot.rc : the user preferences, changed through the preferences menu.
- amaya.keyboard (Unix) or amaya.kb (Windows) : this file defines Amaya keyboard shortcuts.
- amaya.css : contains the user's style sheet.
- dictionary.DCT : Amaya provides a multilingual spell checker. By default the spell checker works with two dictionaries: the English dictionary and the French dictionary (these two dictionaries can be downloaded from W3C servers). When the user wants to register a new word, the spell checker creates or updates the "user's personal dictionary".

Note: the amaya.keyboard/amaya.kb and amaya.css files are loaded at launch time. If you change them, you will need to quit and restart Amaya to take them into account.

### The AmayaTemp Directory

Amaya stores all the temporary files it creates during its execution in a directory which we call the AmayaTemp directory. The following table shows where this directory is stored under different architectures:

architecture | AmayaTemp directory
Unix | $HOME/.amaya
Windows | c:\temp\amaya (default value)

Amaya creates files in this directory while browsing remote documents or printing a document. The cache is stored in this directory. The user may change both the AmayaTemp and cache directories by means of the General Preferences and Cache menus.

Amaya always tries to delete all the temporary files it creates. However, if Amaya crashes, the temporary files will not be deleted. This will not impact subsequent executions of Amaya.

## The Preferences Menus

These menus are found under the Special/Preference menu. There are five different preference menus available: general, publishing, cache, proxy, colors, geometry, profiles, and templates. In all of these menus, we find three common action buttons:

Apply
  This button will validate and store the options shown in the menu.
Defaults
  This button will restore, but not save, the default values. You need to use the Apply button to validate the options.
Done
  This button dismisses the menu.

### General preferences

Amaya user directory (Windows platforms only, not shown in the included figure)
  Specifies the directory where the user preferences are stored.
  Note: the user can't change the location of this directory.
Amaya temporary directory (Windows platforms only, not shown in the figure)
  Specifies the directory where Amaya will store its temporary files, for example, while printing a document. If not specified, the default temporary directory will be `c:\temp`.
  Note: changing this directory will not erase the previous one. You will have to remove the old directory manually. If the cache was located under the previous temporary directory, a new cache will be created under the new directory.
Home Page
  Specifies the URI that Amaya will load when launched or when the user presses the home page button. An example is `http://www.w3.org`.
  Note: A complete URI must be used.
Double click delay (Unix platforms only)
  This option allows one to control the delay under which two mouse clicks are classed as a double-click. This option is only taken into account at launch time.
Menu Font size (Unix platforms only)
  Specifies the font size of all the Amaya menus. This option is only taken into account at launch time.
Font Zoom
  It's possible to zoom in and zoom out, document window by document window. Each document (text and images) displayed within a zoomed window will be displayed larger or smaller than its real size according of the current zoom.
  That option allows you to change the default font zoom for all winodws. This change affects only font sizes but not images and is reflected immediately in all open document windows.
Dialogue language
  Specifies the language for all of Amaya's menus and dialogue messages. The default language is American English (value `en_US`). At the present time only three alternate languages are available: English (`en`), French (`fr`), and German (`de`). When launched, Amaya loads dialogue files according to the current dialogue language: en-, fr-, or de- files. These dialogue files are located in the Amaya/config directory.

  In Thot, a document is specified according to a schema. In Amaya, the dialogue messages that are displayed when parsing a document or when saving it under a specific schema are located in the Amaya/amaya/HTML.code file, where the code suffix is a language abbreviation (e.g. `en` or `fr`). This file has 4 sections:

  - extension: not used by Amaya
  - presentation: not used by Amaya
  - export: give the text displayed for each translation schema ("Save As" command)
  - translation: give the text displayed for each element and attribute in the Thot HTML structure.

  It is possible to adapt Amaya to new ISO-Latin-1 languages by writing corresponding dialogue files. These dialogue files have to be located in the same directory (i.e. Amaya/config) and must use the correct ISO 639 code as a prefix (it- for Italian, de- for German, etc.). The specific HTML.code file also has to be created.

Enable multi-key
  dT`doptional input method (Multi-Key) is based on a two key sequence beginning with the "accent" followed by the "letter". For example to obtain a 'ã' first press '~' then type 'a'. To obtain a '~' you have to press '~' twice. The table below gives available key sequences:

  accent-letter | ~ | ` | ' | " | * | ^
  a A | ã Ã | à À | á Á | ä Ä | å Å | â Â
  c C |  | ç Ç |  |  |  |
  e E |  | è È | é É | ë Ë |  | ê Ê
  i I |  | ì Ì | í Í | ï Ï |  | î Î
  n N | ñ Ñ |  |  |  |  |
  o O | õ Õ | ò Ò | ó Ó | ö Ö | ø Ø | ô Ô
  u U |  | ù Ù | ú Ú | ü Ü |  | û Û
  y Y |  | Ý | ý Ý | ÿ |  |

Show background images
  Controls whether background images should be shown. This option is only effective when loading a new document.
Double click activates link
  Since the first version of Amaya, users need to double click on a link to activate it. This allows one to differentiate between the edition of a link or its activation. You can override this behavior by deactivating this option.

### Publishing preferences

Use ETAGS and preconditions
  HTTP/1.1 introduces new headers that allow to avoid the lost updates problem when publishing. With this mechanism, you can detect conflicts when two users are publishing the same document.
Verify each PUT with a GET
  If you don't trust your server, this option tells Amaya to retrieve each document as soon as it has been published and compare it with the copy stored in your workstation. If the documents differ, Amaya will warn you.
Default name for URLs finishing in '/'
  An HTTP server usually associate the URLs that finish in '/' with a default name, e.g., Overview.html. This option allows you to specify the default name that Amaya should use when publishing such a URL. Please consult with your Webmaster to find out what the default name is for your server.
Allow automatic PUT redirections on these domains
  According to theHTTP/1.1 specification, PUT operations should not be automatically redirected unless it can be confirmed by the user, since this might change the conditions under which the request was issued. You can avoid having Amaya prompt you with a PUT redirection warning by entering the name of the server's domain to which you are publishing. You may specify one or more domains, each separated with a space, e.g., `www.w3.org groucho.marx.edu`.

### Cache preferences

Amaya provides a cache through libwww. By default, the cache is enabled by default and is stored in the AmayaTemp/libwww-cache directory. This menu also provides a Flush Cache button, for erasing the cache directory.

Enable cache
  Activates or deactivates the cache
Cache protected documents
  By default, documents which are protected by a password are stored in the cache. You can use this flag to override this behavior.
Disconnected mode
  Always retrieves documents from the cache.
Ignore Expires: header
  Does not expire cache entries.
Cache directory
  Gives the parent directory for the libwww-cache directory. Note that changing this directory does not erase the contents of the previous one. You will have to remove it yourself.
Cache size
  Gives the size, in megabytes, of the cache repository.
Cache entry size limit
  Gives the maximum size for a cache entry.

### Proxy preferences

You can specify a proxy and a set of domains which should be accessed without a proxy by means of this menu.

HTTP proxy
  Gives the proxy that should be used for HTTP requests. The syntax is similar to that of a URL (note that there's no end '/'):

      HTTP_PROXY=http://groucho.marx.edu:1028
                      proxy FQDN --^    ^---- optional proxy port

No proxy on these domains
  Gives a list of space separated domains which you want to access directly, without a proxy:

      NO_PROXY=harpo.marx.edu zeppo.marx.edu chico.marx.edu
          FQDN --^           ^--- space separated entries

### Color preferences

This menu allows you to change the foreground and background colors for the document. The Unix version also provides entries for changing the menu colors. To change menu colors under Windows, you will need to use the standard Windows configuration control, found in the Control Panel directory.

Note: the color changes will be effective when you open a new document window or when reloading a document.

Under Windows, you can select colors by means of a color palette. The Unix interface is a bit clumsy for the moment and you have to type in the color name. If you type an invalid color name, the default colors will be used instead.

Setting or changing colors for links, visited links, and active links is done through the Amaya.css style sheet.

### Geometry preferences

This menu allows you to save the current window size of the different views of a document (formatted, structure, alternate, links, and Table of Contents.) or to restore the default values. Note that the values that are saved are those belonging to the views of the document where you called this menu. Also, note that the position of the windows on the screen isn't saved yet. These changes will be reflected when you open new document windows.

### Language negotiation preferences

If a document exists in different languages and your server is configured to do language negotiation, you can use this menu to enter your language preferences (first one has the highest priority). Try browsing this press release, which exists in French, English, and Japanese versions. By changing the language negotiation to the ISO codes for the above languages (fr, en, or ja you can transparently request any of these versions.

### Profiles

In Amaya, a profile defines the look and feel of of the Amaya user interface. You can use profiles to hide or display the Amaya buttons and menus. This menu allows you to choose a given profile definition file and select among any of the profiles proposed by that file. Amaya proposes four sample profiles: editor, mini-editor, browser, mini-browser, each one with different capabilities. Any profile change will be effective upon the next launch of Amaya.

### Templates

A template is a model, or skeleton, of a document that you may use for creating your own documents. This menu allows you to specify the URL of a template server, which may be either local to your station or stored in some server. You'll need to quit Amaya to validate this option. When you launch Amaya again., there will be a new `File/New/From Templat`e entry. Following this entry will open a new document showing you the results of browsing the template URL. The idea is that this page acts as an index to the templates available in your station or in the template server. A sample template server is available at http://cgi.w3.org/cgi-bin/createform.pl. For more info, browse the using templates with Amaya page.

## Keyboard Shortcuts

It is useful to be able to invoke menu commands directly from the keyboard. The Thot toolkit provides a facility that lets user accomplish this by means of an application keyboard shortcuts file. This file defines a list of associations between a keyboard sequence and the corresponding invoked command.

The syntax used to define an association is:

     Directive = KeySeq ':' IdentCommand ;
     KeysSeq = KeySet [ ',' KeySet ] ;
     KeySet = [ Modifier ] [ 'Shift' ] Key ;
     Key = '<Key>' KeyValue / '<Key>' SpecialKey ;
     Modifier = 'Ctrl' / 'Alt' / 'Meta' ;
     KeyValue = 'a' / 'b' / ... ;
     SpecialKey = 'Escape' / 'Delete' / 'Space' / 'BackSpace' /
                  'Enter' / 'Up' / 'Down' / 'Left' / 'Right' /
                  'Home' / 'End' / 'F1' / ... / 'L1' / ... / 'R1' / ... ;
     IdentCommand = 'TtcInsertChar(' Char ')' / NAME '()' ;
     Char = KeyValue / OctalValue ;  OctalValue = '\' NUMBER ;

For an example, see the standard files `amaya.keyboard` (for Unix platforms) and `amaya.kb` (for Windows platforms), which are by default located in the directory `Amaya/config`.

The list of available commands is:

- Moving commands:
  - TtcNextChar, TtcPreviousChar: move character by character.
  - TtcNextLine, TtcPreviousLine, TtcStartOfLine, TtcEndOfLine: move line by line.
  - TtcNextElement, TtcPreviousElement, TtcChildElement, TtcParentElement: move element by element.
  - TtcPageDown, TtcPageUp, TtcPageTop, TtcPageEnd: scroll from page to page.
  - TtcLineUp, TtcLineDown scroll one line up or one line down.
- A command that allows one to follow a link or to activate a form element (menu, button, etc.): DoAction.
- In `File` menu:

  New, NewTemplate, NewCss, OpenDoc, OpenDocInNewWindow, Reload, GotoPreviousHTML, GotoNextHTML, SaveDocument, SaveDocumentAs, Synchronize, SetupAndPrint, PrintAs TtcCloseDocument, AmayaClose

- In Edit menu:

  TtcUndo, TtcRedo, TtcCutSelection, TtcCopySelection, TtcPaste, TtcDeleteSelection, SetBrowserEditor, TtcSearchText, EnSpellCheck, FrSpellCheck, TransformType.

- In `Structure Types` menu:

  CreateBase, CreateMeta, CreateLinkInHead, CreateScript, CreateStyle, CreateComment.

- In Types menu:

  CreateParagraph, CreateImage, CreateHeading1, CreateHeading2, CreateHeading3, CreateHeading4, CreateHeading5, CreateHeading6, CreateList, CreateNumberedList, ThotCreateMenu, ThotCreateDirectory, CreateDefinitionList, CreateDefinitionTerm, CreateDefinitionDef, CreateHorizontalRule, CreateBlockQuote, CreatePreformatted, CreateAddress, CreateToggle, CreateRadio, CreateOption, CreateTextInput, CreateTextArea, CreateSubmit, CreateReset, CreateAreaRect, CreateAreaCircle, CreateAreaPoly, CreateDivision, CreateNOSCRIPT, CreateObject, CreateParameter, CreateIFrame, CreateInlineMath, CreateMath, CreateMROOT, CreateMSQRT, CreateMFRAC, CreateMSUBSUP, CreateMSUB, CreateMSUP, CreateMUNDEROVER, CreateMUNDER, CreateMOVER, CreateMROW, CreateMMULTISCRIPTS, CreateMTABLE., CreateTable, CreateCaption, CreateTHead, CreateTBody, CreateTFoot, CreateRow, CreateDataCell, CreateHeadingCell, DeleteColumn.

- In `Links` menu:

  LinkToPreviousTarget, CreateOrChangeLink, CreateTarget, DeleteAnchor.

- In `Views` menu:

  TtcSwitchButtonBar, TtcSwitchCommands, ShowMapAreas, ShowTargets, ZoomIn, ZoomOut, ShowStructure, ShowAlternate, ShowLinks, ShowToC., ShowSource

- In `Style` menu:

  TtcChangeCharacters, TtcChangeColors, TtcChangeFormat, ChangeBackgroundImage, CreateClass, ApplyClass, LinkCSS, OpenCSS, DisableCSS, EnableCSS, RemoveCSS, SetOnOffEmphasis, SetOnOffStrong, SetOnOffCite, SetOnOffDefinition, SetOnOffCode, SetOnOffVariable, SetOnOffSample, SetOnOffKeyboard, SetOnOffAbbr, SetOnOffAcronym, SetOnOffINS, SetOnOffDEL, SetOnOffItalic, SetOnOffBold, SetOnOffTeletype, SetOnOffBig, SetOnOffSmall, SetOnOffSub, SetOnOffSup, SetOnOffQuotation, SetOnOffBDO.

- In `Special` menu:

  SectionNumbering, MakeBook, ShowLogFile, ConfigGeneral, ConfigPublish, ConfigCache, ConfigProxy, ConfigColor, ConfigGeometry, ConfigLanNeg, ConfigProfile, ConfigTemplates.

- In `Help` menu:

  HelpAmaya, HelpAtW3C, HelpBrowsing, HelpSelecting, HelpSearching, HelpViews, HelpCreating, HelpLinks, HelpChanging, HelpTables, HelpMath, HelpImageMaps, HelpStyleSheets, HelpAttributes, HelpPublishing, HelpPrinting, HelpNumbering, HelpMakeBook, HelpConfigure.