@Alessio – move your anchored text frame to the left edge of the text frame that holds it.
To retain your text's position make the anchored text frame the same width as the text frame that its anchored to.
Why does this need to be an anchored object? Where is the anchor in the text? I don't see it in the screen shots.
Perhaps the issue is in the TOC itself... the order... can we see a screenshot of that?
@Alessio – o.k., then position your anchored text frame just a bit off the left edge of the text frame that holds the next headline. Move it just 0.1 mm to the left and the sequence of your headlines in the TOC should be in the right order.
Thanks to everyone for the help and sorry if I can answer just now.
I'm probably doing something wrong in anchoring the object, I don't use this method often. I need to put the chapter title in a frame that everything is within a fluid text, so that if I remove or add some text the title box moves accordingly.
The method I used to anchor the text frame with the title chapter is to hold down the shift key and drag (I'm using windows7) on the black square. And it works great, if not for this issue of the TOC!
I accept any kind of suggestion!
@ Uwe: using this method to anchor I can't move the frame to right or left... So nothing change...
I guess I don't understand from what you've just said why the chapter title can't be an ordinary paragraph at the start of the chapter. If it need to stay withthe next line, set a keep option in the style.
I've had a play... and here's my take on it...
To have the anchored object style 'Main Heading' above the 'Subheading'... all frames that will be anchored need to be above in the stacking order of the frame that are to be anchored in.
My example below shows this and more...
The difference between the first heading and second heading is thus..
1. Vidi Voluptatem: applied a copied style (red dot)... anchored to a paragraph return (green dot).
2. Expliquam Sit: applied main heading (green dot)... anchored to the left of Reremped (gold dot).
3. Table of contents: Used main heading and subheading only (ignored main heading copy).
What I noticed was happening when I was playing with this was that the TOC (when creating) was first reading the text frame with the body copy and then reading the anchored objects. Thats why they were duplicating and thats why I created a copy style.
You can see in my TOC that applying a different named style to the main headings and not include that style in the TOC, then ID will NOT look at those frames to add to the TOC... it adds the anchored object only and not the text.
If this makes sense
Thank you lili@! Have you explained the problem perfectly!
@ Peter: I'd also like to just use a different graphic for this layout but the customer wants the title of the chapter is inside the rectangle and the only way I know to do this is to place the text within a frame with a stroke. So the problem to anchord the title frame into the body frame!
You would make me a huge favor if you could suggest other solutions to achieve the same result!
1 person found this helpful
Anchor a frame with nothing in it in the running text and position around the title....
Thank you Peter! This could be a solution, and is probably what I will do, but doesn't ensure that the title is properly centered within the frame!
I'm so sorry for this... I'm feeling really ignorant right now.
1 person found this helpful
If all you want is a box with a stroke then like Peter said anchor a frame with a stroke.
In my updated example below (to reflect what you want) is below:
1. All the text is in 1 text frame... therefore creating a TOC as it should.
2. Anchored rectangle frame to the left of the main heading > with a custom placement.
Thanks again Lili@!
But as I pointed out, and as you can see in your example, center the text inside the box is now much more difficult ...
It does not matter! For me the main problem was the creation of the TOC and in this way is solved!
Thank you so much for the help! You were very kind to help me!
It is quite easy... just needs a custom location, an object style created and applied to all anchored.
the first baseline might need adjusting also... but I did not spend too much time with alignment.
Glad to be of service
This is an opportunity to experience a little more with these features that do not know well yet!
Thank you again!!