About Arbortext Styler > Non-Latin Language Support > Text Underlining and Strikethrough
  
Text Underlining and Strikethrough
Arbortext Styler provides an extensive list of configured underlining styles, and permits the user to customize the color of a selected underline. The Text category for elements, contexts, conditions, and property sets contains Underline style and Underline color menus for underlining.
The Text category for elements, contexts, conditions and property sets also contains the options Strikethrough style and Strikethrough color, with which you can customize the type and color of text strikethrough. In these menus you may select the extent to which text strikethrough should apply in a text block, i.e. to words and spaces or to words only, and elect a color for the strike bar.
* 
Customized settings for underline and strikethrough styles will only be visible in print or Arbortext Editor output when the document is published via an Arbortext Styler stylesheet. Customized underline and strikethrough styles are not supported in HTML output and will be treated as standard scoring in output of these types.
Example: Underlining Text in a Context Identified with a Particular Attribute Value
In this example the text to be deleted is identified by applying the attribute role=”delete” to the para everywhere else context. In print output the text will be underlined with a red wavy underline style.
1. In Arbortext Editor, open the file transport.xml located at Arbortext-path/samples/styler.
2. Choose Styler > Edit Stylesheet to open the stylesheet currently associated with the document for edit. This is a read only stylesheet so you will need to save a local copy if you want to make amendments.
3. Select the para element in the first formalpara element in the first chapter of the document. Apply the attribute role=”delete”.
4. In Arbortext Styler, navigate to the Elements list and select the para everywhere else context.
5. Create a new condition for the element via the Insert > Condition menu option. The New Condition dialog box opens.
6. Click New Attribute Test to open the New Attribute Test dialog box.
7. Create the attribute test for the condition by setting the following values:
Test attribute of Current element (para)
Attribute name role
Attribute value: Comparison =delete
8. Click OK to exit the New Attribute Test dialog box, then click OK again to exit the New Condition dialog box. The condition If attribute “role=”delete” appears in the Elements list for the para everywhere else element.
9. With the condition highlighted, navigate to the Text category.
10. Set the Underline style field to Jagged Heavy and the Underline color field to Red.
11. Choose Preview > Print. In the Print Preview window, note that the first paragraph in the sample document is underlined with a red wavy line.
12. Choose Preview > HTML File. In the Print Preview window, note that the first paragraph is underlined with a black standard underline.
Example: Striking Through Text in an Element Identified with a Particular Attribute Value
In this example the text to be deleted is identified by applying the attribute role=”strikethrough” to the emphasis element. In print output the text will be crossed out with a blue strikethrough bar.
1. In Arbortext Editor, open the file transport.xml located at Arbortext-path/samples/styler.
2. Choose Styler > Edit Stylesheet to open the stylesheet currently associated with the document for edit. This is a read only stylesheet so you will need to save a local copy if you want to make amendments.
3. Locate the para element in the first formalpara element in the first chapter of the document. Surround the text Welcome to the world of modern transportation with an emphasis element, and give the element the attribute role=”strikethrough”.
4. In Arbortext Styler, navigate to the Elements list and select the If attribute “role”=”strikethrough” condition of the emphasis everywhere context.
5. With the condition highlighted, navigate to the Text category.
6. Set the Strikethrough style field to Words only and the Strikethrough color field to Blue.
7. Choose Preview > Print. In the Print Preview window, note that the words in the text “Welcome to the world of modern transportation” are struck through with a blue bar, whilst the spaces between the words are not.
8. Choose Preview > HTML File. In the Print Preview window, note that all the text “Welcome to the world of modern transportation” is struck through, including the spaces, and that the strike bar is of the standard black color.
Limitations of Output Support for Underlining and Strikethrough
Output format
Limitation
All outputs
Strikethrough and overlining (defined via the overline property set) cannot be displayed concurrently for the same element/context, although they can both be set.
The overline property set is predefined in the stylesheets that exist in the Arbortext Styler distribution and, as the name suggests, defines a line drawn above text. It uses the same underlying publishing capabilities as the strikethrough property. As such an overline cannot display with a strikethrough set via the Text category.
Color and height settings for strikethrough and overlining are shared and may produce unexpected results when both are set for an element/context.
The overline property set and the strikethrough property share the same underlying publishing capabilities, where the specification of both is contained in the same set of height and color attributes. The height attribute has different values depending on the text property being activated - for strikethrough, the value of the height attribute sets the line to run through the middle of the letters; for overline, the same attribute is given the correct value to draw the line over the top of the letters. The color attribute is independent of the height attribute, and the color of any scoring defaults to the color of the text to which it is to be applied, unless a specific color setting is specified. You may therefore find an attribute setting you make for one of the overline/strikethrough properties will carry through to the other when they are both defined for a context, even though they cannot both be displayed.
Compare the property combinations defined below, and the results they will produce:
Strikethrough set:
Strikethrough style: Words and spaces
Strikethrough color: Red
Net result on publishing: red strikethrough
Strikethrough and overline set:
Strikethrough style: Words and spaces
Strikethrough color: Red
Overline property set activated
Net result on publishing: red overline (note: no strikethrough as cannot be displayed concurrently)
Strikethrough explicitly deactivated and overline set
Strikethrough style: none
Strikethrough color: <Derive>
Overline property set activated
Net result on publishing: no overline or strikethrough (since the properties share the same height attribute, the explicit value of none applies to both)
All XSL outputs (including RTF)
Since both underlining and strikethrough are specified in XSL outputs using the single text-decoration property, you can only get both effects for the same context if both underlining and strikethrough are specified at the same time, i.e. in the same property set, and on the same condition if conditions are being used. If you set one of underlining or strikethrough in one condition or property set and the other in another condition or property set, the last setting may override all or part of any previous setting.
Similarly, because the overline property set that is predefined in most Arbortext Styler stylesheets uses the same underlying publishing capabilities as the strikethrough property, you may not get both effects when the overline property set is used in conjunction with underlining.
Print/PDF via PTC ALD
The Words Only setting for underlining is not supported
RTF
Because of limitations in MS Word, the curvy underline styles will be mapped to the jagged style in RTF output.
Strikethrough color settings are not supported - strikethrough will be displayed in the current font color.
The Words only setting for strikethrough is not supported - strikethrough will apply to words and spaces
HTML
HTML outputs only support scoring with a single rule - all scoring types are mapped to a single underline.
HTML outputs do not support scoring or strikethrough color - the color will always match the font color. This is a HTML, CSS, and browser limitation.
HTML outputs do not support the application of scoring to words only - scoring will always run over spaces between words.
The Words Only setting for strikethrough is not supported
Custom underline styles will be supported when applied using the Words and Spaces option. A single underline will only appear if the Words Only position option is used.
A bug in Internet Explorer causes the strikethrough rule to appear thicker than the underline, with no way to specify a different rule thickness.
New stylesheets include a double-underline property set, which is implemented for HTML outputs via edited source that makes use of the “double border-bottom” underline style. Bugs in Internet Explorer mean this option is not always displayed correctly:
When the property set is applied to block elements in HTML outputs, the border bottom is not displayed in certain cases, for example when on the last line of the browser window. The property set will function correctly when applied to inline elements.
The two lines sometimes appear to have different thicknesses.
When an element’s underlining, strikethrough, or overlining setting has been activated by one of the element’s ancestors, there is no way in which the element itself can deactivate it. Setting underline or strikethrough to none for the element will have no effect in HTML outputs. Whatever text decoration was in effect prior to the element will continue throughout that element, even when it has its underline or strikethrough set to none.
This is a limitation of current browsers and the CSS specification.
Arbortext Editor view
Arbortext Editor ignores the height value specified for scoring (used to apply strikethrough and overline effects), assuming that any scoring set should appear midway through the text. For this reason, an overline setting will appear as strikethrough.