Description of the extended syntax for TaggedText as it can be used in textmodel, frame und table.

Unfortunately, despite a long search, we have not been able to find an official documentation for TaggedText from Adobe. Here you can find an old description for CS 4 (boah, 2008!). But still ...

Here you will find examples to use TaggedText.

Version :
12.03.2024, 15:56 Uhr

Default encoding for characters with a Unicode ≥ 128 (0x80) is UTF-8. All UTF-8 characters including the 4-byte characters are supported. This allows to map up to 17 million Unicodes (of the "only" 1.7 million defined). One of the following possibilities is allowed as input:

Preferred input for TaggedText are the <0xXXXX>-Tags.

Please note that fonts do usually not contain 'letters' for all Unicode characters. To make characters visible, a suitable font may also have to be selected.

Except for the direct notation, all representations have the disadvantage that only characters with a Unicode up to max 65,535 (0xFFFF) can be encoded. To encode characters with a Unicode ≥ 0xFFFF, one of the following representations can be used:

Prefered input for TaggedText are the UTF-16 tag pairs <0xXXXX><0xXXXX>.

Simple text is inserted directly into the document. It is recommendable for all situations in which the text to be inserted can assume the applicable format of the document at the point of insertion.

Hello World!

textmodel::insert ("Hello World!");

The text can contain style information. A style information starts with a case sensitive style tag. This tag can contain further information about the tag. And the tag ends whether with the matching close-tag, or with a redefinition of the tag.

Hello
World
!

Hello <cUnderline:1>
W<cSize:14.0>o<cSize:18.0>r<cSize:24.0>ld<cSize:>
<cUnderline:>!
The following tags are defined :
Tag Description
<CharStyle:stylename> Name of style format defined in the document (panel 'Character Styles')
<cSize:48.0> Size of text in points
<cFont:fontname [, face]> Font name and an optional font face. If the font face is is missing, 'Regular' is used. Font name and face have to be quoted.
<cUnderline:1> Only the value 1 is supported
<cStrikethru:1> Only the value 1 is supported
<cCase:All Caps> All Caps, Small Caps

Please note that comet_pdf only converts to upper case even when using Small Caps. See also here.

<cPosition:Superscript> Superscript , Subscript, Superior, Inferior, Numerator, Denominator
<cSkew:30.0> Values in the range of -85.0 and 85.0. The attribute is ignored by comet_pdf.
<cCharRotate:30.0> Values in the range of -85.0 and 85.0. The attribute is ignored by comet_pdf.
<cColor:r, g, b>
<cColor:colname [, tint]>
You can define colors by a color name (enclosed in single quotes) or by its RGB values in the range of 0-255. Colors defined with names can optionally be specified with a tint value in the range of 0-100.
<cStroke:r, g, b>
<cStroke:colname [, tint]>
You can define colors by a color name (enclosed in single quotes) or by its RGB values in the range of 0-255. Colors defined with names can optionally be specified with a tint value in the range of 0-100.
<cKerning:k> in 1/1000 em quads as integer

Directly import InDesingn Tagged Text : Text must be in format Verbose/ASCII-WIN and can contain Comet placeholders.

Tagged text is not always the best solution: Tagged text uses the text attibutes (color, font size, character style, ...) of the current paragraph, but local overrides at the insertion point are not applied to the import! All local overrides are expected to be given in the import itself.

To apply local overrides at the insertion point also to the imported text, use plain text only!

You can omit the long and complex InDesign Tagged Text trailer. Mark this texts by a trailing %!TT, %!T+, ... . The text can contain Comet Tags, but must be given in Verbose syntax : ParaStyle instead of pstyle, CellStart instead of clStart and so on. All used paragraph, character, table and cell styles of the import text are collected before insertion and the required tagged text header is generated automatically. The description of the styles itself is empty:

<DefineParaStyle:NormalParagraphStyle=>
<DefineCharStyle:Superior=>

To make the empty styles not overwrite existing styles in the document, the import option

    Resolve Text Style Conflicts Using : Publication Definition

must be set. To set this option, proceed as follows:

  1. Choose menu File -> Place ...
  2. In the appearing file selection dialog set the option Show Import Options at the bottom left.
  3. Select a (short) text file
  4. Now the dialog with the import options for TaggedText appears. Select Publication Definition for Resolve Text Style Conflicts Using.
  5. Don't forget to disable the Show Import Options option!
If the import option for resolving style conflicts is set correctly, the imported text now uses the current style definitions of the document. Missing style definitions are created automatically. You recognize these styles in the corresponding panels by a small hard disk symbol behind the name.

The empty styles cause insertions to use the definitions of the target document. If a style is not defined in the destination document, a new empty style will be created there, which you will recognize in the style panel by the odd little disk icon.

%!TT texts should start with an introductory <ParaStyle: ...>. The first ParaStyle tag directly behind the trailer does not create a new paragraph! However, it is necessary for import control in the following way:

Formatting instructions can be added to text as follows :
Texttyp Prefix Comet Tags Short description
Simple Text   - Simple text. The text may contain special formattings for characters.
Tagged Text <ASCII-WIN> see here Classic InDesign® Tagged text as generated by InDesign® when exporting. The text may contain Comet tags.
Tagged text without style definitions %!TT see here

Like tagged text, but without header. Used styles, colors, etc. should defined in the document, otherwise empty definitions are created.

If the introductory paragraph definition is empty (<ParaStyle:>), the paragraph style at the insertion point is left unchanged.

A defined paragraph style in the first ParaStyle is applied. Other paragraph properties will only be applied if entire paragraphs are inserted.

The name "TT" derives (quite clearly) from the word TaggedText.

%!T+

since v4.0.5 R9401 Like %!TT, but local overrides will not be removed.

The name "T +" is a summary of "TT" and the (not applied) + remover.

%!CC

since v4.0.5 R9401 Like tagged text, but paragraph properties in imported text will, as far as possible, be converted into local character attribute changes. Thus, e.g. the color of the inserted text may be different from the color of the surrounding paragraph. Pure paragraph properties such as text orientation or indentation but not taken from the import.

This behavior corresponds to the InDesign® behavior in Copy/Paste, hence the name "CC" from Copy.

%!PP

since v4.0.5 R9401 Like %!TT, but all paragraph properties of the imported text are applied to the entire paragraph of the insertions. Local overrides will be removed.

The name "PP" is based on the abbreviation "TT", except that the Paragraph properties are in the foreground here.

%!P+

since v4.0.5 R9401 Like %!PP, but local changes are not removed.

The name "P +" is derived from "PP" and the (not applied) + remover.

XPress mark %!XT see here  

Paragraph properties, generally spoken, all tags starting with 'p' or 'bn' (list properties). For a complete list of all tags supported by TaggedText, see here.

TaggedText is often incomplete, especially in terms of the used paragraph, table, and cell styles. The priint:priint:comet InDesign® Plug-Ins therefore offer the possibility of self corrections of the text before import. More information can be found here.

The auto correction is typically enabled in the script statements to import the text (for example, textmodel::insert). To activate the self correction directly in the text, replace the ! of the trailer by the encoded value of the correction flags. This information has priority over the auto correction flag in textmodel::insert et al .. For the encodings see the following table.

Please note: The following auto-corrections are supported only in native import mode:

Trailer 32 Repair hyperlinks 16 Replace <in:> by <w2inline:> 8 Check tables 4 Fix all parastyles 2 Fix parastyles in table cells 1 Fix parastyles empty in table cells
!
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
#
*

