ArborX


taginfo

Longname: taginfo rmation   Open the Documentation Legend
Released: 7.80 
Created: 7.80 
See also: measure prop propval length lookup resolve string perl lump_expand Technote: 0080

Summary
A keyword used with function variables: ^[funcname parameter(s)]. This syntax can be used anywhere that a regular 3B2 variable can be used: in show strings, in scripts, in expressions, etc. Function variables are a V8 feature that uniforms variable use and functions into a readable syntax. The 'taginfo' function retrieves the tag information from within a showstring.
Example extract

The following show string will display the current value of the th command (text height).

 <?show ^[prop th]?>

Syntax (7.62)
taginfo tagname:s code:t
tagname:s

The required tag name.

code:t

The approriate code to retreive the specific information from the list sections below.

The area in 3B2 that the ttaginfo macro applies to is the info tag in the tbrowse dialogue box. You can view information about the tags e.g number of characters in a text stream or the dimensions of a graphic. The ttaginfo macro retrieves the tag information and passes it to variables for the user to access.

Retrieves the Raster Graphic File NAME of the image called 'mypic'.

 <?show $^[taginfo "mypic",rg_fname]>
In-Depth

Text Streams

Variable Name

Type

Meaning

tx_nc

number

number of characters

tx_ue

boolean

undo enabled

tx_be

boolean

blacklining enabled

tx_tge

boolean

text greeking enabled

tx_at

boolean

article threading enabled

tx_fs

boolean

stream frozen at start

tx_fe

boolean

stream frozen at end

tx_cs

boolean

stream cut at start

tx_ce

boolean

stream cut at end

tx_iret

boolean

on formatting ignore return

tx_imsp

boolean

on formatting ignore multiple spaces

tx_issp

boolean

on formatting ignore start spaces

tx_iesp

boolean

on formatting ignore end spaces

tx_isp

boolean

on formatting ignore all spaces

Object Graphics

Variable Name

Type

Meaning

og_width

number

width of graphic

og_height

number

height of graphic

og_top

number

bounding box dimensions

og_bottom

number

bounding box dimensions

og_left

number

bounding box dimensions

og_right

number

bounding box dimensions

Raster graphics

Variable Name

Type

Meaning

rg_type

number

graphic type- see below

rg_ftype

number

file type- see below

rg_bpp

number

bits per pixel

rg_width

number

width

rg_height

number

height

rg_pixelw

number

width in pixels

rg_pixelh

number

height in pixels

rg_fname

string

filename and path

rg_eps

number

size of EPS

rg_eps_res

number

size of EPS resource

rg_pict

string

name of picture object

rg_mirror

boolean

mirrored

rg_flop

boolean

flopped

rg_rotation

boolean

0, 90, 180, 270

rg_cp

boolean

clipping path

rg_cm

boolean

clipping mask

rg_lrw

number

low resolution width

rg_lrh

number

low resolution height

rg_comment

number

comment

Values for graphic type

Code

Meaning

100

bitmap

101

monochrome

102

RGB

103

Mac PICT

104

Palette

105

CMYK

106

OLE

Values for raster graphic file type

Code

Meaning

0

unknown

1

GEM

2

TIFF

3

PCX

4

Mac PICT

5

GIF

6

EPS

7

Windows BMP

8

JPEG

9

OLE

10

PNG

Page

Variable Name

Type

Meaning

po_width

number

page width

po_height

number

page height

po_nf

number

number of frames

Colour

Variable Name

Type

Meaning

cl_col

string

colour description

cl_ps

string

PostScript name

Font

Variable Name

Type

Meaning

fn_lname

string

long name

fn_sname

string

short name

fn_oname

string

old short name

fn_cpy

number

copyright

fn_sz

number

size

fn_lic

boolean

licensed

fn_ro

boolean

read-only

fn_wf

boolean

whole font embedded

fn_pf

boolean

partial font embedded

Bookmark

Variable Name

Type

Meaning

mk_type

number

type- see below

mk_tp

number

target page

mk_td

number

target document

mk_tt

number

target tag

mk_top

number

top

mk_bottom

number

bottom

mk_left

number

left

mk_right

number

right

mk_acro

boolean

Outline in Acrobat

mk_fit

number

fit- see below

mk_desc

string

description

mk_pg

number

Page for outline

Values for Bookmark Type

Code

Meaning

0,1

internal

2,3

external

4

URI

Values for Bookmark Fit

Code

Meaning

0

all

1

width-top

2

width-centre

3

width-bottom

4

height-left

5

height-centre

6

height-right

7

none

Namespaces

Variable Name

Type

Meaning

ns_ct

number

number of child tags

Boolean values are 1(yes) or 0 (no). Number fields are unformatted numeric values. Strings are text, for example: c:\download\picture.bmp
Example

This sets up the variables for everything that applies to the tag "body".

This will display the number of characters used in the tag "body". ttaginfo_tx_nc is the set variable for the number of characters. See below for further variables.

 ttaginfo "body" 5
 boxit ^ttaginfo_tx_nc^ 7

Document created on 11-Nov-2004 (revision 1)