# <TextOptions>

The TextOptions element specifies settings that apply to the conversion of preformatted text and plain text files. An example of preformatted text is content marked with the <pre> tag in an HTML file. Examples of plain text files include files with the extension .txt and Palm Doc files.

## Full element example

        <TextOptions>
          <PreUseMonospaceFont      value="yes"/>
          <PreSingleLineBreaks      value="KeepAll"/>
          <ProcessLineBreaks        value="yes"/>
          <ConvertSingleLineBreaks  value="no"/>
          <TabStopWidth             value="8"/>
          <Preformatted             value="no"/>
          <UseMonospaceFont         value="no"/>
          <MonospaceFontSize        value="10"/>
        </TextOptions>

## Sub-element summary

Tag | Type | Default | Description
--- | --- | --- | ---
`<PreUseMonospaceFont>` | value | yes | For preformatted text, whether to use a monospace font
`<PreSingleLineBreaks>` | value | KeepAll | For preformatted text, how to process single line breaks.
`<ProcessLineBreaks>` | value | yes | For plain text files, whether to interpret line breaks
`<ConvertSingleLineBreaks>` | value | no | For plain text files, whether to remove single line breaks
`<TabStopWidth>` | value | 8 | For plain text files, the tab stop width to use
`<Preformatted>` | value | no | For plain text files, whether to interpret the text as preformatted
`<UseMonospaceFont>` | value | no | For plain text files, whether to use a monospace font for the text
`<MonospaceFontSize>` | value | 10 | For plain text files, the monospace font size to use
`<MonospaceFontSize>` | value | 10 | For plain text files, the monospace font size to use

## Sub-element descriptions

### <PreUseMonospaceFont>

Description
For preformatted text, set the value attribute of the tag to `yes` to have the text displayed using a monospace font or `no` to not.

The preformatted text may have been designed to be displayed using a monospace font as opposed to a proportional font. Using a monospace font makes it possible to align text along columns and to create tabular data (e.g., tables).
Examples
This example specifies that preformatted text should be displayed using a monospace font.

      <PreUseMonospaceFont      value="yes"/>

This example specifies that preformatted text should be displayed using a proportional font.

      <PreUseMonospaceFont      value="no"/>

### <PreSingleLineBreaks>

Description
For preformatted text, set the value attribute of the tag to one of the following values to specify how to process single line breaks:

- `KeepAll`: Leave all single line breaks as they appear in the preformatted text.
- `RemoveAll`: Remove all single line breaks from the preformatted text.
- `KeepIfSpaceTab`: Remove all single line breaks except those where the next line begins with a space or tab character.

Some text files are formatted with a given screen size in mind, such as an 80 column wide screen and line breaks occur on each line before column 80. When such a file is displayed on a narrower screen, the reader needs to scroll horizontally to read the part of the line that is wider than the screen. Moreover, if the application that displays the content does not have the ability to provide horizontal scrolling, the text will likely look like it is ill-formatted. As an example, consider the following block of text formatted for a 60 column screen:

    Some text files are formatted with a given screen size in
    mind, such as an 80 column wide screen and line breaks
    occur on each line before column 80.

    When such a file is displayed on a narrower screen, the
    reader needs to scroll horizontally to read the part of the
    line that is wider than the screen.

When the content is displayed on a 40 column wide screen with no horizontal scrolling, the output may look like this:

    Some text files are formatted with a
    given screen size in
    mind, such as an 80 column wide screen
    and line breaks
    occur on each line before column 80.

    When such a file is displayed on a
    narrower screen, the
    reader needs to scroll horizontally to
    read the part of the
    line that is wider than the screen.

Oftentimes, in such files, paragraphs will be double-spaced with respect to one another. In this case, you can set the value attribute of the PreSingleLineBreaks tag to `RemoveAll` and iSiloX and iSiloXC will replace the single line breaks within a paragraph to spaces so that the document can be reflowed evenly for a screen of any width. The above example would then look like this on a 40 column wide screen:

    Some text files are formatted with a
    given screen size in mind, such as an
    80 column wide screen and line breaks
    occur on each line before column 80.

    When such a file is displayed on a
    narrower screen, the reader needs to
    scroll horizontally to read the part of
    the line that is wider than the screen.

In the case where preformatted text does not have double-spacing between paragraphs as in the previous example but instead uses indentation as in the below example, then the `RemoveAll` option would not be appropriate.

        Some text files are formatted with a given screen size
    in mind, such as an 80 column wide screen and line breaks
    occur on each line before column 80.
        When such a file is displayed on a narrower screen, the
    reader needs to scroll horizontally to read the part of the
    line that is wider than the screen.

Instead, use `KeepIfSpaceTab` option for such cases for the following result on a 40 column wide screen:

        Some text files are formatted with
    a given screen size in mind, such as an
    80 column wide screen and line breaks
    occur on each line before column 80.
        When such a file is displayed on a
    narrower screen, the reader needs to
    scroll horizontally to read the part of
    the line that is wider than the screen.

Examples
This example specifies that all single line breaks in preformatted text should be kept.

      <PreSingleLineBreaks      value="KeepAll"/>