Activate the auto correction flags 2, 4, 8 and 16 directly in the text to insert.

%UTT... because in the line U the bits 16, 8, 4, and 2 are set

The inserted text may contain text placeholder. Missing placeholder definitions are loaded automatically from the database. Placeholders that are not defined in the data pool are removed.

The inserted placeholders are loaded automatically. Using the hint

autoload=off // on

you may suppress loading inner placeholders. The hint must be given at the very beginning of the inserted text still before the %!.. marker in exactly this notation and is available since v4.1 R24333.

In cScript calls to frame::replace et. al. the automatic loading of the inner placeholders can also be suppressed by the parameter autoload. If the inserted text contains the import hint autoload=off/on, this parameter is ignored.

Placeholders inside text placeholders are inserted and loaded unless otherwise specified. After that the placeholders (but not their contents) are removed from the text and the current placeholder also placed over the text of the inner placeholders too!

Here is a simple example for suppressing the autoload using a function variable.

"grids.xml"
#pragma var "myautoload" "" "autoload=on" "autoload=off"
select <myautoload> || "%!TTaaa PLACEHOLDER zzz" node grids.grid where id = 0

Since v4.1 R22423, 30. Apr 2018 Instead of InDesign®-TaggedText, the text can also be HTML-formatted. HTML-formatted text is marked by _html_ directly behind the %!TT trailer.

Insert "Hello world!" into the document. The character style "red" must be defined in the document!

%!TT_html_Hello <span class="red">world</span>!

To insert TaggedText inside the HTML you use the pseudo tag &lt;?IDTT ?>. To enter non-xml-compliant control characters for TaggedText, use the pseudo tag <?ACE ?>.

Please note that font style tags like <i> or <b> need a font before they can applied otherwise the font at the insertion point inside thr document is used. More information you will find here..

See the next screen shots for an explanation of how the prefixes are working. Imaging, you have two paragraph styles defined in an InDesign® document (The german word 'Schräg' means 'Italic' in English :-)):

