Passing Superscript value in a text ADOR

407 views
Skip to first unread message

Mark Kuehn

unread,
Apr 3, 2009, 10:12:27 PM4/3/09
to xmpie...@googlegroups.com
I have tried to implement a solution for superscripting the ® “registered mark “ inside a user entered text string. I copied a suggested solution from the list, but it does not quite work correctly. I have one variable campaign dial, one text ADOR, and one text file ADOR. The contents of each is as follows:

Name-> _article
Type-> variable Campaign Dial
Value Start->

This is a register mark – ABC®.

Value End->

===

Name-> Article
Type-> Text ADOR
Value Start->

FindAndReplace( trim(@{_article}),  "®", "<cPosition:Superscript><0x00AE><cPosition:>" )

Value End->

===

Name-> Article File Pointer
Type-> Text File ADOR
Value Start->

 if ( Length(trim(@{_article})) )
{
   "Article Tagged Text.txt"
}
else
{
   null
}

Value End->

===

Name-> Article Tagged Text.txt
Type-> InDesign Tagged Text File
Value Start->

<ASCII-WIN>
<Version:5><FeatureSet:InDesign-Roman><ColorTable:=<Black:COLOR:CMYK:Process:0,0,0,1>>
<DefineParaStyle:NormalParagraphStyle=<Nextstyle:NormalParagraphStyle><cFont:Arial>>
<ParaStyle:NormalParagraphStyle><pHyphenation:0><pSpaceAfter:4.500000><cTypeface:LightCondensed><cSize:9.850000><cLeading:14.000000><cFont:ZurichBT>{{article}}<cTypeface:><cSize:><cLeading:><cFont:>

Value End->

===

Inside InDesign I have a text box where the ADOR “Article File Pointer” is placed. This text field has the “Enable Nested Composition” checked in the “Dynamic Text Properties”.

The result of this is the following in the text box.

This is a register mark – ABC<cPosition:Superscript><0x00AE><cPosition:>.


So, I’m really close, but text is getting placed as a value rather than being processed as an InDesign Tagged Text. What am I missing?

-Mark

Tyrone Obrien

unread,
Apr 5, 2009, 7:43:23 PM4/5/09
to xmpie...@googlegroups.com

What font are you using as some fonts have a superscript Glyph. Font I know that have superscript ® ® are Lucida Sans, Harmony, Myriad Pro, Sans Serif and Agenda. This would fix the problem as the font is a superscripted ®

 

 



Notice of Confidential and Privileged Information
This e-mail transmission is intended only for the addressee(s) and may contain confidential information. Confidentiality is not waived if you are not the intended recipient of this e-mail, nor may you use, review, disclose, disseminate or copy any information contained in or attached to it. If you received this e-mail in error, please delete it and any attachments and notify us immediately by reply e-mail.  The unauthorised use of this email may result in liability for breach of confidentiality, privilege or copyright.

The sender does not warrant that any attachments are free from viruses or other defects. You assume all liability for any loss, damage or other consequences which may arise from opening or using the attachments.

This e-mail message has been scanned and cleared by NetIQ MailMarshal



Mark Kuehn

unread,
Apr 6, 2009, 8:59:00 AM4/6/09
to xmpie...@googlegroups.com
I need to use Zurich Light Condensed. I realize that I coul open the font in a font editor and make changes to it, but that is a kludgy hack.

My solution is almost there, I just need to know how to get the text in the ADOR treated like it is part of the tagged text file and not actual text.

-Mark

thomaus

unread,
Apr 6, 2009, 4:16:11 PM4/6/09
to XMPie Interest Group
What I've figured out so far is that the values inside standard text
ADORs won't change text properties. Essentially what XMPie does at
this point is type at the insertion point where the field is. No fancy
stuff like ctrl-alt-shifting; it just types. And in general, just
typing in InDesign will never change the look of the type (ignoring
nested styles for the monent). You can 'type' all the commands you
want, and nothing will change.

The text file ADOR is quite a different beast, because instead of
typing, it's more like using the Place command. InDesign behaves quite
differently when one Places text. It will process rich text commands,
tagged text commands, Word file commands, etc. Code is executed--not
just typing.

If you always know where the potential ® may fall, you could bring it
in as separate ADOR and format that ADOR separately with a superscript
command.

For a similar problem to yours, we previously tried to make nested
styles work to do something like this, but couldn't figure it out at
the time.

I just tried a new little test, and think it might be possible. But
maybe not.

In InDesign, I made a character style with horizontal and vertical
scaling and a baseline shift. Essentially a superscript.
Then I made a nested paragraph style:
Normal up to "End Nested Style Character"
Then the Superscript character style for one Character
Then back to normal for 999 words.

This properly formats a superscript-like command for only one
character following an inserted "End Nested Style
Character" [Type>Insert Special Character>Other]

I copied that line out to notepad, and something was there:
"This is a test ® of superscript"

Pasting the text back into InDesign was working also.

