TI Rich Text Format Conversion

(TItoRTF.exe)

 

 

This program will convert lab reports, TEXT files, and STR files to Rich Text Format (RTF). This document was completely formatted on a TI-92 Plus (this HTML version was created by saving the RTF file as an HTML file with Word 97). The advantages of converting to RTF are:

 

1. Embedded print objects in lab reports can be expanded into the document.

 

 

2. The TI92pluspc font can be used.

 

3. RTF will load into almost any word processor (including WordPad).

 

4. RTF text formatting codes can be applied from within the calculator.

 

 

Simple Operation-

 

Open a word processor that can read RTF files (Word Perfect, Word, WordPad, etc.). Drag and drop a lab report, TEXT file, or STR file onto TItoRTF.exe (or onto a shortcut to it). The file will be converted to RTF and placed in the Windows clipboard. In the word processor, select "Paste Special" (usually in the EDIT menu) then select the entry labeled "Rich Text Format," "Formatted Text (RTF)," "Rich Text (RTF)," or anything similar, and the file will be loaded into your word processor.

 

This version of TItoRTF can convert TEXT (.89T, .92T, .9xT) and STR (.89S, .92S, .9xS) files and the TEXT file in a lab report (.89R, .92R, .9xR). If a lab report contains print objects of type PIC and STR they will also be converted and inserted into the appropriate place in the output file. I intend to add full print object support for TEXT files and limited support for EXPR, PGM, FUNC, LIST, and MAT files. I would like to add full support for all files but I doubt I will have the time needed to determine all the token values. The limited support will include untokenized PRGM and FUNC files and simple EXPR, LIST, MAT, and DATA files.

 

 

Command Line Usage-

 

TItoRTF "TI file" ["RTF file"] [/:] [/F# | /F "Font"]

 

"TI file" One of the files previously mentioned. Example (using clipboard): TItoRTF essay.9xT

 

"RTF file" An optional output file. If this option is left out, the file will be copied to the Windows clipboard. Example: TItoRTF labrpt.9xR labrpt.rtf

 

/: Print a " :" (space colon) at the beginning of each paragraph, just as in a TEXT file. By default TItoRTF will not print the colon unless it appears after a command code (P: or C:) or is part of the text. Example: TItoRTF example.89T lesson1a.rtf /:

 

/F# Insert a digit in place of the number sign (#) to change the default font to one of the following:

 

0 Ti92Pluspc (default)

1 Courier New

2 Times New Roman

3 Signature

4 Comic Sans MS

 

Example (using clipboard): TItoRTF ltr2mom.92T /F4

 

/F "Font" Change the default font to that between quotes. Use the same spelling for the font as it is listed in your Windows Control Panel. There must be a space between the /F and the name of the font, and if the name of the font is more than one word it must be enclosed in quotes. Regardless of any font changes, all characters above ASCII 127 will remain in the TI font. This is because there is no other font that matches the symbols used in the TI calculator. Example: TItoRTF demo1.9xR /: /F "Arial Narrow Bold Italic".

 

 

RTF Formatting on the TI Calculator-

 

Although the reason for converting TI files to RTF is so that they can be formatted in a word processor; it is sometimes desirable to add formatting while you are creating the document. To allow for formatting from within the calculator TItoRTF uses two non-printing characters; the diamond (char(127) or CHAR 4:Special F:) and the lock (char(14) or CHAR 4:Special 1:). I'll refer to these characters as [DIA] and [LOCK] respectively.

 

[DIA] is used to begin and end formatting. Except where indicated or obviously unnecessary, the first appearance of the code will start the format and the second appearance will end it.

 

[DIA]- Em-dash (—).

[DIA]b Bold.

[DIA]C Large caps.

[DIA]c Small caps.

[DIA]D1 Date (mm/dd/yy): 12/05/98

[DIA]D2 Date (Wkd, Mon dd, Year): Sat, Dec 5, 1998

[DIA]D3 Date (Weekday, Month dd, Year): Saturday, December 5, 1998

[DIA]d Mark text as deleted.

[DIA]E Emboss.

[DIA]e Engrave.

[DIA]f Use font number [#] (see above). Use [DIA]Fd to end.

[DIA]fd Return to default font.

[DIA]h Shadow.

[DIA]i Italic.

[DIA]j Justify text left and right. (See comments)

[DIA]k Strike text.

[DIA]l Left justify (default). (See comments)

[DIA]m Center. (See comments)

[DIA]n Return everything to normal.

[DIA]o Outline.

[DIA]p# Change font size. (See comments)

[DIA]r Right justify. (See comments)

[DIA]S Superscript.

[DIA]s Subscript.

[DIA]t Tab (or char(9)).

[DIA]T Current time: 15:28

[DIA]U Continuous underline.

[DIA]u Word underline.

[DIA]v Hidden [text].

 

The justification formatting codes ([DIA]v, l, m, and r) must be ended on the line following the last line to be formatted. This paragraph is justified left and right with the Times New Roman font, complete lines should reach both margins.

Left justification (default).

Center justification.

Right justification.

 

The [DIA]p code requires a hexadecimal number as its final character. Use the table below, or remember the formula: size=2x+6. [DIA]p0 will change to a 6 point font (2*0+6) and [DIA]pf will change to a 36 point font (2*15+6).

 

[DIA]p0 6 point

[DIA]p1 8 point

[DIA]p2 10 point

[DIA]p3 12 point

[DIA]p4 14 point

[DIA]p5 16 point

[DIA]p6 18 point

[DIA]p7 20 point

[DIA]p8 22 point

[DIA]p9 24 point

[DIA]pa 26 point

[DIA]pb 28 point

[DIA]pc 30 point

[DIA]pd 32 point

[DIA]pe 34 point

[DIA]pf 36 point

 

 

[LOCK] is used to allow the next character to pass through the program without being converted to RTF. There is no need for anyone to use this feature and using it could keep the program from doing any conversion at all. I have only included it so that someone familiar with RTF can apply other RTF formatting codes from the RTF specification. There are only three characters that would need to be preceded by [LOCK]: '\', '{', and '}'. These are the three control characters in RTF and TItoRTF normally converts them to an escaped version. You can add codes to the document section anywhere in the text, but you will not be able to add codes to the RTF header unless you start at the first character of the document and precede every character with [LOCK]. The first character not preceded with [LOCK] will start the document section. Following are some examples using straight RTF code:

 

[LOCK]\b Bold on[LOCK]\b0 bold off.

 

[LOCK]{[LOCK]\bkmkstart example[LOCK]} This will be a bookmark [LOCK]{[LOCK]\bkmkend example[LOCK]} (Note that a [LOCK] precedes every '\', '{', and '}'.

 

 

Compatibility and Other Problems-

 

I tested this program with files from my TI-92 Plus and used Word Perfect 8, Word 97, and WordPad 1.0 to check the results. WordPad doesn't recognize many of the RTF formatting codes but it still accepts all the text and pictures and displays the appropriate font. Word Perfect doesn't accept the embedded Device Independent Bitmaps (DIB) I use for the PIC files, although they are in the RTF specification. When I figure out how to create enhanced metafiles without a GUI (from the console) this problem will be eliminated. In the mean time you can first open your new RTF file in WordPad and force a save in RTF. This will convert the picture to one that is compatible with WordPerfect. Word doesn't seem to have a problem with anything.