The following placeholder takes its current text from the document and assumes, that is a valid prefix.:
#include "internal/text.h"
int main () {     String str = string::alloc ();     char tt [2048];          textmodel::gettext (str, 0, 4, kExportPlain);          sprintf (tt, "%s%s%s%s",         string::get (str), // Prefix         "<bnListType:Bullet><cTypeface:Bold>",         string::get (str),         "<cTypeface:> Aufz<0x00E4>hlung<bnListType:>");          textmodel::replace (tt, 0, -1);          return 0; }

The image now shows (on the left side (VORHER means BEFORE)) different situations of a placeholder in the document. On the right side (NACHHER means AFTER) you can see the loaded placeholders. No one of the placeholders should set a new paragraph style, but %!PP and %!P+ are setting a bullet point. In addition, with %!P+ all local overrides are still there, GRüN (GREEN) and BLAU (BLUE) are not black.

Now we add a para-style at the beginning of the text:

    "<ParaStyle:HTML\\_comet\\:UnorderedList-li>"

The the results are as shown below. Sll placeholders are setting the requested para style. But only %!PP and !%P+ are creating the bullet points. And, in addition, only the +-prefixes keeping the local overrides.

While inserting formatted text the current paragraph settings are used. But any character style settings differing from the paragraph style definition are ignored.

Imagine a paragraph style with the font Courier and a font size of 20 points defined. But at the insertion point the current font is changed to Arial 30. The inserted text will be inserted using Courier 20. In the following example a superscripted number with an extra small size shall be inserted after nr

  %!TT14<CharStyle:Superior>.01

  Littera gothica quam nr.

  Littera gothica quam nr 14.01.

You may expect that the 14 gets the big Arial font and the 01 Arial after all. The problem is the conflict between the two contradicted style setting from the current text and the inserted text. In this case, the new settings are winning - and the new settings say nothing about a (bigger) font.

Normally you can not know the current settings at the insertion point. What you need is a joker, that gives you the current settings automatically at run time. Well, here it is! You can use jokers as often as you need it. But be aware, a joker ends at the next character style (<CharStyle:...>) or paragraph style (<ParaStyle:...>) usage inside your tagged text.
Application Syntax Description
Complete <???> The joker is replaced by all text settings differing from the current paragraph settings.
Partiell <???: style1:style2...> The joker is replaced by all text settings differing from the current paragraph settings except the colon (:) seperated properties. All character properties defined by InDesign® TaggedText allowed here, for a complete list of this keywords see here.

You may know nothing about the insertion point, but you know the character style you use inside the %!TT text. So, if you know, for instance, the character style uses its own font size, ommit the fontsize from the joker by using (<:???:cSize>)

Using jokers, you can handle the above example (Littera gothica quam nr.) well. Starting your text with a complete joker will show the 14 in Arial 30.

  %!TT<???>14<CharStyle:Superior><???>.01

  Littera gothica quam nr 14.01.

Thats nearly okay. Only the font size of 01 is wrong, your character style deinition of Superior says 10, not 30 points! The second joker must suppress the size information from the document!

  %!TT<???>14<CharStyle:Superior><???:cSize>.01

  Littera gothica quam nr 14.01.

As an advertent reader you notice, that %!TT and jokers are not necessary in the example above. It is enough to import 14.01 without any tagged text! The only thing you need is a simple hint for 01 using the character style Superior, see Character styles of simple text.

  14<CharStyle:Superior>.01

  Littera gothica quam nr 14.01.

If your situation is simplified to such a solution, you should perfer the simple and fast simple text with character styles.

Only to remember and to see, how mighty jokers are, a list of all InDesign® tagged text character options :
Typ Tag
Basic character formats cFont
cSize
cTypeface
cAutoPairKern
cLigatures
cTracking
cCase
cKerning
cLeading
cNoBreak
cUnderline
cPosition
cStrikethru
Advanced character formats cHorizontalScale
cVerticalScale
cSkew
cBaselineShift
cLanguage
Character Color cColor
cStrokeColor
cColorTint
cStrokeTint
cStrokeWeight
cOverprint
cStrokeOverprint
OpenType Features cOTFOrdinal
cOTFFractions
cOTFDiscLig
cOTFTitlAlt
cOTFContAlt
cOTFSwaAlt
cFigureStyle
Underline Options cUnderlineColor
cUnderlineGapColor
cUnderlineGapOverprint
cUnderlineOverprint
cUnderlineGapTint
cUnderlineOffset
cUnderlineTint
cUnderlineWeightOffset
cUnderline
Strikethrough Options cStrikeThroughColor
cStrikeThroughGapColor
cStrikeThroughGapOverprint
cStrikeThroughGapTint
cStrikeThroughOffset
cStrikeThroughOverprint
cStrikeThroughTint
cStrikeThroughWeightOffset
cStrikeThroughType

To import XPress marked text, prefix this text with %!XT. You may use text::xpress_to_tagged to check whether you get the expected results. More about technical details you can find at cxTexttempl2IQuest.

You can insert hard and soft returns into the document using the following tags/characters:
Type Input Description
%!TT <ParaStyle:...> New Paragraph, possible without a style name, see here for more information
<nl:> Paragraph delimiter. But in contrast to <ParaStyle:...> the current paragraph style is used always.
<add_para_delim:>

since 4.1.8 R27406 and for InDesign® only

Placeholders over several paragraphs are marked by InDesign with modified line separators in the tagged text (see here). To prevend these line delimiters from the auto-corrections made by the priint:comet text import they must be specially marked. After automatic text correction the tags are replaced as follows:

  1. <add_para_delim:> are replaced by the correct line separators (\r\n)
  2. <rm_para_delim:>\r\n are removed
  3. Remaining <rm_para_delim:> are removed

<rm_para_delim:>
\n soft return
\r ignored
\r\n
%!XT \n hard return
<\n> soft return
<\#10>

Tag Name Syntax Description
Text placeholders
w2<w2:...>your text</w2> The text enclosed be this tag will become a placeholdered text with the definitions giving in the start tag.

You may use <w2:> as end tag tag too.

w2cross <w2cross:...> Create a cross reference destination. There is no closing tag defined.
outw2 <outw2:type 1, color 0>your text<outw2:> Placeholder prefix/postfix. See here for more information.
Inlines
in <in:...>any text</in> Create an inline frame inside the current text. You can fill the inline frame with any content you like and link the frame it self too. In tags are able to be nested.

You may use <in:> as end tag tag too.

w2inline <w2inline:...>any text<w2inline:>

Since v4.1 R21000 The tag is the same as the <in:> tag, except that it is integrated into the default import export of TaggedText, so it can be used in more deeply nested tables.

If your previous implementation works well with <in:> tags, there's no reason to change that. For new implementations, we strongly recommend using the new <w2inline> tag.

graphiccell <graphiccell:...>any text<graphiccell:> Since v4.0.5 R21000 and CC2015 Convert a table cell into a graphic cell and shape the new frame.

This tag is only useable in table cells!

floating <floating:...>any text</floating> Create a floating frame beside the current text position. Definition of floating box is given in the start tag. The text enclosed by the tag becomes the content of the floating frame.

Not supported since R 333 (11. April 2007). Use cscript functions frame::inline_, frame::inline_above, frame::anchor and frame::gt_anchor or textmodel::inline_, textmodel::inline_above, textmodel::anchor and textmodel::gt_anchor instead. Releases prior R 333 (11. April 2007) must have the FloatingElements plug-in installed.}
Tables
w2table <w2table:...> Table information for the table module.. See here for more information.
w2cell <w2cell:...> Cell information for the table module.. See here for more information.
Paragraph delimiters
nl<nl:>Insert a hard return (new paragraph).
w2para <w2para:> Placeholdered paragraph delimiter. See here for more information.

Without the plug-in Comet or one of its variants InDesign® does not "know" the above tags and can of course not import this tags therfor. The tags will appear as plain text in the document.

Since v3.3 R2580, 1. Aug. 2011 The priint:comet tags

are integrated into the native InDesign® TaggedText export and import.

With the menus

you can turn on the native import and export. Using the cScript functions you can set the export/import behaviors in scripts.

See next table for detailed information :
Format/Action Remarks
InDesign®-TaggedText-Export

Native Export If the option Write Placeholders To TaggedText is activated, all priint:comet placeholders and their definitions are written into the exported TaggedText.

ATTENTION Inlines and graphics cells are not supported for TaggedText by Adobe and unfortunately we can not extend this. So, this information will be lost on export.

Local Export If the option Write Placeholders To TaggedText is deactivated, no priint:comet tags are written into the result. Due to some technical reasons, the export cannot completely suppress the placeholder export. We write empty paragraph styles definitions into the output instead

    <dps:>

This tags will have no effects to the imported text.

InDesign®-TaggedText-Import

Native Import If the option Read Placeholders From TaggedText is activated, priint:comet tags are applied on import. For w2 tags their definitions must be available either through the tag itself or from the connected data source. W2 tags with no definitions are ignored and not taken into the document.

ATTENTION Graphics cells are not supported for TaggedText by Adobe and unfortunately we can not extend this. The tags are imported as text like all unknown tags.

Local Import If the option Read Placeholders From TaggedText is deactivated, priint:comet tags are ignored (and will NOT appear as text in the document as well).

kExportTagged, <TaggedText>
kExportTT, <tttext>
Regardless of the setting of the menu, the exported text will not contain any priint:comet nor empty <dps:> tags.
kExportW2, <w2text> Regardless of the setting of the menu, the exported text will contain all priint:comet tags and their current definitions.
Import by priint:comet functionalities (e.g. textmodel::insert) and text trailer %!TT

Native Import If the option Write Placeholder To TaggedText is enabled, placeholders and w2inlines are created directly during import. If there is no definition of the placeholder (LoadID, SyncID, ...), an empty placeholder with the placeholder ID 0 is created.

Local Import If the option Write Placeholder To TaggedText is disabled, then the import is much more complex. Since InDesign® does not know our tags, it would import these tags as Text into the document. Therefore, we filter all our tags out of the text before importing them and remember their text positions and contents. This information is then placed after the import over the imported text. The critical thing hre is the prediction of the text position from the TaggedText alone. For example the length of table anchors is not predictable and the content of variables, including their text length, is only known after the import.

We strongly recommend activating the native import!

Use this tag to link parts of the text with placeholders. Placeholder and record IDs are expected to be integers. The (optional) record string ID is expected to be a quoted string.

<w2:
placeHolderID,
 	recordID [, recordID2 [, recordID3 [, recordStringID
 	[, definition]]]
 	[, infos1 string]
 	[, infos2 string]
 	[, prefix string]
 	[, prefixifempty string]
 	[, postfix string]
 	[, postfixifempty string]
 	[, created string] -- in the format YYYYMMDDhhmmss
 	[, modified string] -- in the format YYYYMMDDhhmmss
 	[, rules string]
 	[, functionvariables string]
 	[, valuehashes string]
 	[, apply_infos int] -- Apply info1 and 2? 0 or 1.
 	[, static_link int] -- Fixed product ID? 0 or 1.
 	[, state int] -- Status of placeholder, see here (since v4.2 R32030).
>

Take care to insert at least one letter between the opening and the closing tag.

An example of a text placeholder including a string ID you will find here.

Giving the placeholders definition isn't necessary. This values are able to determine from the data pool by the given placeholder ID. But if you give the values inside the start tag, this requests can omitted and the speed of document building can be forced up up to 40%. The following values (after the trailing key word definition) in this order and by blanks seperated only) are expected :

  1. classid
  2. relatedto
  3. load
  4. store
  5. sync
  6. lov
  7. charStyle
  8. colorid
  9. syncstate
  10. loadConstraint
To get the placeholder options, use one of the folloing steps :
  1. Ask the data pool
    select * from placeholder where id = [your ID];
  2. Create a placeholder of the given type in your document and get its values from the panel Placeholder Options.

Since Version 2.1, R 703, 6. May 2008 Set the content of the placeholder properties Infos1 and Infos2. If the placeholder definition is read from the datapool (and not given by a definition attribute), this values overriding the the Infos1 and Infos2 attributes given in the datapool.

Dince version 4.1, R10822, 9. April 2016 You may define the values of function variables inside a w2 tag by using the keyword functionvariables. The definitions are give in one string consisting of triples of sub-strings. Every triple consists of a name, the value and the action type:

    '"Name1" "Value1" "ActionType1" "Name2" "Value2" "ActionType2" ...'

Triples are delimited by blanks. The following action types are defined:
Value Action
1 Load script
2 Save script
3 Sync script
4 Build script

Tis is the definition of a placeholder with the function variable myA set to "a2" and myB set to "prolet":

<w2: 20, 0, 0, 0, '',
 	functionvariables '"myA" "a2" "1" "myB" "prolet" "1"'
>dummy
<w2:>

Since Version 4.1, R21700 w2-Tags may define layout rules. A complete list of all built-in text layout rules you can find here. Layout rules defined by the keyword

    rules

The rules definitions are the same like in other placeholders, see here for more information. Take care to escape all quotas inside your definitions!

Define the text layout rule "Apply paragraph style" with style "blue"

rules '-2 2 ''blue'' '''' ''no'' '''''

Since Version 4.1, R21700 Using the =-tool of the ToDos panel you can fix the sync state of any placeholder. usng the keyword

    valuehashes

you can set such a fix even on a placeholders creation. You will need a hash code of the fixed value. To retreive the valid hashcode, please export an according placeholder to TaggedText and copy/paste the hashcode from the export.

Here's an example:

valuehashes 'd41d8cd98f00b204e9800998ecf8427ec7cc14b03ef32c175907b93021dee7e0'

You may define pre and post fixes of a placeholder inside its w2 definition by using the keywords

    prefix
    prefixifempty
    postfix
    postfixifempty

inside the w2 tags. Values must be given as strings always.

This is the definition of a placeholder with a prefix:

<w2:
 	20,
 	0, 0, 0, '',
 	prefix '# pStyle "NITRO"',
 	prefixifempty '# pStyle "GLYZERIN"'
>
dummy
<w2:>

As you probaly know already, TaggedText and InDesign® is a very sensitive couple. One of the main reasons for wrong imports (or even crashes) are wrong line delimiters before paragraphs. To minimize import errors, the priint:comet InDesign® Plug-Ins are fixing this line delimiters right before the import: At first we remove all \r and \r\n from the text. In a second step we insert \r\n before every <ParaStyle:...>. Unfortunately, there are two cases where we can not decide if that's right:

The first case occurs when a paragraph delimiter at the end of a paragraph still belongs to a placeholder:

To recreate this, the following TaggedText is necessary:

<w2:definition>abc\r\n
<w2:><ParaStyle:...

The plug-ins auto-correctur will remove \r\n right behind abc and insert a new \r\n\ before <ParaStyle and the paragraph delimiter will not become a part of the placeholder around abc.

Here's a screen shot of the situation:

To recreate this, the following TaggedText is necessary::

abc<w2:definition>\r\n
<w2:><ParaStyle:><w2:definition>

The solution is the same one in both situations: You have to tell the import, where to put the paragraph delimiter. The way you can do this is inserting the WERK II tag <w2para:> at the right position in the tagged text. The import then will (after it fixed the paragraph line delimiters) look for all pairs of <w2para:> and their occording <ParaStyle:> and will move the line delimiter from the ParaStyle to the w2para. The <w2para:> is removed. If a <w2para:> has no according ParaStyle, it is removed silently (without adding a \r\n).

Case 1: Include paragraph delimiter

<w2:definition>abc <w2para:><w2:><ParaStyle:...

Case 2: Include previous paragraph delimiter

abc<w2:definition> <w2para:><w2:>ParaStyle:><w2:definition>

The tag defines a prefix/postfix for a placeholder: If the tag is placed directly before a w2 tag and has the value type 1, a prefix is defined. Directly behind a w2 tag and with type 2 a postfix is created. In addition you may define the color to mark the text in the document. Use the keyword color with an ID of one the colors defined in your data pool here. Value 0 stands for the default color.

Here's an example of a prefix text:

<outw2: type 1, color 0><My prefix<outw2:><w2:...

Create a cross reference definition in the document, see also insert_crossref.

<w2cross:
    name
    classid
    id id2 id3 'stringid'
    linklen
    borderVisible
    borderWidth
    borderHilite
    borderStyle
    col1 col2 col3 col4
    deleteBefore
>

All values up from id2 are optionally. The following values are allowed
Name Description Default
name Hyperlink name, used in the Hyperlink panel. If empty, the label Cross reference is used. ""
classid Class-ID of the following object -
id id2 id3 Cross reference ID 0 0 0
id id2 id3 Cross reference StringID ''
linklen Length of the cross reference definition. To avoid InDesign® crashes, 0 is strogly recommended here! But if you want ... 0
borderVisible Hyperlink visible in document? (0|1) 0
borderWidth 1|2|3 1
borderHilite One of the keywords Outline, Inset, Invert oder Invisible. Outline
borderStyle One of the keywords Dashed oder Solid. Dashed
col1, col2, col3, col4 Color parts in the range of 0.0 - 100.0 or -1.0. If three values are defined, a RGB color is used, if four, a CMYK color is used (but CMYK doesn't work for now). -1.0 -1.0 -1.0 -1.0
deleteBefore Delete any reference with equal name and/or id existing directly before the insertion point? (0|1) 1

A valid example for a w2cross tag may be this:

<w2cross:
    ''
    3
    14 1 2008 'Paul'
    0
    1
    1
    Outline
    Dashed
    100.0 50.0 0.0 -1.0
    1
>

Create an inline frame at the current text position. A complete definition of the in: tag follows. (For a better readability, int values are prefixed with an i and floats are prefixed with an f.)

Do not use the in-tag inside nested tables or in cells behind cells with inner tables! Please use the w2inline tag instead.

Sytanx of in: tag

  1. Size of frame in points. Ignored if page items are inserted.

  2. [optional] Placeholder of type frame or image path
  3. [optional] Frame options : Comma seperated list of key-value pairs. Depending on the key, the value can contain of one or more parameters. For available keys see below. Key and (first) values are separated by a blank!
  4. Frame content. After closing the start tag by >, the frame content follows. The content can containt in: tags again.

  5. </in> : Closing tag

<in:
  -- frame size in points
  -- (ignored in case of page items!)
  fwidth, fheight
  [,
       -- frame placeholder
       -- (s.a. definition attribut)
       iplid, id1, id2, id3 [, sRecordStringID] [, iPosNUMBER [, fBoundingVALUE]]

       -- Image by path or URL
    |  "path" [, iPosNUMBER, [, fBoundingVALUE]]
  ]
  (,
       -- Remove text placeholders
       cleartag

       -- Use page item
    |  ID iid -- any data source, attribute and table must have values
       attribute name
    |  table name
    |  pageitemID iid -- valid template
    |  classID iclassid
    |  apply_infos int -- (since v4.0.5 R20300, 4. Okt. 2017) set infos1 and infos2, addition of the following values:
            0 : no
            1 : frames with placeholders only
            2 : all frames
            4 : text placeholders in frames


       -- Frame appearance
    |  fitframe -- fit frame to content with fixed width of single line texts
    |  fitframe_hw -- fit frame to content
    |  columns iNums fGutter
    |  oval
    |  polygon iSides
    |  star iEdges iInset_len
    |  spline points -- see description of the spline definition in frame::create
    |  color "name"
    |  color iR iG iB
    |  opacity fTint iMode
    |  stroke "color" fWidth -- Name of stroke color and stroke width in points
    |  stroke iR iG iB fWidth -- RGB values of stroke color and stroke width in points
    |  stroke_type iLinetype iAlignment fMiter -- [since v3.3.1 R4300] stroke type, alignement and miter
    |  stroke_gap "color" fTint -- [since v3.3.1 R4300] Name and tint of gap color
    |  stroke_gap iR iG iB -- [since v3.3.1 R4300] RGB values of gap color
    |  stroke_tint fTint -- [since v3.3.1 R4300] Tint of stroke, used only for named stroke colors
    |  shadow "name" fOpac iMode fdDX fDY fBlur
    |  shadow iR iG iB fOpac iMode fDX fDY fBlur
    |  vignette iCorner fWidth iType fouter_opacity finner_opacity -- see here to learn more
    |  wrapiMode | ignore) [fLeft fTopfRight fBottom]
    |  objectstyle 'object_path' -- [since v3.4 R5126] object style of inline, see here to learn more
    |  embed_image 0 | 1

       -- Image Geometry -- [since v4.1 R23700]
       Operations are done in order of the given priorities
       Position
    |  i_pos_prio iprio -- 0-4
    |  i_pos_x fpos
    |  i_pos_y fpos
       Size
    |  i_size_prio iprio -- 0-4
    |  i_size_width fpts -- If the height is missing, the height will be calculated automatically.
    |  i_size_height fpts -- If the width is missing, the width will be calculated automatically.
    |  i_size_refx fpts -- optional, but if set, i_size_refy must also be defined
    |  i_size_refy fpts -- optional, but if set, i_size_refx must also be defined
    |  i_size_refpoint
                 topleft | topcenter | topright |
                 centerleft | center | centerright |
                 bottomleft | bottomcenter | bottomright
       Scale
    |  i_scale_prio iprio -- 0-4
    |  i_scale_width fvalue -- 1.0 corresponds to 100%. If the height scaling is missing, it will be calculated automatically.
    |  i_scale_height fvalue -- 1.0 corresponds to 100% If the width scaling is missing, it will be calculated automatically.
    |  i_scale_refx fpts -- optional, but if set, i_scale_refy must also be defined
    |  i_scale_refy fpts -- optional, but if set, i_scale_refx must also be defined
    |  i_scale_refpoint
                 topleft | topcenter | topright |
                 centerleft | center | centerright |
                 bottomleft | bottomcenter | bottomright
       Rotation
    |  i_rotate_prio iprio -- 0-4
    |  i_rotate fvalue
    |  i_rotate_refx fpt
    |  i_rotate_refy fpt
    |  i_rotate_refpoint
                 topleft | topcenter | topright |
                 centerleft | center | centerright |
                 bottomleft | bottomcenter | bottomright
       Skew
    |  i_skew_prio iprio -- 0-4
    |  i_skew fvalue
    |  i_skew_refx fpt
    |  i_skew_refy fpt
    |  i_skew_refpoint
                 topleft | topcenter | topright |
                 centerleft | center | centerright |
                 bottomleft | bottomcenter | bottomright
       Final Alignment
    |  i_final_align
                 fillframe | -- InDesign®-Menü 'ill frame proportionally'
                 fitcontent | -- InDesign®-Methode 'Fit content proportionally'
                 fitin | -- InDesign®-Methode 'Fit content to frame'
                 fitframe | -- InDesign®-Methode 'Fit frame to content'
                 center_ID | -- InDesign®-Methode 'Center content in frame'
                 fitimage ipalignment fsize fmaxScale | -- frame::fit_image with Comet method
                 topleft | topcenter | topright |
                 centerleft | center | centerright |
                 bottomleft | bottomcenter | bottomright
       -- Anchored object
    |  type inline | above_line | anchored
       Settings for type inline
    |      yoffset fOffset -- Offset from base line in points, default 0.0
       Settings for type above_line
    |      align left | center | right | text | towards_spine | away_from_spine
    |      above fDist -- Distance before in points, default 0.0
    |      below fDist -- Distance below in points, default 0.0
       Settings for type anchored
    |      spine yes | no | 0 | 1
    |      object_reference
                 topleft | topcenter | topright |
                 centerleft | center | centerright |
                 bottomleft | bottomcenter | bottomright
    |      anchor_reference
                 topleft   | topcenter | topright |
                 centerleft | center} | centerright |
                 bottomleft | bottomcenter | bottomright
    |      anchor_relative_x column | frame | margin | page | anchor
    |      anchor_offset_x fDist -- X-offset in points, default 0.0
    |      anchor_relative_y
                 column | frame | margin | page|
                 baseline|
                 X_height | cap_height | ascent | leading|
                 em_box_top | em_box_middle | em_box_bttom
    |      anchor_offset_y fDist -- Y-offset in points, default 0.0
    |      keep yes | no | 0 | 1
    |      lock yes | no | 0 | 1

       -- Vertical text position
    |  vjust top| center| bottom| system

       -- placeholder definition
    |  definition
          iclassid
          irelatedto
          iload
          istore
          isync
          ilov
          icharStyle
          icolorid
          isyncstate
          iloadConstraint

       -- use of image clip paths and alpha channels
    |  clippath "name" -- see frame::image
    |  clipindex iindex
    |  clipflags iClipflags
    |  cliptoframe
    |  cliptolerance fValue Ignored since v4.0.5 R18123.
    |  clipminpath fValue Ignored since v4.0.5 R18123.
    |  clipinset fValue
    |  alphachannel "name" -- see frame::image
    |  alphaindex iindex

       -- Built-in 'Frame Fitting Options' of InDesign®, since v4.0.5 R21000
       -- Spacing and crop in points and related to the original size (100%) of the image.
       -- In the image frame, the values are multiplied by the current scalings.
    |  fitting
          int  Reference point 0-8, see here
          int  Fitting method 0-3, see here
          float  >0.0 : left crop, <0.0 : left distance
          float  >0.0 : top crop, <0.0 : top distance
          float  >0.0 : right crop, <0.0 : right distance
          float  >0.0 : bottom crop, <0.0 : bottom distance
          int  Automatic fitting? 0 | 1
          int  Apply now? 0 | 1

    |  infos1 sInfos1String
    |  infos2 sInfos2String

    |  infos1 sInfos1String
    |  infos2 sInfos2String

    -- iPos          ∈ {-9, 9, 10-16}
    -- iR, iG, iB    ∈ {0, 255}
    -- iMode         ∈ {0-16}
    -- iCorner       ∈ {0-2}
    -- iType         ∈ {0-3}
    -- iClipflags    ∈ {0-7}

  )*
>   

Frames can created using defined page items. For this case you define the page items source using the attributes table,attribut and ID. By using the values table = pageitems and attribut = data you can use the page items from the panel Page items.

Since R1582, 7. Okt. 2009 With pageitemID you can adress a template directly without filling table and attribut. These attributes are ignored in this case as well as all placeholder related attributes (definition, infos1, infos2) and all frame propoerties (fitframe - objectstyle).

With classID you can control, which placeholders of the frame are linked against the given object id1, id2, id3. If classID is missing, all placeholders are linked. The current plug-ins version supports only one ore every class, lists of classes are not supported till now.

Inlines are inserted as to be a part of the current placeholder normally. To remove the placeholder from the text positions taken by the inline frame, set the flag cleartag. Be aware to create tow placeholders by this flag, one before, and one after the inline frame. Because of this, you should use cleartag only at the beginning or at the end of the text.

After all this definitions, some examples may help you to create some placeholder tags.

Create an empty frame with a give size :

<in:11.1, 22.2></in>

To link this frame with placeholder 503 and the object [4, 0, 0], you can use the this instruction :

<in:11.1, 22.2, 503, 4, 0, 0></in>

If the above used placeholder 503 is an image placeholder, you may wish, that the image will fit to the current table cell :

<in:11.1, 22.2, 503, 4, 0, 0, 16></in>

Define where the text should appear in the text box. Choose one of the following : top, center, bottom or system. To horizontal move text, set a corresponding paragraph style inside the inline frame or use an alignment.

<in:11.1, 22.2, vjust center>%!TT<pTextAlignment:Center>Center<pTextAlignment:></in>

The script shows the usage of anchored frames prpoerties. Set type to an appropriate value.

int main () 
{ 
    char 	tagged[20000];
    int		r;
    int		type		= 2;
    strcpy (tagged, "%!TTHier kommt ein schwebender Rahmen. ");
    strcat (tagged, "%lt;in: 50.0, 70.0");     strcat (tagged, ", color 255 0 0");     if (type == 0)     {         strcat (tagged, ", type inline");         strcat (tagged, ", yoffset 12.3");     }     else if (type == 1)     {         strcat (tagged, ", type above_line");         strcat (tagged, ", align torwards_spine");         strcat (tagged, ", above 11.1");         strcat (tagged, ", below 22.2");     }     else if (type == 2)     {         strcat (tagged, ", type anchored");         strcat (tagged, ", spine yes");         strcat (tagged, ", object_reference center");         strcat (tagged, ", anchor_reference centerleft");         strcat (tagged, ", anchor_relative_x frame");         strcat (tagged, ", anchor_offset_x 33.3");         strcat (tagged, ", anchor_relative_y baseline");         strcat (tagged, ", anchor_offset_y 7.7");         strcat (tagged, ", keep yes");         strcat (tagged, ", lock yes");     }     strcat (tagged, ">");     strcat (tagged, "</in>");
    strcat (tagged, " Er ist rot.");
    frame::append (gFrame, tagged, 0, 0);
    return 0; }

The in-Tag doesn't support the key names for positions. In this case you must use either the integer values or you build your tagged text by using sprintf in the following way:

char 		tt [1024];
char 		path [512]
float 		width 	= 60.0
float 		height 	= 60.0;
int 		placement = kPlaceTopCenter;
// Set the image path //
sprintf (tt, "%%!TT<in:%f, %f, '%s', %d></in>",   width, height,   path,
  placement);

\URL[Here you will find an example file, demonstrating all the image positionings.]{../Documents/Bildpositionierung To run this example, you nee CometXML.pln to be installed. Please open the file 1.indd. In the Comet panel you will find a popup menu containg the entry image .(If the entry isn't available, change the document a little bit, make an undo and save the document. The entry should be visible now.) Select one or more empty frames and click the menu entry image. Compare the result with the ready imported frames on the right pages.

The scripts you will find this way : Open the documents XML structure part (Click the little arrows button in the bottom left corner of the document window.) Select the frame you are interested in and navigate through the XML structure until you find a underlined entry. Open this entry and doubleclick the attribute image.

You are able to place images in any corner and in the middle of every side of a frame. Images are bigger than the current frame are shrinked automatically. Smaller images are left untouched.

In the following tables you will find all values supporting automatic image positioning. In case of a given clipping path, the bounding box of the clipping path is used to be the image frame. Here you can find test files for frame::image:

layoutrule_fitimage_CS55.indd , layoutrule_fitimage_CS6.indd

kPlaceTopLeft
8192
0x002000
1
kPlaceTopCenter
16384
0x004000
2
kPlaceTopRight
24576
0x006000
3
kPlaceMiddleLeft
32768
0x008000
4
kPlaceCentered
40960
0x00A000
5
kPlaceMiddleRight
49152
0x00C000
6
kPlaceBottomLeft
57344
0x00E000
7
kPlaceBottomCenter
65536
0x010000
8
kPlaceBottomRight
73728
0x012000
9

The key names used in Comet versions prior 1.4 R342 (kTopCenter, ...) are still valid. The translation is straight forward, please use kPlaceTopLeft instead of kTopLeft, ... .

Web Images are supporting the alignments 1-9 (topleft, topcenter, topright, ...) and 10 (place like existing) for now only.

If the new image does not exist, any existing image will be preserved in the frame.

You can take advantage of this fact by using (more or less conspicuous) images in the template to indicate missing images here.

Since v4.1 R21001 Sometimes it is desirable to remove the old image from the frame if the new image does not exist. To do that, simply add the value kPlaceRemoveIfNoExist to the image position:

kPlaceRemoveIfNoExist
= 0x400000
= 4194304

If an image is removed by kPlaceRemoveIfNoExist, the image inserting function (loading placeholder, frame::image, ...) return the error File not found (fnfErr, -43).

Place an image in the lower right corner. If the image file does not exist, the existing frame image is removed.

kPlaceRemoveIfNoExist + kPlaceBottomRight
= 0x400000 + 0x012000 = 0x412000
= 4268032

You may wish to trim the image to frame or vice versa. In every case the image is moved to the left top corner of the frame at first. After this step, the frame or the image (or both) are moved and/or scaled. All the image resizings except kFitContent are taking care of the original image proportions. All values can be addded by one of the placement values, but be aware, not all of the placement are sensefull.

If the image fits the frame in one direction, a placement in this direction has no effect. For example, kFitContentWidth with kPlaceTopCenter has no effect.

Identifier
Value
Description
kImportOnly
10
Import the images without any scalings or further movings.
kFitFrame
0
Fit frame to content.
kFitContent
11
Fit content to frame Normally this action changes the image proportion.
kFitContentWidth
19
Fit image to frame width but leave the frame height untouched.
kFitFrameHeight
12
Fit image to frame width and than fit the frame height.
kFitContentHeight
20
Fit image to frame height but leave the frame width untouched.
kFitFrameWidth
13
Fit image to frame height and than fit the frame width.
kBestSide
17
If the relation between image and frame width is greater than the relation between the heights, the image is sized to the frame with and vice versa. The imge will extend the frame in the other direction in this case!
kBestSideCentered
18
like kBestSide + kPlaceCentered

Since Version 2.1, R1320, 24. April 2009 If the flag kPlaceLikeExisting (=0x00100000=1048576) is set, all current image settings (like roation, skewing, shadows, ...) are left untouched. Only the image is replaced. On empty frames, the remaining flags are used to place the image. If kPlaceLikeExisting is active, clippaths, bounding boxes, fit frames, ... are ignored.

Since Version 3.2.1, R2330, 5. March 2011 und CS5 Use kPlaceWithFittingOptions (=0x00200000=2097152), to apply the settings made in menu

Object:Fitting:Frame fitting options...

Supported since CS5. Versions prior CS5 using kPlaceTopLeft instead of kPlaceWithFittingOptions. This setting is used if the frame have not fitting options set too. Do not add other placement flags if you are using kPlaceWithFittingOptions!

Attention: Due to an InDesign® bug, crop rectangles may change on not-proportional size changes of a frame. Of course we cannot fix this problem at image replace time.

At the very end of the image placing process, you may wish to fit the frame to the image. You can do this by setting the placement info to its negative value. Attention: Its not enough to set one part negative, set the complete value to its negative :

    -kPlaceTopLeft + kPlaceLikeExisting
     = -8192 + 1048576
     = 1040384 > 0!

You can take care of the current cell size while inserting inlines in table cells, but be aware that further insertions may change cell sizes again. The following values are supported only while using the in tag in table::insert_TaggedText.

Identifier
Vallue
Description
0 Import with no cell size checkings
kConstrainToCell
14
Scale image to current cell size
kConstrainToCellWidth
15
Scale image to row width. Line height may change in this case.
kConstrainToCellHeight
16
Scale image to line height. Row width may change in this case.

Set the maximum size of the image. The bigger side of the image is set to the given value, the shorter side is scaled proportional in respect to the image.

For the scaling methods kFitContent, ... the image size is ignored for obvious reasons.

Combine the image with its background. See also at frame::opacity, frame::stroke and frame::shadow.
NameValue
BlendNormal  0 
BlendMultiply  1 
BlendScreen  2 
BlendOverlay  3 
BlendSoftLight  4 
BlendHardLight  5 
BlendColorDodge  6 
BlendColorBurn  7 
BlendDarken  8 
BlendLighten  9 
BlendDifference  10 
BlendExclusion  11 
BlendHue  12 
BlendSaturation  13 
BlendColor  14 
BlendLuminosity  15 
BlendNonZeroOverprint  16 

Forming the edges of the frame. See also at frame::vignette.
NameWert
Sharp  0 
Soft  1 
Diffusion  2 

Define the method of edge drawing by one of the following values :
NameValue
None  0 
Rectangular  1 
Elliptical  2 
FollowShape  3 

Images can be placed using clipping paths defined inside the image. Clipping paths can selected by using the 0-based index of the path or by the name of the path. Names must be given in quotes. To suppress the application of a clipping path, omit the name specification and use index -2.

The clip flags define what the clipping path should do. Values can be added.
ValueDescription
 1 Invert the resulting path by combining with a path equal to the bounds of the image.
 2 {Ignored since v4.0.5 R18123.} Force edge detection to use the high resolution source image (potentially much slower but higher quality. Although the 72 dpi proxy does a pretty good job).
 4 Ignored since v4.0.5 R18123. For edge detection, do we remove the holes or leave them in.
 8 {Ignored since v4.0.5 R18123.} For edge detection, do we only detect edges within the visible portions of the image? That is, do we crop the image to its frame before performing edge detection?

From Comet-Version 1.4.2, R 528, 17. Dez. 2007 and from InDesign® CS2 Sdet the contur wrap of the inline, see also frame::wrap, frame::wrap_ignore and frame::wrap_invert. With negative values you invert the wrap.
ValueDescription
 ±0 no effect on text
 ±1 text leads past area of strip
 ±2 text continues in netxt frame
 ±3 text on both sides of object
 ±4 text within holes in object
 ±5 text follows the shape (implies both sides)
 ±6 text follows the standoff shape (implies both sides)
 ±7 text wraps only to the left side of the standoff.
 ±8 text wraps only to the right side of the standoff

since v3.4 R5126 The object style is applied AFTER setting all anchor attributes and BEFORE applying any in-tag frame attribute. This means;

Of course, object styles are not applied to any template defined frames

ATTENTION

Supporting object styles for <in:> tags is a good will feature that has been implemented on customer for free. Of course we do support for this - but as a (chargable) feature request.

Since v4.1 R21000 The tag is the same as the <in:> tag, except that it is integrated into the default import/export of TaggedText, so it can be used in more deeply nested tables. Creating inlines with TaggedText is done in two steps: In the first step, some so called inline placeholders are created. These inline placeholders are then replaced by the corresponding inlines in a second step. Please note that the second step is only done if the import is done via one of the priint: comet functionalities (frame::append, placeholder, ...). The pure InDesign® import only creates the inline placeholders:

If your previous implementation works well with <in:> tags, there's no reason to change that. For new implementations, we strongly recommend using the new <w2inline> tag.

The <w2inline> tags syntax is like the syntax of the <in> tag except of the following three differences:

  1. The text between the opening and the closing tag must not be empty..
  2. To fill the inline with text, use the (only in w2linis defined) attribut \span[src]{content.
  3. The end tag is defined only in the TaggedText complient form <w2inline:>. The HTML version </w2inline> is not supported.
  4. The tag is evaluated as native InDesign® text attribute. Un-escaped < and > within its content are automatically escaped. But in the RecordStringsIDs of contained <w2:> tags we need to know if the placeholder should be defined or loaded. In the first case we have to escape once (\<), in the second case we come back through the back door - and therefore we also have to escape the \ itself, so \\\\\\< would be the solution. To get around this nonsense, just replace:

    < by &LT;
    > by &GT;

    Pay attention to the capital letters!

Since v4.0.5 R21000 and CC2015 Convert a table cell into a graphic cell and shape the new frame.

This tag is only useable in table cells!

The syntax of the tag graphiccell is the same like the syntax of the in tag, except the following things:

Text between the opening and the closing graphiccell tags is inserted into the generated frame as TaggedText. Information about image paths are ignored in this case. The necessary trailer %!TT is applied automatically when inserting the text (and should therefore not be in TaggedText).

Insert an image into the new graphic cell and color the background orange.

<graphiccell:
     '$DESKTOP/Images/1.png',
     5,
     color 255 128 0
>
<graphiccell:>

Insert a short red text into the generated graphic frame of the cell. Since only a standard frame is used without further gestures herfe, the text in the introductory tag can be arbitrary (but not empty!).

<graphiccell:ignore>
 	<cColor:red><cTypeface:Bold><cFont:Helvetica>xyz
<graphiccell:>

The frame of the graphics cells is linked against placeholder 70 and loaded with the object [1, 0, 0, '']. In order to adapt the image even when the row height or column width are changed, the frame basically gets a frame fitting option.

<graphiccell:
     70,
     1, 0, 0, '', 5,
     64.0,
     color 255 128 0,
     fitting 4
     1
     -10.0 -12.0 -14.0 -15.0
     1 1
>
<graphiccell:>

Not supported since R 333 (11. April 2007). Use cscript functions die Funktionen frame::inline_, frame::inline_above, frame::anchor und frame::get_anchor oder textmodel::inline_, textmodel::inline_above, textmodel::anchor und textmodel::get_anchor instead.. Releases prior R 333 (11. April 2007) must have the FloatingElements plug-in installed.

With the keyword floating the resulting frame becomes a floating frame. In the table below all propoerties of floating frames are defined :
Attribute Value Description
anchor_len  >0  Number of text charcters to link with the frame. Floating frames always connected with the text directly follows the end -tag </floating>. If 0 or not given, an invisible character holding the link is inserted in the text.
side Horizontal frame position
Name Value Description
right  0  right beside the frame, xoffset is based on the right side of text frame
above  1  hide the text frame, xoffset is based on the left side of text frame

For contour wrapings use a stored page item with the desired contour wrap.
inner  2  The floating frame lies on the side of frame pointing to the pages inner margin. xoffset is based on this side of the text frame.
inner_margin  3  The floating frame lies on the side of frame pointing to the pages inner margin. xoffset is based on page margin.
outer  4  The floating frame lies on the side of frame pointing to the pages outer margin. xoffset is based on this side of the text frame.
outer_margin  5  The floating frame lies on the side of frame pointing to the pages outer margin. xoffset is based on page margin.
base Vertical frame position
Name Value Description
top_above  0  adjust the bottom of the floating above the text line
top_centered  1  adjust the middle of the floating above the text line
top_below  2  adjust the top of the floating above the text line
middle_above  3  adjust the bottom of the floating on the middle of the text line
middle_centered  4  adjust the middle of the floating on the middle of the text line
middle_below  5  adjust the top of the floating on the middle of the text line
bottom_above  6  adjust the bottom of the floating below the text line
bottom_centered  7  adjust the middle of the floating below the text line
bottom_below  8  adjust the top of the floating below the text line
xoffset int oder real horizontal offset from the pin
yoffset int oder real vertical offset from the pin

Ab Release 477, 2. Okt. 2007 Die Tags verbinden das Tabellenmodul mit dem TaggedText. In den TaggedText können Gruppenzuordnungen für Tabellenzeilen, -spalten und -zellen eingefügt werden. Die Tabelle selbst kann mit der ID einer Tabellenvorlage oder eines Tabellenplatzhalters verknüpft werden. Nach dem Einfügen des Textes werden den entsprechenden Tabellen die im TaggedText angegebenen Gruppen zugeordnet. Aus der in der Tabellenvorlage gegebenen (oder über den Tabellenplatzhalter ermittelte) Tabelle werden alle Tabellengestaltungsmethoden in die neu angelegte Tabelle übernommen. Danach werden die Gestaltungregeln in der neuen Tabelle angewendet.

The layout rules are defined in the TableStart tag. The following specifications are possible:
Name Value Description
Placeholder int ID of a table placeholder. The load action of this placeholder is executed and must set the gobal defined variable gTableID to the ID of a valid table template.
Pageitem int ID of a valid table template. The value is used only if Placeholder is not defined or 0.
ApplyDesign 0 | 1 Should the table design methods of table from the table template be executed?

0 : No, do not apply rules
1 : Yes, apply rules

Here's an extented TableStart tag

<TableStart:4,4:0:0
 	<tCellDefaultCellType:Text>
 	<Placeholder:128>
 	<Pageitem:0>
 	<ApplyDesign:1>
>

The example shows a very simple placeholder script for determining a table template.

int main ()
{
 	*gTableID = 128;
 	return 0;
}

The cells of a table can be assigned to any number of groups in the table module. In the tags ColStart, RowStart and CellStart an additional Groups tag can be added. The value is expected to be a space-separated list of group name strings. The corresponding cells are then assigned to these groups.

Here are some table tags with group assignments:

<ColStart:
 	<tColAttrWidth:79.75597506234413>
 	<Groups:'Column' 'COLUMN'>
>
<RowStart:
 	<tRowAttrHeight:17>
 	<Groups:'Row' 'ROW'>
>
<CellStart:1,1
 	<Groups:'Last Cell' '25"' '10 \> 9'>
>

[since v4.1 R23334] Table rows may start at certain places like in the next columns, in the next frame and so on ((menu Table -> Cell Options -> Rows and Columns)). Unfortunately, Adobe forgot to integrate that into the TaggedText and when re-importing a TaggedText, all table breaks are lost. The only way to define row breaks is to set them later, for instance by using table::set_row_start.

To support table breaks directly while importing TaggedText, we defined the tag

    <tStartOn:value>

The following values are supported for value:

The tStartOn tag must be given inside the <RowStart: ... > tag.

Here's an example for a page break:

<RowStart:<tStartOn:page><tRowAttrHeight:16.7>>

You cannot break single table cells, table breaks are useless in inner tables therfore and we will ignore such table breaks in inner tables.

The tStartOn tag is only supported on import and only by Comet functions. Only Adobe can implement the export and the standard import.

Two text placeholders, one without and one with placeholder options.

<w2:12,23,-14,-1>Verknüpfter Text</w2>
<w2:12,23,-14,-1,definition 1 1 2 0 0 0 45 7 1 0>
Verknüpfter Text
</w2>

Ceate an oval frame

<in: 100.0, 100.0, "your/image", 10, 0.0, oval</in>

Create a frame placeholder.

<in: 15.071, 15.071, 11,3,0,0,-7,0.0></in>

The following script creates frames and inlines as shown in the screeshot. An image called vn1.JPG should be located on your desktop. Otherwise, the first inline frame remains empty.

// ATTENTION
// The example contains HTML-compatible tag definitions that are filtered
// out by using the Copy button in the upper right corner of the frame.
// To copy the text, please use the good old copy/paste method :-)
//
#include "internal/types.h"
int main () { int pg = 1; ItemRef frame = item::alloc (); ItemRef frame2 = item::alloc (); char layerName[256]; char tt[20000]; int result; int i;
// define some colors // color::define ("DOrange", 255, 90, 0); color::define ("Orange", 255, 127, 0); color::define ("HellOrange", 255, 190, 0);
// create the first frame // result = frame::create_textframe (   frame,   10, 10, 200, 200,   pg,   layer::name (2, layerName)); if (result != 0) { showmessage ("Error %d at first frame.", result); item::release (frame); item::release (frame2); return 1; }
// design first frame // frame::star (frame, 21, 10); frame::color (frame, "Orange"); frame::stroke (frame, "Orange", 1.5); frame::shadow (frame, "DOrange", 50.0, 1, 8.3, 9.3, 3.0);
// create the second frame // result = frame::create_textframe (   frame2,   10, 210, 300, 400,   pg,   layer::name (2, layerName)); if (result != 0) { showmessage ("Error %d at second frame.", result); item::release (frame); item::release (frame2); return 1; }
// design second frame // frame::color (frame2, "HellOrange"); frame::stroke (frame2, "Orange", 12.3); frame::shadow (frame2, "DOrange", 50.0, 1, 8.3, 9.3, 3.0); frame::vignette (frame2, 3, 10.0, 1, 100.0, 100.0);
// link both frames // frame::link (frame, frame2);
// Insert some text in the first frame. // If the text is too long, it flows into the // second frame automatically. // strcpy (tt, "%!TT<ParaStyle:>"); strcat (tt, "Am es assimos voluten ihitiusam dolorem ulparum quo.#"); strcat (tt, "<in: 100.0, 100.0, '$DESKTOP/vn1.JPG'>Dummy</in>"); strcat (tt, "#Entio tent qui ipis suntint faccust, quibus voluptaque et apiet eseque maios."); strcat (tt, "<ParaStyle:>"); strcat (tt, "<in: 180.0, 60.0, fitframe_hw, color 230 64 130>"); strcat (tt, "%!TT"); for (i = 6; i < 16; i++) sprintf (tt+strlen(tt), "<cSize:%d>A<cSize:>", i); for (i = 14; i >=6; i--) sprintf (tt+strlen(tt), "<cSize:%d>A<cSize:>", i); strcat (tt, "</in>"); strcat (tt, "Serengeti");
frame::insert (frame, tt, 0, true);
// cleaning up // item::release (frame); item::release (frame2);
return 0; }

The example shows how to set a placeholder with a string ID. The script replaces the current text selection by "aaa" linked together with the placeholder 20 and the object [305501000, 1299, 1, "MY_ID"].

#include "internal/text.h"
int main () { char tt[10000];
*tt = 0; strcat (tt, "%!TT"); strcat (tt, "<w2:"); strcat (tt, "20, 305501000, 1299, 1"); strcat (tt, "'MY_ID'"); strcat (tt, ">"); strcat (tt, "aaa"); strcat (tt, "</w2>");
textmodel::replace (tt, kSelection);
return 0; }

Author
Matthias Seidel
Version
12.03.2024, 15:56 Uhr
Since
Plugin Version 1.0.10

Alphabetic index HTML hierarchy of classes or Java