However, things started blowing up when I copied the same string into
a text ADOR. After saving the plan, it re-opens to this:
1. Parsing error.
Details: line 20 - An invalid XML character (Unicode: 0x3) was found
in the element content of the document.

Bummer, because if this character could pass through the data,
InDesign should be able to read it. It would be useful to use for a
bunch of formatting stuff.


On Apr 6, 8:59 am, Mark Kuehn <mark_ku...@comcast.net> wrote:
> I need to use Zurich Light Condensed. I realize that I coul open the font in
> a font editor and make changes to it, but that is a kludgy hack.
>
> My solution is almost there, I just need to know how to get the text in the
> ADOR treated like it is part of the tagged text file and not actual text.
>
> -Mark
>
> On 4/5/09 6:43 PM, "Tyrone Obrien" <Tyrone.Obr...@bspg.com.au> wrote:
>
> > What font are you using as some fonts have a superscript Glyph. Font I know
> > that have superscript ® ® are Lucida Sans, Harmony, Myriad Pro, Sans Serif and
> > Agenda. This would fix the problem as the font is a superscripted ®
>

galkahana

unread,
Apr 7, 2009, 3:02:19 AM4/7/09
to XMPie Interest Group
Seems like i made a mistake in a post yesterday. i'm gonna try to post
again and see if it works:

i think i can figure what goes on here. This has probably to do with
how XMPie possibly loads nested composite content.
what happens is that XMPie loads the text file, then sets the tagged
ADORs as ADORs and then tries to load their value.

This means that loading the "Article" ADOR from inside the text file
ADOR tries to put <cPosition:Superscript><0x00AE><cPosition:> as and
ADOR value, which is not a complete RTF syntax and therefore is not
recognized as such.

try changing the ADOR to a complete RTF definition, like this (i'm
using the text file ADOR definition):

Name-> Article
Type-> Text ADOR
Value Start->

"<ASCII-WIN>
<Version:5><FeatureSet:InDesign-
Roman><ColorTable:=<Black:COLOR:CMYK:Process
:0,0,0,1>>
<DefineParaStyle:NormalParagraphStyle=<Nextstyle:NormalParagraphStyle><cFont
:Arial>>
<ParaStyle:NormalParagraphStyle><pHyphenation:0><pSpaceAfter:
4.500000><cType
face:LightCondensed><cSize:9.850000><cLeading:
14.000000><cFont:ZurichBT>"<cTypeface:><cSize:>"

&

FindAndReplace( trim(@{_article}), "®",
"<cPosition:Superscript><0x00AE><cPosition:>" )


&

"<cLeading:><cFont:>"

Value End->


At this point (if it works) you might be thinking that there's no
point in using the intermediate text file ADOR...and you would
probably be right.

Cheers,
Gal.

On Apr 6, 3:59 pm, Mark Kuehn <mark_ku...@comcast.net> wrote:
> I need to use Zurich Light Condensed. I realize that I coul open the font in
> a font editor and make changes to it, but that is a kludgy hack.
>
> My solution is almost there, I just need to know how to get the text in the
> ADOR treated like it is part of the tagged text file and not actual text.
>
> -Mark
>
> On 4/5/09 6:43 PM, "Tyrone Obrien" <Tyrone.Obr...@bspg.com.au> wrote:
>
> > What font are you using as some fonts have a superscript Glyph. Font I know
> > that have superscript ® ® are Lucida Sans, Harmony, Myriad Pro, Sans Serif and
> > Agenda. This would fix the problem as the font is a superscripted ®
>

Mark Kuehn

unread,
Apr 7, 2009, 10:10:55 AM4/7/09
to xmpie...@googlegroups.com
So how does the InDesign paginator "know" to interpret this ADOR as tagged
text and not as literal characters?

Or does it just assume if it validly formed the result is to place it as
tagged text?

-Mark

galkahana

unread,
Apr 7, 2009, 11:44:01 AM4/7/09
to XMPie Interest Group
Exactly,
if i'm not mistaken (and i shouldn't be) if a literal text ADOR value
conforms (validly formed) to one of the rich text formats available
(RTF, XNIP etc.) it will know to import it as such.

Cheers,
Gal.

On Apr 7, 5:10 pm, Mark Kuehn <mark_ku...@comcast.net> wrote:
> So how does the InDesign paginator "know" to interpret this ADOR as tagged
> text and not as literal characters?
>
> Or does it just assume if it validly formed the result is to place it as
> tagged text?
>
> -Mark
>

Mark Kuehn

unread,
Apr 7, 2009, 2:24:28 PM4/7/09
to xmpie...@googlegroups.com
Does it make sense the only way I could get this to work is to set the
initial tag as UNICODE-WIN (or UNICODE-MAC) versus ASCII-WIN (or ASCII-MAC)?

By using this encoding, I then also had to change how I was passing the
value for the superscripted register mark as ® rather than the <0x00AE>
syntax.

This is cool but it should be documented much better. It took me a LOOOOONG
time to get this working.

Thanks for all your help!!!!

-Mark
Reply all
Reply to author
Forward
0 new messages