6 The Style editor

One of the most powerful features of Fireworkz is its ability to store the layout of paragraphs and the design of type styles as named styles. This is done using the Style editor.

This chapter provides a comprehensive reference guide to the Style editor in Fireworkz. It explains how to set up and use styles:

Setting up styles

Each worksheet starts out with several styles in its style list, depending on the number of styles defined in the template used. Any number of styles can then be added.

There are several ways in which you can change the appearance or type of cells. You can either:

Editing styles

All attributes can be changed by using the Style editor.

To change an existing style via the Style editor:

  1. Style tool button Click the Style tool button on the toolbar (or choose Style from the Style menu).
  2. The list of styles is displayed. Select the one you want from the list and click the Change button.
  3. The Style editor dialogue box will appear, with the name of the style being changed shown in its title bar. See the following sections for full details on how to set each attribute.

Adding a new style

To add a new style to the list:

  1. Choose Styles from the Style menu.
  2. Click the New button. The Define new style dialogue box will appear.
  3. Enter the name for the new style in the first writable field.
  4. If the style is to be based on a selected area, select the Selection radio button.
  5. If the style is to be based on an existing style, select the Style radio button and select the style you want from the list.
  6. Click Create. The New style dialogue box will appear.

You should go to each section of the dialogue box which contains an attribute used in the selection and deliberately switch on the attribute for it to be stored as part of the style.

Setting choices in the style dialogue box

The Style editor appears when you choose New style or Change style. Because it includes too many options to put on the screen at once, it is split into several sections which contain items which can be considered together. (Historical note: this design precedes the introduction of tabbed dialogs in Windows!)

These options are listed on the left of the dialogue box. Click the radio button to display the section of dialogue box associated with it.

Style

The first section of the Style dialogue box contains the style name and so is set for every style. It is also used to assign control key shortcuts to styles.

About style names

You may give a style any length of name you like, although in practice you will want to see the name clearly in the style list, which means that 25 characters is the practical limit.

You may use any alphanumeric characters (i.e. letters of the alphabet and the ten numerals 0-9) in style names. Style names are not case-sensitive, so you cannot create different styles called heading and Heading.

You may use spaces and the underscore character (_) in style names, but no other punctuation marks or symbols.

When you create a new style, Fireworkz will suggest the style name NewStyle1. However, it is always a good idea to give a style a name which reminds you of the purpose of the style, or the attributes set in it.

Control key shortcuts

You can assign control key shortcuts to frequently used styles. To do this go to the Style section of the Style editor and choose one of the key short cuts available. You can use Ctrl-F1 to Ctrl-F11, Shift-F1 to Shift-F11, and Ctrl-Shift-F1 to Ctrl-Shift-F11.

Control key shortcuts can be used instead of the Style tool button and selector dialogue box. So to change style at the caret you would press Ctrl-F2 (or whichever number was needed) rather than clicking the Style button and then choosing a style from the list.

Text

The Text section of the Style editor is one of the most used sections. It defines the typeface used, the size and colour of text and other attributes such as bold, italic, underline, superscript and subscript.

Fonts and typefaces

The font is an aspect of style which you will often want to change. It is made up of a combination of typeface, height, width, and attribute. You can also use colour. A font is a particular instance of a typeface, in a particular size and style.

All of these are set in the Text section of the Style editor.

Typeface

Each typeface has a particular feel to it, making it more appropriate for some types of document than others. However, there are very few hard and fast rules in typography with most choice coming down to subjective preferences.

Typefaces can be grouped in several ways. The most obvious is the split between typefaces consisting of letters and numbers, and typefaces which contain symbols and ornaments. These typefaces are often known as Dingbats.

Alphanumeric typefaces are divided into monospaced and proportionally spaced type. Numbers are traditionally monospaced in all typefaces, but you should check this with any unusual typefaces you plan to use.

This is monospaced text

Alphanumeric typefaces can also be divided into serif and sans serif type.

This is a serif font; the letters have brackets and feet

This is a sans serif font whose letters have plain ends

Setting the typeface

Changing the typeface can have a major effect on the look of a document.

To choose a typeface to use within the style:

  1. Click the Text button to display the Text section of the Style dialogue box, and then on the Typeface button.
  2. The list of available typefaces will be illuminated. Note that the typefaces will depend on what you have installed in your particular system.
  3. Select the typeface you want from the list.

Style hints

Try not to go overboard with type and add too many typefaces to your worksheet; it will just make it harder to read. Stick to a consistent plan for both text and numbers.

Attributes

There are five different attributes which you can apply to your typeface singly or in combination. They are:

To add any of these to a style:

  1. Click the option button to the left of the attribute's icon.
  2. The attribute button will be illuminated and appear to have been pressed.
  3. The attribute is now turned on.

If an attribute is set in one style, you may want to create another style which turns this off, allowing you to remove the attribute. For example, if your main text style is italic, you may want to use plain text for emphasis, and should create a style called Plain, with italics turned off.

