Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter ElevenSGML Functions (continued)

HTMLStyleAddAttribute Function

Overview

The HTMLStyleAddAttribute function adjusts the style attributes to be applied to subsequently added text. Style information can be added asynchronously, meaning, the function does not require tagging or items be in a stacked/unstacked sequence.

Syntax/Parameters

Syntax

int = HTMLStyleAddAttribute ( handle hStyle, string attributes );

Parameters

hStyle

A handle to an HTML Style Object.

attributes

A string containing one or more attribute changes.

Return Value

An int containing ERROR_NONE or a formatted error code on failure. Use the GetLastError function to retrieve a formatted error code.

Remarks

This function allows styles to be added to the Style Object as words are added without regard to stacking or other concerns. For example, adding color multiple times will not result in conflicts unless the color is the same, in which case only one color will be produced on rendering.

One or more attributes can be added (or subtracted) via commands constructed in the following form:

[+/-]code[:data]

The first section allows data to be added or subtracted. As shown, it is optional. If omitted, the attribute is assumed to be added. The code is the attribute to be adjusted, such as b or bold. Finally, optional data can be added for certain attributes such as color or font name.

Non-case sensitive attribute codes are as follows: 

  Attribute   Optional Data   Description  
  b or bold   (none)   Add or subtract bold.  
  bc or background-color   color   Add or subtract background color.  
  c or color   color   Add or subtract text color.  
  caps or capitalize   (none)   Add or subtract initial capital letters. This code is part of lower and upper, and, as such, cannot be used together.  
  class   (none) or text   Add or subtract an HTML class attribute. Note that these cannot be nested. Depending on the DTD, the attribute will be added to a <font> or <span> tag.  
  del or delete  

(none)

cite

iso-8601

iso-8601 cite

  Marks section as delete or resets delete state. Optional date and citation URL. Note that insert and delete should not be added to the same point since the date/time and cite share the same tokens.  
  f or font   name   Add or subtract font face.  
  i or italic   (none)   Add or subtract italic.  
  id   (none) or text   Add or subtract an HTML id attribute. Note that these cannot be nested. Depending on the DTD, the attribute will be added to a <font> or <span> tag.  
  ins or insert  

(none)

cite

iso-8601

iso-8601 cite

  Marks section as insert or resets insert state. Optional date and citation URL. Note that insert and delete should not be added to the same point since the date/time and cite share the same tokens.  
  letter spacing   size (in points)   Add or subtract letter spacing.  
  line height   size (in points)   Add or subtract line height.  
  lower   (none)   Add or subtract all lower case letters. This code is part of caps and upper, and, as such, cannot be used together.  
  r or revision   (none)   Add or subtract EDGAR revision tag. Note that depending on the DTD, <r> tags may be used or the CSS -sec-ix-redline property.  
  s or size   size (in points)   Add or subtract size.  
  small or small caps   (none)   Add or subtract small caps style.  
  stretch or font stretch  

(none)

Normal

Wider

Narrower

Ultra-condensed

Extra-condensed Condensed

Semi-condensed Semi-expanded

Expanded

Extra-expanded

Ultra-expanded

  Add or subtract font stretch value.  
  sub or subscript   (none)   Add or subtract subscript. This uses vertical align, and, as such, cannot be combined with other attributes employing vertical align..  
  super or superscript   (none)   Add or subtract superscript. This uses vertical align, and, as such, cannot be combined with other attributes employing vertical align..  
  u or under or line  

(none)

under

through

over

under-through

under-over

under-through-over

through-over

  Add or subtract lines  
  upper   (none)  

Add or subtract all uppercase letters. This code is part of caps and lower, and, as such,Solid11FishByte

Solid11fishByte

cannot be used together.

 
  word spacing   size (in points)   Add or subtract word spacing value.  
  valign or vertical align  

(none)

size (points, percent)

Top

Middle

Bottom

Baseline

Sub

Super

Text-Top

Text-Bottom 

  Add or subtract vertical align. Note that this cannot be combined with subscript or superscript codes.  

 

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic