Many of the preferences and options controlling both the appearance of the charts and the format of the written instructions have been grouped together into a series of stylesheets.
There are three categories of stylesheets;-
Appearance stylesheets. These contain options that control the appearance of the charts and key. Options include the size and colour of the grid, highlighting lines, annotations for repeated stitches, the default font for text, etc.
Written stylesheets. These contain options for the written instructions such as if and when stitch counts should be included, if rows/rounds should be condensed etc.
Text template stylesheets. These contain templates that are used to generate text for both key entries on the chart and written instructions.
An overview of Stitchmastery stylesheets is shown below.
For details of Stitch Libraries see About Stitch Libraries. 'Stitchmastery' stylesheets for each of the above categories are provided and can be used as the defaults. However, if a user would like to customise any of the above options then 'user' versions of any of the stylesheets can be created. Chart files reference stylesheets indirectly through aliases that are stored as preferences. The stylesheets themselves are also stored as preferences. Using an alias means that stylesheets can easily be shared by exporting them to a file. This file can be transferred to other computers and users by 'importing' the stylesheets from the file.
A Chart Diagram file (a '.knt2' file) has references to both a stitch library and stylesheets. When a Chart Diagram file is created it is assigned both a stitch library and three stylesheets; an Appearance stylesheet, a Written stylesheet and a Text templates stylesheet. See below for an example.
By changing the stylesheets both chart and written instructions can be customised as shown in this example;-
By also changing the stitch library as well as the text template stylesheet both the chart and written instructions can be translated to another language as the example below shows.
Making changes with stylesheets
When a Chart Diagram file is first created the appearance of the chart and key are governed by the appearance stylesheet at that time.
Stylesheet options that affect the appearance of the chart can also be selectively overridden from within the Chart Diagram. This does not affect the stylesheet in any way. So, if for example you need to highlight a row on the chart, then the font for that row number can be changed without having to edit the stylesheet.
Editing a stylesheet or changing the reference to a different stylesheet does not have an immediate effect on the appearance. The reason for this is that style sheets can be edited independently of the chart diagram files and appearance options can be selectively overridden. By not automatically changing a chart's appearance, the user can have confidence that the appearance of a chart will remain unchanged even if several weeks have passed since the file was last edited and other edits have been made to the stylesheet. In the example below the appearance stylesheet has been edited to change the colour of the grid. However, the colour of grids in any chart remain unchanged until an appearance stylesheet is explicitly 'applied' to it.
Once a stylesheet change is made, it can then be 'applied' to the charts and key as shown here;-
The text of key entries is also not updated automatically. The text for key entries is generated automatically either when the chart diagram is created or for when a stitch is used in a chart for the first time and an entry is added to the key. The text is then only changed as a direct result of an action by the user, such as a manual edit of the text or using the 'Refresh Key text' action. The example below shows a newly created chart. As the chart is set for circular knitting, the key entry text is generated using the 'Circular' template.
Below is the same chart after the key text for 'knit' has been manually edited to change it to the German for 'knit'. Note that this has only changed the text. Because neither the template stylesheet nor the stitch library have been changed, Stitchmastery still recognises this as a 'knit' stitch and generates written instructions in English as before.
Yet when the stitch library and text template are changed the key entry text is still not updated. By not changing automatically, any manual edits made to the text are preserved. On the other hand, written instructions are always regenerated every time that a chart diagram file is either opened or edited. Thus any changes to the stylesheets have an immediate effect on the written output as is illustrated here;-
To see changes to the key the key text must be explicitly 'refreshed';-