To create a style turning off an attribute set in another style, you should:

  1. Add a new style.
  2. Click the option button to the left of the attribute's button.
  3. Click the attribute button so that it is not pressed in.
  4. This style will now turn off the chosen attribute in any text it is applied to.

Height and width

This sets the size of the font.

Height and width are measured in points, the traditional printing industry unit of measurement, which is 1/72nd of an inch.

Usually, you will only be interested in setting the height of the font. To set the height:

  1. Click the Height option button in the Text section of the Style dialogue box.
  2. Click the up or down arrow buttons to increase or decrease the number shown to reach the point size you require.

The width of the font will be its correct width proportional to its height, if you leave the width set to zero. You may wish to alter the width of the font to create a special effect. This can result in unpleasantly distorted type if taken to extremes. There are two things you can do with the width option:

As a rule, you will only get usable results condensing serif fonts 10 per cent or less, and expanding or condensing sans-serif fonts by up to a third.

Colour

If you will be using a colour printer, or will be using your document mainly on screen, you can set the colour option and use a colour other than black for your text.

  1. Click the colour switch to on. The colour section of the dialogue box will become illuminated.
  2. Choose the colour you want. There are several ways to do this: click the Colour button in this group to use the standard colour selector, or by clicking on one of the pre-defined colour buttons in the palette, or by typing in RGB values, or use the arrows to enter RGB values.
  3. The colour you have chosen is shown in the bar at the bottom of the colour section.

Ruler

The Ruler section of the Style editor lets you set the values of tabs, margins and other spacing options normally set using the ruler.

Margins

Margins are one of the major attributes governing the way your text is laid out on the page. Each style can have different margins set, as you may want to make your document easier to read by having some sections of text indented.

About margins

Margins are the space between the edge of the printable area and the edge of the text. In the Style dialogue box you are concerned with the margins at the left and right of pages; if you want to set the top and bottom margins you should go to the Paper and Header/Footer dialogue boxes.

There are three margin settings in the Style dialogue box, corresponding to the margin markers displayed on the ruler:

Of course, your text will not necessarily sit flush against every margin, unless you have chosen full justification.

You can check the margin settings in a style by looking at the Ruler section of the Style dialogue box.

Setting margins

You should set margins using the ruler, which gives you immediate feedback on screen about the results of your choices.

  1. Click in an area using the style you want to change.
  2. Drag the margin markers to the new positions. Dragging the left margin will move the paragraph margin too, and the tab markers which are expressed as offsets of the left margin.
  3. The style underlying the margins in that area is automatically updated.

You can check which style sets the margins at a given point using the Regions command on the Style menu and moving in or out till you see the margin settings in the status line.

Tabs

Tabs, like margins, can be set using either the Style editor (Ruler section) or the ruler. It is easier to set tabs using the tab icons on the toolbar and the ruler, but you may want to edit tab settings in the Style editor for precision.

About tabs

Four types of tab marker are available in Fireworkz; their names relate to the way tabbed text is formatted by them:

The default setting for tabs in Fireworkz letter documents is that left tab markers are positioned every 2cm along the ruler. These tabs can be repositioned by dragging; they will also move if the left margin is moved, but they will always stay at the same place in relation to the left margin when this happens.

In the Style dialogue box, tab markers are presented as a list, and their type and position on the ruler is shown.

Adding tabs with the ruler

NB This section only applies if the Tab well is displayed — modern config files have it commented out.

To add a tab to a style using the ruler:

  1. Place the caret in an area of text which uses the style. If the area has more than one style set, the style in which tabs are set will be the one changed. If you select an area of text, any changes you make will only be applied to that area.
  2. Click on the type of tab marker you want in the tab well in the toolbar. The selected type of tab will appear in blue in the tab well.
  3. Point at the ruler and click the mouse in the place where you want the tab.

Repositioning tabs

To reposition tabs:

  1. Place the caret in an area of text using the style you want to change.
  2. Point at the tab you want to move.
  3. When the pointer turns into a two way arrow, press and hold down the left mouse button and drag the tab marker to the new position. The status line will help you to position tabs accurately. All the tabs to the right will move by the same amount. If you only want to move one tab, without changing those to the right, use Adjust (RISC OS) or press the Ctrl key and the left mouse button.

Removing tabs

To remove tab markers point at them in the ruler and double-click with the left mouse button.

Adding and editing tabs in the Style editor

It is much easier to set tabs directly on the page, and by ensuring that you have placed the caret in an area of text to which a style has been applied, your changes will be saved as part of the style. However, you may prefer to set tabs within the Style editor itself. To do this:

  1. Move to the Tabs section of the Ruler section of the Style editor for the style to which you wish to add tabs.
  2. Type in the values for the tabs you want in the current ruler unit of measurement. Type in the number for the tabs position, and a letter to show what type of tab is required:
    L Left
    C Centre
    R Right
    D Decimal
  3. Click Apply or move to another part of the Style editor.

Alignment

Alignment is also set using either the toolbar or the Ruler section of the Style dialogue box. Justification is the alignment of text with the margins.

