Highlighted

Drop Caps interaction with Text Anchor - Preserve Space

Community Beginner ,
Jun 23, 2020

Copy link to clipboard

Copied

douglasc50519187_0-1592945840937.png

Above I have a formatted document, which presents numbered paragraphs for an interactive document. Each is three numbes, followed by a space. The space seems necessary to ensur ethat I get some area around the three-digit number using Drop Caps. I tried it other ways, but this is the one I was steered to by another user.

 

Now, those paragraph numbers ALSO need to be text anchors. But when I put a Hyperlink Text Anchor on the characters (or even next to them), I get this:

douglasc50519187_1-1592946031011.png

It looks like the Text Achor has negated the spacing around the Drop Cap.

I need both the spacing AND the hyperlink destination. Is there a way to do this?

 

(More broadly, is there a better way to control the spacing to the right of a Drop Cap? Forcing four digits instead of three to make the separation more readable just seems like there should be a better way. I'm assuming there IS a better way and I couldn't figure it out. In any case: the key question stands . . . how to get a Drop Cap and Hyperlink Destination/Text Anchor that play nicely.)

 

Hi Douglas:

 

How about moving the text anchor to the first character after the space that is after the drop caps? I am doing it through story editor because it is hard to select/drag the colon in layout view.

~Barb 

 

drop.gif

Topics

How to, Type

Views

198

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Drop Caps interaction with Text Anchor - Preserve Space

Community Beginner ,
Jun 23, 2020

Copy link to clipboard

Copied

douglasc50519187_0-1592945840937.png

Above I have a formatted document, which presents numbered paragraphs for an interactive document. Each is three numbes, followed by a space. The space seems necessary to ensur ethat I get some area around the three-digit number using Drop Caps. I tried it other ways, but this is the one I was steered to by another user.

 

Now, those paragraph numbers ALSO need to be text anchors. But when I put a Hyperlink Text Anchor on the characters (or even next to them), I get this:

douglasc50519187_1-1592946031011.png

It looks like the Text Achor has negated the spacing around the Drop Cap.

I need both the spacing AND the hyperlink destination. Is there a way to do this?

 

(More broadly, is there a better way to control the spacing to the right of a Drop Cap? Forcing four digits instead of three to make the separation more readable just seems like there should be a better way. I'm assuming there IS a better way and I couldn't figure it out. In any case: the key question stands . . . how to get a Drop Cap and Hyperlink Destination/Text Anchor that play nicely.)

 

Hi Douglas:

 

How about moving the text anchor to the first character after the space that is after the drop caps? I am doing it through story editor because it is hard to select/drag the colon in layout view.

~Barb 

 

drop.gif

Topics

How to, Type

Views

199

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
Jun 23, 2020

Copy link to clipboard

Copied

Sorry if I misunderstood.

But the space after your three digits is always the same. The difference is:

the number 013 needs less space than the number 004

 

Because of - this is not a monotype font.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Community Beginner ,
Jun 23, 2020

Copy link to clipboard

Copied

I don't think this is the case. I really should have provided a before/after on both, so I will.

 

Here are both selections before I do the Text Anchor:

 

douglasc50519187_0-1592958440315.png

 

douglasc50519187_1-1592958459298.png

 

And here are the same selections once I create a Hyperlink Text Anchor. (Note whether I select the three digits, or just put my cursor in place before the lead zero, the result is the same: my space vanishes.)

douglasc50519187_2-1592958587077.png

douglasc50519187_3-1592958599800.png

You can see the text-anchor marker (blue colon-looking thing) is now in place (good!), but my trailing space has vanished. The space is still there, but it's now not behaving like it used to in any case.

Just to be sure, I changed the 004[space] to Courier New Regular, and the problem persists.

 

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Jun 24, 2020

Copy link to clipboard

Copied

Hi Douglas:

 

How about moving the text anchor to the first character after the space that is after the drop caps? I am doing it through story editor because it is hard to select/drag the colon in layout view.

~Barb 

 

drop.gif

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Community Beginner ,
Jun 24, 2020

Copy link to clipboard

Copied

I will try this immediately. 

 

And it worked. I still have to individually move the anchors, but I can do it in Story Editor and just go through the doc once. This allows using a script to automatically convert all 240 paragraph numbers into Text Anchors (whew, ugly) and then I can assign the hyperlinks efficiently. Moving the anchors to the end of the title, or beginning of the word, is super easy to do in one pass.

 

Thanks for thinking out of the box on this one!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Advocate ,
Jun 24, 2020

Copy link to clipboard

Copied

Something as simplistic as:

 

// by FRIdNGE, Michel Allio [24/06/2020]
app.findTextPreferences = null;
app.findTextPreferences.findWhat = "<FEFF>^9^9^9 ";
myFound = app.activeDocument.findText();
var F = myFound.length,  f;
for ( f = 0; f < F ; f++ ) myFound[f].characters[0].move(LocationOptions.after, myFound[f].characters[4]);
app.findTextPreferences = null;

 

(^/)  The Jedi

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Community Beginner ,
Jun 24, 2020

Copy link to clipboard

Copied

Is <FEFF> a command? The hyperlink anchor? I'm not a coder, so the script I use to create the anchors is "Create Text Anchors" by Kasyan Servetsky. 

 

What I see, I think is:

1. Clear FindText preferences so that you don't accidentally bring something along you don't want

2. Find <FEFF> followed any any three digits. I'm not sure what FEFF is tho.

3. Assign the found text to the variable myFound

4. Define F, a counter, as the length of the myFound string. We will be incrementing lower-case f as an increment.

5. OK, I'm not sure what this one does. the for() looks like an incrementing loop, but the syntax of the rest is beyond me. 

6. Reset findtext again.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Most Valuable Participant ,
Jun 24, 2020

Copy link to clipboard

Copied

<FEFF> is not a command. It just "describes" a "group of characters".

 

Rather, it's something like: You are a character, but I'm not entirely sure which character you really are. A text anchor can therefore also be found in a text search for <FEFF> (but NOT in a grep search).

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Jun 24, 2020

Copy link to clipboard

Copied

Hi Douglas:

 

I'm glad that will work for you. 

 

~Barb 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Community Beginner ,
Jun 24, 2020

Copy link to clipboard

Copied

Yeah. From a "purist" perspective, I still don't know why the text anchor overrides or alters the spacing on the Drop Cap, but at least my book looks good and I can proceed to put in the right hyperlinks. 

 

I just finished moving 239 hyperlink text anchors and now I feel the desire for a script or wildcard that will "Find Next Hyperlink Anchor" and then "Cut. Move cursor N spaces to the right. Paste. Next."

 

That would be a great addition to the script I already use which automatically scans for something in the right character style and creates a text anchor with that same name.

 

But that's like asking for dessert after a fine meal, so I'll quit while I'm ahead. Thanks again for your help!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...