Macro Language Reference > Macros > Frame > tftext
  
tftext
Description
Loads or assigns a text stream tag to the currently selected frame.
 
This macro is an alias of the tft macro; both being present for purposes of backward compatibility.
 
Example 144. Create a new text tag name and assign it to the selected frame
tft "_ _"
 
Example 145. Import text file to frame
This macro imports a WP file into the selected frame using the WP filter while tagging the paragraphs with <body>.
You must select a frame before using tft. The macro shown below imports a WordPerfect file into the selected frame, attempting to link it to the original file. (Because PTC ALD cannot write WordPerfect files, the user will be prompted to save a link to a new file in PTC ALD.3t format if any changes are made to the file.) The options simply convert keyboard quotes from the original file to English ` ' form, since PTC ALD WordPerfect filter automatically selects correct options to modify the file and character set. Paragraphs will be tagged with the Body style, unless they already have PTC ALD style coding for another paragraph style.
tft 1,"tx2",2,"c:/3d/test.wp5","qe","Body"
Syntax
tftext *:L? link:n? ( name:t ( filter:n file:s ( options:s style name:t? )? )? )?
tftext
[no parameter]
Invoke the Frame Contents dialog box.
*
Allow the tft macro to work on a dummy frame. This can be used to import text without needing a selected frame in a document to contain it.
* 
The asterisk must precede the entire parameter list to be effective.
link
0
Do not link to external file
1
Link imported tag with external file
name
Tag name of the text, e.g. tx1. If this does not exist, it will be created.
filter
File type:
-1
Automatic filter: PTC ALD will automatically use the correct file filter option if it can recognize the file type from those listed below.
0
ASCII
1
PTC ALD
2
Al-Arabic
3
DIF
4
Displaywrite RTF
5
Multimate II
6
MS Word (RTF)
7
WORDSTAR
8
WordPerfect
9
TeX
10
LaTeX
11
Write/WordPad
file
The name and path of the file to be imported.
If a specific encoding is to be used this must be specified on the front of this path or file in the form {:encoding}, e.g. {:utf-8}{.}demo.3d. Any encoding conforming to ICU standards (e.g. ISO-8859-1) can be specfied using the syntax above or in the dialog.
The most common encoding menu items are described below.
XML Encoding
Initiate auto XML from the Import types, using info from file header or BOM
PTC ALD Standard
PTC ALD modified ASCII
UTF-8
Standard
UTF-16
Standard
ISO-8859-1
Standard
* 
From version 7.06a onwards this parameter can now also take an arbitrary URI. e.g. http://www.mysite.co.uk/myfile.html
options
Options for loading the text stream:
8
Ignore 8th bit: characters that conform to the ASCII standard are 8-bits long. However, the 8th bit is never used for character representation. APP enables you to ignore this 8th bit.
1
Start a new paragraph for each line.
x
Ignore any coding of a file in APP format, e.g. characters in angle brackets or in typical show string sequence.
t
Preserve tab characters from the original file.
n
Treat end of line character as line feed (not carriage return) character.
z
Ignore word processor controls.
u
Preserve multiple spaces.
v2
Convert multiple spaces to tabs.
y
Preserve initial spaces.
e
Preserve exact mark-up.
qe
Convert keyboard quotes to English or Spanish “ ”.
qg
Convert keyboard quotes to German „ ‟
qs
Convert keyboard quotes to Swedish ” ”.
qn
Convert keyboard quotes to Norwegian or Russian « » (guillemets set tight against the word).
qf
Convert keyboard quotes to French or Italian « » (guillemets set with a space against the word).
qd
Convert keyboard quotes to Danish » « (reversed guillemets).
qo
Convert keyboard quotes to ‟ „.
q{"/"}
Convert keyboard quotes to the characters shown either side of the / character. These characters can be edited by the user: for example, the option to surround words in quotes with the wordsOPEN and CLOSE, would expressed as: q{OPEN/CLOSE}.
--
Toggle inversion of a selected character map on or off before applying it to the incoming text stream. The hyphen should be applied before the relevant character map option.
a
Convert text from Ansi character set.
i
Convert text from IBM character set.
o
Convert text from IBM Danish character set.
g
Convert text from IBM Greek character set.
b
Convert text from SmartFont (TextData) character set.
c
Convert text from Mac character set.
s
Convert text from ISO character set.
[...]
Enclose the name of a character map used to import text.
* 
These options are the same as those listed under the Load frame text > Options dialog box.
style name
The name of the style tag with which you want to tag paragraphs in the imported file are not already tagged.
Related Links