The Format menu enables you to change the appearance of your documents using cascading style sheets (CSS)
Amaya provides by default two different themes (Classic, Modern) that allow you to style the current document.
To change the document presentation with a theme:
To remove the current theme:
All these changes can be undone (Edit/Undo or Ctrl-z).
When a theme is applied to a document, Amaya generates a style
element whose content comes from Amaya/config/Classic.css
or
Amaya/config/Modern.css
files. You can create your own
Classic.css
and Modern.css
files in the AmayaHome directory. If you do so, Amaya
will use them instead of default config
files.
Some styles properties like color, background color, font, alignment, line spacing, or indent may be applied to a piece of text or to a whole element using either the Style tool or one of the submenus of the Format menu.
To apply a specific style:
F2
key until the bottom line of the window displays
the type of the element in the first position. You can also use the
structure view to select an element.The Style tool provides two buttons for for each color you may set (the text color and the background color). The first button allows you to apply its current color; the second button allows you to choose another color and to apply it.
To remove a specific style:
style
.All values available for the class
attribute in the document
are listed in the Apply class tool.
To apply a class to an element:
F2
key until the bottom line of the window displays
the type of the element in the first position. You can also use the
structure view to select an element.span
element
to enclose the current text and the class
attribute is
attached to this new span
element.To associate a class
with an element, you can also use the Attributes tool (advanced profile only). This tool
also enables you to delete a class
attribute from an element or to
change it (the class
attribute is handled like any other
attribute).
To remove the class of an element:
class
attribute in the
Attributes tool.
When the element is selected, click on the [X] of the entry to remove
the class
attribute, or click on the entry and edit its value
then confirm with the apply button.
class
attribute in the
structure view.
To remove the class
attribute, click in the value,
F2
lets you select the whole value, then hit the
Delete key twice.
Two submenus of the Insert menu enable you to add HTML elements that change the style of text: Information type and Character element.
The Information type submenu lists HTML elements that define abstract styles.
To apply an information type:
The selected character string displays in the chosen style.
Five of these Information elements are also available in the
Elements tool: emphasis ( ),
strong ( ) code
( ),
insertion ( ), and deletion
(
).
The Character element submenu of the Insert menu provides another set of style elements.
To apply a character element:
The selected character string displays the chosen style.
Two of these Character elements are also available in the Elements tool: superscript ( ), and subscript ( ).
All commands of the submenus Information type and Character Elements are cancelled when you apply them twice.
To remove a style element:
code
( ), insertion ( ), and
If you want to insert normal text (i.e. without any style), within a styled character string, put the insertion point at the desired position, and activate the command corresponding to the style you want to remove (in the Information type or Character element submenu of the Insert menu, or use the buttons in the Elements tool).
Note: The style editor is not available in the Amaya Lite editing profile.
The Style editor entry in the Format menu, or the button in the button bar, enables you to create a list of CSS style properties through a dialog box with 4 different tabs: Characters, Colors, Boxes, Format.
When a set of properties is set, you can Apply them to the current selection:
style
attribute on the current element, creating a
span
element if only a character string is selected.In any case image paths included in the list of properties
(background-image
, list-style-image
) are transformed
into paths relative to the selected document.
Note: These actions are not available in the Lite profile.
A document can link to several external style sheets that are downloaded with the document and applied to it.
An external style sheet can apply to multiple documents. When the same style sheet applies to several displayed documents, Amaya downloads only one instance of the style sheet.
You can define a specific style sheet that applies to all documents
downloaded on your system. This style sheet is called the user's style
sheet. It is stored in your local environment, in the AmayaHome
directory as the local file amaya.css
.
For example, if you prefer to display documents in Helvetica on your screen and print them in small size, you can create a user's style sheet with following CSS rules:
@media print {
body {font-size: 10pt}
}
@media screen {
body {font-family: Helvetica}
}
The Format/Style sheets submenu provides a set of commands which enable you to control external and user's CSS style sheets.
This command shows a dialog box.
The Open, Disable and Enable commands can be applied to the user's preference style sheet, but the Link and Remove commands apply only to external CSS style sheets.
The List of style sheets tool displays the list of style sheets applied to the document. It also lets you link/remove, disable/enable, and open style sheets.
When multiple style sheets are attached to a document, it is ofen difficult to understand why an element is displayed with certain style properties. To help you in this situation, Amaya provides the Format/Show applied style command that displays all the CSS style properties applied to the first selected element.
You can then display the CSS rule that generates each property by double clicking on the property. As long as the CSS properties window is open, Amaya updates its content when the selection changes.
By hitting F2, you can see the CSS properties applied to enclosing elements. When you change the selection by clicking an element in the path of the status bar, displayed at the bottom of the window, CSS properties are updated too.
When a style
attribute is associated with an element, you can
use that element as a model for creating or modifying a style rule by using the
Format/Create rule command.
Note: The removing of all style
attributes
generated by most word processors may be a tedious task which is fortunately
performed by the Code
clean-up command.
To create a generic style for an element or a class:
Note: You must select only one element and
this element must have a style
attribute.
The style of the selected element is then associated with the chosen
selector and the style
attribute is removed from the selected
element. Its value is moved to the style
element, in the
document head
, and all elements matching the selector are
displayed with the new style.
Note: When a new class is created with command Create rule, this class is automatically added to the list of the Apply class tool.