Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

21 Mapping text formats to HTML/XML > 21.6 Mapping special characters > 21.6.2 Understanding how Mif2Go treats tabs in HTML/XML


21.6.2 Understanding how Mif2Go treats tabs in HTML/XML

Because tab characters in text are not meaningful in HTML or XML, by default Mif2Go converts each tab in your FrameMaker document to a space, with the following exceptions:

Tabs in preformatted text or in comments

Tabs in autonumbers

Tabs you replace with code.

HTML and XML coalesce spaces as part of normalization. Several tabs in a row become one space on output, except in preformatted elements or in comments.

Tabs in preformatted text or in comments

Tabs in the following places become multiple spaces, based on Mif2Go line-position calculations that determine where the next “tab stop” should be:

text in formats mapped to preformatted elements, such as <pre> in HTML

text enclosed in comment tags.

The line-position calculations are accurate only for monospaced fonts. See §21.10 Configuring preformatted text for HTML/XML.

Tabs in autonumbers

Mif2Go converts tabs in autonumbers to spaces. However, for paragraph formats assigned the NoAnum property, and when [HTMLOptions]UseAnums=No, Mif2Go removes tabs within or immediately following the autonumbers. See §21.3.3 Converting paragraph formats with autonumbers.

Tabs you replace with code

If your document uses tabs for a special purpose, you can replace the tab characters in selected formats with HTML code. The HTML code can be in the form of a Mif2Go macro (see §28 Working with macros). For example:

[StyleTabReplace]

; doc style = HTML code to use instead of tab sequence, can be macro

Flags = <$ReplaceTabWithTD>

[ReplaceTabWithTD]

</td><td>

You can assign HTML code to either a character format or a paragraph format. The code is included once for each tab sequence, not for each tab, so if your document has one tab in one paragraph and three in a row in another, they will be treated the same way. Any open inline elements such as <i> are closed before the code is inserted, and any new tags for the following text are opened after the code.



21 Mapping text formats to HTML/XML > 21.6 Mapping special characters > 21.6.2 Understanding how Mif2Go treats tabs in HTML/XML