punctum
Gesellschaft für Software mbh Rotteckring 19 D-79341 Kenzingen Germany Tel. +49 7644 913016 Fax +49 7644 913018 http://www.punctum.com EMail: <punctum@punctum.com> |
The text converter
Format Code |
Text Processor | Input | Output |
---|---|---|---|
as400 | IBM Office Vision/400 Text | * | |
ascii | PC ASCII text without attributes | * | * |
butler | Philips Butler/Master | * | |
clou | Siemens-Hit CLOU-Baustein | * | |
dcarft | DCA-RFT for IBM DisplayWriter4/5 etc. | * | * |
dcf | IBM DCF, Script/VS | * | * |
ebcdic | IBM EBCDIC without attributes | * | * |
euroscript | Euroscript à la carte, XYWrite | * | * |
hit | Siemens Hit >= V4.0, 3.4 | * | * |
hit2 | Siemens Hit V2.0 | * | * |
lex | LEX (BACS) V9 | * | * |
msword | Microsoft Word (DOS) >= V4.0 | * | * |
pcwrite | PC-Write >= V2.71 | * | * |
prisma | PRISMATEXT >= V4.0 | * | |
q1 | Q1, Q-Office (Quadraton) | * | |
qa | Q&A resp. F&A | * | |
rtf | RTF: MS-Word, Works | * | * |
ta525 | Triumph Adler SE 525 | * | * |
texass | TEX-ASS resp. DATEV TEXT | * | * |
uniplex | Uniplex II | * | * |
ventura | Ventura Publisher | * | |
wang | Wang VSDMS | * | |
wbasic | WordBasic (MS-Word macros) | * | |
wmarc | WordMARC Composer Plus >= V6.2.1 | * | * |
wperf | WordPerfect >= V5.0 | * | * |
wordplus | Wordplus, 1st Word (Atari) | * | |
wordstar | WordStar >= V3.4 | * | * |
The software is installed by a simple copy from the distribution diskette to an empty directory on your harddisk. For MS-DOS this may (for example) be accomplished by the commands:
c: mkdir \putrans cd \putrans copy a:*.*
For Unix you use a command like:
tar xvf /dev/rfd0
The device name of the floppy disk drive may be different on your system. After copying you should make the program executable for Unix:
chmod 111 putrans
and its directory should be a member of $PATH.
The sample files *.hit on the distribution diskette were transformed by
putrans -hit -rtf gourmet.hit gourmet.rt2 fc/b gourmet.rtf gourmet.rt2 (MS-DOS) cmp -l gourmet.rtf gourmet.rt2 (Unix)
The converter is activated with the following command:
putrans [-sourceformat [-targetformat]] [inputfile [outputfile]] -ascii -ascii CON/stdin CON/stdout
The specifications in square brackets may be left out. In this case, the defaults of the 2nd line apply. The target format may also be specified behind the input file.
Die Formatkennungen werden mit einem Bindestrich angegeben und können abgekürzt werden, solange sie eindeutig bleiben, z.B. The format codes are specified with an initial hyphen, they may be abbreviated as long as they remain unique, for example -dca for DCA-RFT. The filenames may have a drive and/or path specification. Format codes and filenames can be written in any order as long as input specifications preceede output specifications.
Under Unix you have to write normal slashes '/' instead of the backslashes '\' in the following examples.
For the conversion of a Hit file into ASCII (PC character set) you call:
putrans -hit bilanz bilanz.asc
From Uniplex to Hit you may use:
putrans -uni -hit \usr\gfi\texts\manual.doc \usr\tmp\manual.hit
You may want to convert all Hit documents in a directory to RTF for MS-Word. On the MS-DOS prompt you write:
mkdir temp for %x in (*.hit) do \putrans\putrans -hit -rtf %x temp\%x > nul ren temp\*.hit *.rtf
The title message of the program is suppressed in this case. Please note that you have to duplicate all % characters in the FOR command if you include the FOR command in a BATch file!
The activation for a CLOU conversion has a slightly different form:
putrans -hit baustein.hit -wbasic makro.wba -clou -clou=2
A series of generated WordBasic files may be loaded automatically into the current template (NORMAL.DOT) by a macro which is included in the distribution.
In the full version the converter may be installed in the converter menue of MS-Word. Only a single format is supported by a converter DLL in this case. After the installation you may open a foreign format document in MS-Word. The conversion will take place in the background without user interaction, and the converted text will be placed in the editing window. Likewise you may store the document in the foreign format with the "Save as, Options" menues. Please perform the following steps:
copy a:putrans.dll c:\MS-Word
copy a:putrans.par c:\windows
copy a:putrans.msg c:\windows
cd \windows
edit win.ini resp.
edit MS-Word6.ini
Hit V4.0=Hit V4.0, C:\MS-Word\PUTRANS.DLL, hit
TEX-ASS=TEX-ASS, C:\MS-Word\ptdatex.dll, tat
Until V1.1 you specifiy the new converter in the section [Microsoft Word], and you have to correct the numbering:
[Microsoft Word]
CONVNUM=2 <--- current number of converters
CONV1="Microsoft Word (DOS)" C:\MS-Word\CONV-WRD.DLL ^.DOC
CONV2="Hit V4.0" C:\MS-Word\PUTRANS.DLL ^.HIT
Conversion=Yes
The converter can be parameterized for special purposes in a number of ways. The parameters are written one per line in the parameter file putrans.par. Alternatively or in addition you may specify parameters in the form "-name=value" on the command line.
Numerical parameters normally have 0 as default, while string parameters default to the empty string.
The following table lists all possible parameters. The last column indicates for which formats the parameter takes effect. (A = AS/400, H = Hit, T = TEX-ASS).
name | value | description | format(s) |
---|---|---|---|
fehl | =0 =1 |
no error message when .TAF file is missing
print error message when .TAF file is missing | T |
komm | =0 =1 |
suppress functions which are not converted
generate comments for functions which are not converted | T |
lnum1
lnum2 ... lnum9 | =n1
=n2 =... =n9 | starting values for running numbering | T |
text1
... text4 | =text
... =text | text parameters | T |
form | =name | name of the format file | T |
ersatz | =pfad | search .TAF in this directory | T |
breite | =mm | paper width in mm, default 210 | H,T |
n1 n2 n3 |
=old1#new1 =old2#new2 =... |
translation of 1st field name translation of 2nd field name ... | T |
feld | =0 =1 |
remove field definitions
take DATEV TEXT field names | H,T |
font0
font1 font2 font3 | =name
=name =name =name | mappping of fonts | H,T |
fs0
fs1 fs2 fs3 | =10,8,7
=11,9,8 =12,10,9 =12,10,9 |
font sizes for 10,12,15 cpi for font 0
same for font 1 same for font 2 same for font 3 | H,T |
bau | =0 =1 |
generate reference to include file
insert contents of include file | A,T |
box | =0 =1 =2 |
replace box characters by spaces
replace box characters by + - | generate box characters for font "MS LineDraw" | T |
ref | =0 =1 =2 |
field references without "REF"
field references with "REF" field references without "MERGEFIELD" | T |
stop | =0 =1 |
replace stop codes by bookmarks
replace stop codes by empty bookmarks | H,T |
vorz | =text | prefix for numerical field names, default 'U' | T |
zeile | =0 =1 |
floating text
generate hard line ends | A |
align | =0 | ignore alignment in Hit ruler lines, default: 1 = do not ignore | H |
datum | =dd.MM.yyyy | format for print date | H |
clou | =0 =1 =2 |
ignore CLOU commands
convert CLOU commands to hidden text convert CLOU commands in WordBasic | H |
fonts | =C10,C12,LP |
mapping between Hit fonts and RTF fonts (1st font <-> RTF font 1, 2nd <-> RTF font 2 etc.) | H |
hitmark | =32000 | max. number of Hit markup lines to be output | H |
hitlin | =32000 | max. number of Hit ruler lines to be output | H |
hnzeil | =0 =1 =2 |
floating text instead of Hit line endings
hard newlines instead of Hit line endings paragraphs instead of Hit line endings | H |
tabex | =0 =1 |
do not expand tab codes
expand tab codes to spaces | H |
warn | =10 | width of the warning zone at right margin | H |
In addition the converter needs the file putrans.msg, which contains the error message texts in the specific national language. Both files must reside in the directory of putrans.exe.
The converter generates RTF and not the binary MS-Word .DOC format. The latter format changes with each version of MS-Word, and Microsoft recommends the use of RTF for external converters for this reason. The converters for WordPerfect, WordStar etc. distributed with MS-Word also have to go this way. RTF is fully compatible with the binary format, and all attributes of MS-Word can be represented in this format. RTF files often are much smaller than the binary equivalents, and they may easily be transferred by electronic mail.
MS-Word recognizes RTF automatically when opening a file. For writing, you must use the menues "Save As, Options, RTF".
If the DLL of the full version of
MS-Word can display the PC characters for single and double frames
around boxes only via the
special font
The demo version translates the characters
p u n c t m P U N C T M 0 2 9
to spaces. All other properties of the software, especially the conversion of the formatting attributes, are the same as in the production version.
The textconverter
The software is written in a very modular and portable standard C. On request we can easily port it to other systems.
Besides the text converter we offer many other converters for:
We expand our product palette continuously, and we develop new converters on request.
Last modification: 18-May-2003
Please direct any questions or comments to:
<punctum@punctum.com>, Dr. Georg Fischer.