• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to anchor a colored shape behind a part of the text in a text box

Explorer ,
May 06, 2021 May 06, 2021

Copy link to clipboard

Copied

I want to emphazise a part of the text in a text box by placing a frame behind the text and add color to the frame. This works fine but when I anchor the frame, it frame be positioned on top of the text and I am not able to move it behind the text. How can I solve this? See screenshots.

 

Frame behind text Frame not anchored.png

 

Frame behind text but anchored. Frame can not be positioned..png

 

 Thanks,

 

René

 

TOPICS
How to

Views

1.8K

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
community guidelines
Community Expert ,
May 06, 2021 May 06, 2021

Copy link to clipboard

Copied

In your case, you could set the yellow anchored object to overprint (Window> Output> Attributes> overprint fill), this should work fine for print, but not necessarily for screen viewing of the PDF, as some viewers will ignore overprinting.

Other options would be to send the yellow box behind the text and group it with the text box, or apply a yellow drop shadow to the anchored object, color the object white, and move it out of the text box, offsetting the shadow to position it where it is needed. Or applying a paragraph style.

Votes

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
community guidelines
Guide ,
May 06, 2021 May 06, 2021

Copy link to clipboard

Copied

As written lots of times on forums: use a double anchoring to do it and keep a total control of the frames placing!

 

(^/)  The Jedi

Votes

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
community guidelines
Explorer ,
May 06, 2021 May 06, 2021

Copy link to clipboard

Copied

Jedi,

Can you explain double anchoring?

 

Thanks,

René

Votes

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
community guidelines
Guide ,
May 06, 2021 May 06, 2021

Copy link to clipboard

Copied

If time, I should extract from the Script I indicate below the code to play it with just "1 click".

I mean: you draw a no-anchored frame as you showed and, selecting it - "1 click" -, the frame is "double-anchored" in the text behind it … so now anchored behind the text at the same place!  😉

 

 

Capture d’écran 2021-03-22 à 19.03.56.png

 

The screenshot shows "Tables" where cells have, after the Script, background effects! The way used to play it is the "double-anchoring"!

 

(^/)

Votes

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
community guidelines
Community Expert ,
May 06, 2021 May 06, 2021

Copy link to clipboard

Copied

Hi Luke,

yes, I think paragraph shading should work perfectly for this purpose.

The text section with "Case" seems to be reason for highlighting.

 

Another option, but not so flexible:
Use an Above Line Anchored object in its own paragraph above the paragraph starting with "Case".

To get the right starting point horizontally use a high indent value for the paragraph. Just like that:

 

AboveLine-AnchoredObject-1.PNG

 

EDIT: In my sample above I used a 50 mm indent for the paragraph with the anchor character. So here added another screenshot that is showing the paragraph character selected and the Paragraph panel. Also a new annotation regarding the Alignment option of the Anchored Object dialog:

AboveLine-AnchoredObject-3.PNG

 

In the Anchored Object dialog you have to use the alignement option (Text Alignment), in my German screenshots (Textausrichtung), so that the anchored object will follow the value for the indented paragraph.

 

Note 1: The negative value that pushes the anchored rectangle down and will also render it in stacking order behind the text cannot exceed the height of the anchored object.

Note 2: That limit, the height of the anchored object, can easily be pushed by applying a high negative value of baseline shift to the anchor special character:

 

AboveLine-AnchoredObject-2.PNG

 

Regards,
Uwe Laubender

( ACP )

 

// EDITD: Screenshot added with some explanations

Votes

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
community guidelines
Community Expert ,
May 06, 2021 May 06, 2021

Copy link to clipboard

Copied

And here's a sample of using Paragraph Shading.

Adjust the yellow "faux box" size and position by adjusting the Offsets.

 

The shading can extend beyond the frame, beyond the paragraph into neighboring paragraphs, or be behind only part of the paragraph. Endless visual designs with this powerful trick. And very simple to do.

Paragraph shading can create any sized "faux" box.Paragraph shading can create any sized "faux" box.

 

|    Bevi Chagnon   |  Designer & Technologist for Accessible Documents
|    Classes & Books for Accessible InDesign, PDFs & MS Office |

Votes

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
community guidelines
Explorer ,
May 07, 2021 May 07, 2021

Copy link to clipboard

Copied

LATEST

Hello Bevi,

 

Thanks for the example. It is realy am easy way to apply a background color to a paragraph!

 

Thanks again,

René

Votes

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
community guidelines
Explorer ,
May 07, 2021 May 07, 2021

Copy link to clipboard

Copied

Uwe,

 

Thanks for the reply. Above Line Anchored object works indeed, but I found paragraph shading more flexible as you already mentioned.

 

Thanks for your help!

René

Votes

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
community guidelines