Justification options

There are four justification options:

This text has been set with left justification turned on. The right edges are ragged and the left edges are smooth. This text has been centred. The lines are evenly balanced but both edges are ragged. This text has been set with right justification turned on. The left edges are ragged and the right edges are smooth. This text has been fully justified. Both edges are smooth but gaps appear within short lines.

Choosing an alignment option

To turn justification on in a style:

  1. Display the ruler section of the Style dialogue box.
  2. Click the Justification switch so that it is on.
  3. Click the image button representing the justification option you want to use.

Using the toolbar to set alignment

Setting an alignment by clicking on a button in the toolbar will not change the style but set an effect; either on all paragraphs in the selection, or on just the paragraph containing the caret if there is no selection.

Vertical justification

You can also set vertical justification within paragraphs and cells. This aligns the contents of the paragraph/cell with the top, centre or bottom of the cell. This is useful for headings and titles within tables.

Column

The default column width is set in this section of the Style dialogue box, in the worksheet's base style. However, you should not try to change column widths by changing the setting here. Each column in your worksheet has its width applied to it as an effect, so that you can change the width of each column individually by dragging its column heading.

Column heading

The column heading is set in this section of the dialogue box. The default entry is that lower-case letters are used as column headings, so the writable field reads x#. The format description has the same syntax as the number formats in the Number part of the Style editor.

If you change the column headings, check that they are still different from the row headings, or you could create a worksheet that was very confusing to use. Remember that you will still need to enter cell references in their standard form using letters.

Colour

In addition to text and data there are three items to which you can attach colour:

The background is usually set to be transparent.

In most styles both the border and grid will usually be turned off. If you want a coloured, printing grid across a whole worksheet, outlining every cell, you should turn the grid on in the BaseSheet style.

Background colour and borders

Background colour can be applied to any area of text using the Style editor. When using colour you should consider defining the colour as a separate style, so that you can add and remove it without reformatting cells.

Adding colour to a style

To add colour to a style:

  1. Display the Colours section of the Style editor.
  2. Click the option button for background, border or grid as required.
  3. Choose the colour you want, as described above for text colour.
  4. To turn on grid and borders you must also pick a line style, by switching on the Line style option button and then clicking on a line button. There are four to choose from, including thin, standard and thick solid lines and dotted lines. The fifth, blank, button turns off any lines which are already there.

Spacing

The spacing between lines and paragraphs is important to the look of your document. If you don't leave enough space, your document will look cramped and be hard to read. If you leave too much space your document will be equally hard to read.

Line spacing

Line spacing is the space between the top of two lines of text which are in the same paragraph.

The standard line space provided by Fireworkz is 120% of the height of the largest text in the line. There are four main line spacing options you can use:

To set line spacing in a style:

  1. Display the Spacing section of the Style dialogue box.
  2. Set the Line spacing option button to on if it is not on already.
  3. Click the image button that represents the spacing you want.
  4. If you have chosen the custom spacing option, type in a number into the writable field or click the arrow buttons to get to the number you want as the line spacing in points. The number you specify is the height of each line, not the gap between lines.

Paragraph spacing

Whatever line spacing you choose, you may want to add extra space between paragraphs. This is especially useful in long documents. A space of around half a line between paragraphs usually works well.

You can specify that paragraph spacing is placed before or after a paragraph. For headings, you should usually specify space above; for the main body of text you should specify space below. When two paragraphs, one with extra space above and one with extra space below, meet, the two spacing values are added together, so you should check your document to see that no gaps larger than you want have been added.

To add or change paragraph spacing:

  1. Display the spacing section of the Style dialogue box.
  2. Click the option button for Above paragraph or Below paragraph spacing.
  3. Enter the value you want — in the given units — either by typing it into the writable field or clicking the arrow buttons to change the number.
  4. Set the other spacing option, or turn it off, as required.

Row

The Row section of the Style editor governs the behaviour of rows. Rows contain either paragraphs or cells.

Setting row height

You can set the height of rows using the Height option. This governs the height of new rows created in a style, but remember that, if Fixed height is switched off, rows resize automatically to fit their contents, and that you can drag row borders to resize rows.

  1. Display the row section of the Change style dialogue box for the style you want to change.
  2. Enter the height you want by typing it into the writable field or clicking the arrow keys to increase or decrease the size already entered.
  3. Click Apply.

Two further options governing the behaviour of rows are also set in this section of the Style dialogue box.

Changing row heading

The row headings are also set in this section of the Style dialogue box. Usually this is a number, so the Heading box contains #. You may, however, substitute letters or Roman numerals. The format description has the same syntax as the number formats in the Number section of the Style editor.

If you change the row headings, make sure that the row headings are not the same as the column headings, as this could result in a very confusing worksheet.

Number

The Number section of the Style editor governs conversion of numbers, dates and times for display. It also controls cell protection and new cell type.

Number, date and time formats

These are described fully in the chapter Number, date and time formats