Notes on using the T3 <--> WordPerfect conversion programs The T3 <--> WordPerfect conversion programs are normally started using a batch file. The batch file uses default auxiliary files so that only the input and output file names are necessary to run the conversion programs. The auxiliary files control the default character mappings and conversion processes. Alternatively, the conversion programs can be run directly

wheatauditorSoftware and s/w Development

Oct 30, 2013 (3 years and 9 months ago)

66 views

Notes on using the T3 <
--
> WordPerfect conversion programs



The T3 <
--
> WordPerfect conversion programs are normally started using a

batch file. The batch file uses default auxiliary files so that only the

input and output file names are necessary t
o run the conversion programs.

The auxiliary files control the default character mappings and conversion

processes. Alternatively, the conversion programs can be run directly
and

different auxiliary files can be specified. This is useful if you are

e
xperimenting with changes to some of the auxiliary files.



Sample command line for the WordPerfect to T3 conversion program:



WPTOT3X doc.wp wp.cnv WtoTchar.dat out.t3 convert.cnv
-
v



Explanation of command line parameters and flags:



d
oc.wp the WordPerfect source file being converted



wp.cnv the file that specifies how T3 features are to be


translated into WordPerfect features during the


conversion.



WtoTchar.dat the name of th
e data file that maps WordPerfect
characters


to their T3 equivalents.



out.t3 the name of the T3 source file being generated which can


be imported into T3.



convert.cnv the file that is used during the

DOS import
-

it defines


tokens that appear in doc.t3.



-
v an optional flag meaning verbose
-

if it is set a number of
messages


are sent during the conversion.


-----------------------------------------------------------
--------------
--



Sample command line for the T3 to WordPerfect conversion program:



T3TOWPX doc.t3 convert.cnv out.wp TtoWchar.dat wp.cnv
-
v
-
s



Explanation of command line parameters and flags:



doc.t3 the T3 source file being c
onverted
-

this file is


generated from T3 by DOS exporting a document.



convert.cnv the file that was used during the DOS export
-

it
defines


tokens that appear in doc.t3.



out.wp the name of WordPerfe
ct 5.0 file to be generated.



TtoWchar.dat the name of the data file that maps T3 characters to
their


WordPerfect equivalents.



wp.cnv the file that specifies how T3 features are to be
translated


into Wor
dPerfect features during the conversion.



-
v an optional flag meaning verbose
-

if it is set a number of
messages


are sent during the conversion to describe the options set in
wp.cnv.



-
s an optional flag meaning small
-

if it is set

the thresholds for


mapping T3 font sizes to WordPerfect size attributes are all
raised


by 4 points. The effect is to scale down the printed WordPerfect


output. This is useful since it allows a larger amount of test


ou
tput material to be viewed on a single page. Similarly the
flags


-
s
-
s produce even smaller printed output and
-
L produces
enlarged


output.


=========================================================================
==


The auxiliary f
iles "WtoTchar.dat" and "TtoWchar.dat" respectively
control

the character mappings of the WordPerfect
-
> T3 and T3
-
> WordPerfect

conversions. A separate file is needed for each direction since there is

not a one to one character correspondence.


Eac
h of the character mapping files is a large editable ASCII file. The

beginning of each file contains a description of the mapping file format.

The character used when there is not a corresponding mapping is also

defined in the files. The undefined cha
racter for the WordPerfect
-
> T3

conversion is IBM #3, the club symbol. The undefined character for the

T3
-
> WordPerfect conversion is the question mark.


Not all T3 characters have exact equivalents in the WordPerfect sets AND

for any given printin
g environment, WordPerfect only implements some
subset

of its characters. Therefore the user may want to edit the mapping given

in "TtoWchar.dat" to suit a particular document and/or printer.


==========================================================
===============
==


The auxiliary file "wp.cnv" controls how various attributes are converted

between T3 and WordPerfect.



During the WordPerfect
-
> T3 conversion, WPtoT3 inserts user
-
defined

strings from "wp.cnv" into the output T3 file when WordPe
rfect size

attribute switches are encountered. For example, when the Extra large

attribute is turned on and off in the input WordPerfect file, the
following

commands are invoked:


256 Extra large on = <PshFnt><SetFnt IBM 17>

257 Extra l
arge off = <PopFnt>


The <> notation means that these lines are commands to the converter

WPtoT3. Tokens are put in the output T3 file
-

in this case a T3 font

switch to IBM 17 and back to the previous font. These font switches may
be

an

appropriate T3 mapping of the WordPerfect Extra large attribute IF THE

TEXT BETWEEN THE SWITCHES IS ALL ASCII TEXT (i.e. mapped to T3 font
IBM).


However, if non
-
IBM characters are encountered in the Extra large text,

more T3 font switches will be in
serted by WPtoT3, effectively turning off

the enlarged print.


Even worse is the case when the current T3 font at the time of a size

attribute switch is not IBM. Then the WRONG FONT will be selected in the

T3 output when the WordPerfect size attribut
e switch is processed. This

error will persist until another font switch is sent to T3 output.


Hopefully these problems will not be too inconvenient for users since
most