This example specifies that all single line breaks in preformatted text should be removed.

      <PreSingleLineBreaks      value="RemoveAll"/>

This example specifies that all single line breaks in preformatted text should be removed except for those where a space or tab character follows.

      <PreSingleLineBreaks      value="KeepIfSpaceTab"/>

### <ProcessLineBreaks>

Description
Set the value attribute of the tag to `yes` so that line breaks are processed or `no` to leave line break characters as they are.

The iSilo™ document format uses linefeed characters (ASCII 10) to indicate line breaks. If you set the value attribute of the ProcessLineBreaks tag to `yes`, which is recommended, iSiloX and iSiloXC correctly convert line breaks in text files that utilize either carriage return characters (ASCII 13) alone as line breaks or carriage return and linefeed characters in pairs as line breaks. If you set the value attribute to `no`, the resulting document may display incorrectly.
Examples
This example turns line break processing on.

      <ProcessLineBreaks        value="yes"/>

This example turns line break processing off.

      <ProcessLineBreaks        value="no"/>

### <ConvertSingleLineBreaks>

Description
Set the value attribute of the tag to `yes` to remove single line breaks or `no` to leave single line breaks as they are.

Some text files are formatted with a given screen size in mind, such as an 80 column wide screen and line breaks occur on each line before column 80. When such a file is displayed on a narrower screen, the reader needs to scroll horizontally to read the part of the line that is wider than the screen. Moreover, if the application that displays the content does not have the ability to provide horizontal scrolling, the text will likely look like it is ill-formatted. As an example, consider the following block of text formatted for a 60 column screen:

    Some text files are formatted with a given screen size in
    mind, such as an 80 column wide screen and line breaks
    occur on each line before column 80.

    When such a file is displayed on a narrower screen, the
    reader needs to scroll horizontally to read the part of the
    line that is wider than the screen.

When the content is displayed on a 40 column wide screen with no horizontal scrolling, the output may look like this:

    Some text files are formatted with a
    given screen size in
    mind, such as an 80 column wide screen
    and line breaks
    occur on each line before column 80.

    When such a file is displayed on a
    narrower screen, the
    reader needs to scroll horizontally to
    read the part of the
    line that is wider than the screen.

Oftentimes, in such files, paragraphs will be double-spaced with respect to one another. In this case, you can set the value attribute of the ConvertSingleLineBreaks tag to `yes` and iSiloX and iSiloXC will replace the single line breaks within a paragraph to spaces so that the document can be reflowed evenly for a screen of any width. The above example would then look like this on a 40 column wide screen:

    Some text files are formatted with a
    given screen size in mind, such as an
    80 column wide screen and line breaks
    occur on each line before column 80.

    When such a file is displayed on a
    narrower screen, the reader needs to
    scroll horizontally to read the part of
    the line that is wider than the screen.

Examples
This example specifies that single line breaks should be removed.

      <ConvertSingleLineBreaks  value="yes"/>

This example specifies that single line breaks should not be removed.

      <ConvertSingleLineBreaks  value="no"/>

### <TabStopWidth>

Description
Within text files, tab characters are often used to align text. Set the value attribute of the TabStopWidth tag to the tab stop width for which the text file was written.
Examples
This example specifies that the tab stop width should be eight.

      <TabStopWidth             value="8"/>

This example specifies that the tab stop width should be four.

      <TabStopWidth             value="4"/>

### <Preformatted>

Description
Set the value attribute of the tag to `yes` to interpret the text as preformatted or `no` to not.

If a text file is preformatted, it means that the content should not be reflowed and that the position of line breaks should not be modified. Performing either of these operations may mess up the original desired appearance of the content. In this case, you want to set the value attribute of the Preformatted tag to `yes` so that iSiloX honors the preformatting.
Examples
This example specifies that the text should be treated as being preformatted.

      <Preformatted             value="yes"/>

This example specifies that the text should not be treated as being preformatted.

      <Preformatted             value="no"/>

### <UseMonospaceFont>

Description
Set the value attribute of the tag to `yes` to have the text displayed using a monospace font or `no` to not.

The text file may have been designed to be displayed using a monospace font as opposed to a proportional font. Using a monospace font makes it possible to align text along columns and to create tabular data (e.g., tables). Set the value attribute of the UseMonospaceFont tag to `yes` and specify a desired font size using the MonospaceFontSize tag.
Examples
This example specifies that the text should be displayed using a monospace font.

      <UseMonospaceFont         value="yes"/>

This example specifies that the text should be displayed using a proportional font.

      <UseMonospaceFont         value="no"/>

### <MonospaceFontSize>

Description
Set the value attribute of the tag to a positive integer in the range from 1 to 255 for the desired monospace font size in points for displaying the text.

This setting only has an effect when the value attribute of the UseMonospaceFont tag is set to `yes`. Note that the value you provide is only a desired setting. The actual display device may or may not be able to honor the given font size you set.
Examples
This example specifies a desired monospace font size of 10 points.

      <MonospaceFontSize        value="10"/>

This example specifies a desired monospace font size of 14 points.

      <MonospaceFontSize        value="14"/>

©1999-2017 DC & Co. All rights reserved.