WordPerfect text is ASCII. Note that T3 has no general equivalent of the

WordP
erfect size attributes except within the IBM character set where

several point sizes are generally available.


The user can always turn off this mapping of WordPerfect size attributes

by changing lines 256 etc. in "wp.cnv". A string like [Extra Large
ON]
could

be used if notification of the WordPerfect attribute switch is wanted in
the

T3 output, or a blank line could be used for clutter free output.


-------------------------------------------------------------------------
--


While "TtoWchar.dat
" controls the T3 char
-
> WP char mapping, lines 335
to

355 of "wp.cnv" control a T3 char
-
> WP attributes mapping. Thus the
user

can control not only the WordPerfect character to be generated by a T3

character, but also a set of WordPerfect attributes

for the character.


Here is a list of WordPerfect attributes and their coded value:



Extra Large
-

1 Very Large
-

2


Large
-

4 Small
-

8


Fine
-

16

Superscript
-

32


Subscript
-

64 Outline
-

128


Italics
-

256 Shadow
-

512


Redline
-

1024 Double underline
-

2048


Bold

-

4096 Strike
-
out
-

8192


Underline
-

16384 Small caps
-

32768



Sample lines from "wp.cnv" range 335 to 355 and explanations:


337 T3 Italics font = Italics,11_127:256&



characters 11

to 127 are mapped to their upright counterparts in


"TtoWchar.dat". Then the Italics attribute (256) is applied.


341 T3 Script font = Script,65_90:384&97_122:384&



characters 65 to 90 and 97 to 122 are mapped to standard ACSII



equivalents. Then Outline (128) + Italics (256) = 384 attributes


are applied to substitute for a script version.


335 T3 Small font =
Small,1_63:32&64_90:32768&91_93:32&97_122:64&123_125:32&



characters 1 to 63 are implicit supe
rscripts i.e. small raised
versions


of characters that have normal versions elsewhere.


To translate them to WordPerfect, we map them to normal
counterparts


in "TtoWchar.dat", and apply attribute 32 i.e. Superscript.



et
c.




NOTE: ANY combination of attributes can be selected, but there are


many non
-
orthogonalities among the attributes. Some combinations


may be fatal to WordPerfect! T3TOWP makes no attempt to detect


illegal combination
s of attributes
-

it just turns them on and
off


blindly as they are called for by "wp.cnv".



The T3 face Underline is hard coded to the WordPerfect attribute
Underline.

The T3 face Bold is hard coded to the WordPerfect attribute Bold.

The T3

face Strike
-
out is hard coded to the WordPerfect attribute Strike
-
out,


but a flag on line 334 of "wp.cnv" can be used to turn this OFF.




CONTROLLING THE SIZE OF THE WORDPERFECT OUTPUT:


Lines 40 to 100 of "wp.cnv" map T3 font names to character

sets and point
sizes.


40 Font,Charset,Size = IBM,0,12

53 Font,Charset,Size = IBM Elite,0,10

55 Font,Charset,Size = IBM 17,0,17



( The user should make sure that all fonts listed in the font table


of "doc.
t3" are present lines 40 to 100 of "wp.cnv". )



Lines 321 to 325 of "wp.cnv" map these T3 font sizes to WordPerfect

size attributes thus controlling the print size of the WordPerfect
output.


Here are the values for a normal ( unscaled ) mapping:


320 Fine ( starts at ) = 0

321 Small ( starts at ) = 6

322 Normal = 10

323 Large = 14

324 Very Large = 18

325 Extra Large = 22




-
-------------------------
> pts


........)[...........)[............)[............)[.............)[.......
....


Fine 0 Small 1 Normal 1 Large 1 Very 2
Extra


6 0 4 8 Large 2

Large




Here are the values for a small ( scaled down ) mapping:


320 Fine ( starts at ) = 0

321 Small ( starts at ) = 10

322 Normal = 14

323 Large = 18

324 Very Large

= 22

325 Extra Large = 26



Note that the command line flag
-
s can be used to shift the values
given


in "wp.cnv" up by 4.




HANDLING T3 COLUMNS



Lines 326 to 330 control the translation of T3 columns.


326 gives
a WP code that may be inserted in place of a T3 column.

327 specifies a mode for columns that have only the halfline up


position occupied ( i.e. a superscript )

328 specifies a mode for columns that have only the halfline down


position occupied

( i.e. a subscript )

329 specifies a mode for columns that have only the halfline up


position and the halfline down position occupied


( i.e. a superscript over a subscript )

330 specifies a mode for complex columns ( i.e. not simple subscripts


or simple superscripts or super over sub )


The modes available for lines 327 to 330 are:


0 means translate T3 columns to the WordPerfect marker on line 326

1 means translate to !COL[top_index char1char2... bottom_index] notation

2 means tran
slate to WordPerfect subscript and/or superscript if possible


-------------------------------------------------------------------------
--


The "wp.cnv" file contains information on how various special symbols and

attributes are converted. The "wp.cn
v" file contains comments that

describe the file format. The user may wish to print out this file to
see

what features can be converted for special needs.


?