I am facing an issue in a long document. My requirement is that I have to give an Underline (which is a custom vector file) under each an every subheading. This part is easy as I can do a Find/Change with GREP and give underline.
Problem is some of the headings are Ok where the custom underline vector fits perfect. Some headings are short and some are too long.
Question is is there a way or script which will enlarge the object as per the heading size.
I have attached a screenshot for better understanding. In the image "Heading One" is perfect. Other two headings are either short or too long. What can be done ?
I am working on a book document containing approx 30 individual files and each file has approx 30 pages.
There are 1 or 2 headings in each page.
I realize it's not quite what you're asking, but there is a wavy underline option —
...that might be a simpler solution, although it is not quite a match for your image underline. It would be vastly easier to apply and manage, though.
You may be able to get closer to your desired look by combining underline, paragraph rules paragraph borders. (Stacking the waves, that is.)
You could convert that swirl to a type glyph and use it as a bullet, then combine that with an underline. Tricky, but it would be controlled by styles and universal through the document.
I can't think of any (other) solution other than manual placement and adjustment, which would be a terrific amount of work, and likely very fragile (breaking every time text flow changes) as well.
What I'd really do is back up and find a solution that gives a similar distinction to headings but builds up from ID's style options instead of down from "let's put this graphic on every heading." 🙂
I'm no help for scripting, and the help I offer here is small and will, at best, yield results months from now, you can at least vote to support a more robust Wavy option for InDesign’s strokes.
Thanks Scott. It looks like I have to do this.
Thanks once again.
If you are adding this object using find/change with clipboard contents, you should consider first making the wavy line the full width of the column, then cut it and Paste Into an empty rectangular frame that you can resize to use as a mask. It won't automatically size to the heading, but at least you'll be able to go back and change that frame width to suit.
Thanks for the reply. How do I mask it as per different size of the subheadings. Could you please throw some more light.
You could use a tab to cover the unwanted portion of the art, in this sample, the first heading is followed by a Tab (using shift + dash for the Leader) it's colored green for clarity, in the other lines, the dash is colored white to hide the art below, it is also scaled 300% in height and positioned using baseline shift.
If the horizontal line is redrawn to be the full width of the page and the frame containing the graphic is pasted into a second frame the same size you can "crop" the length of the hoerizontal line by resizing the "container" frame you pasted the graphic into (drag the right edge to the left to match the length of the heading).
Thank you so much.
I will follow this process and see the amount of work I have to do. It seems like your solution will fit my needs. Anyway, I will update.
Thanks and Regards.
I tired your method and it almost worked. Got stuck at one place. In fact two places.
First is that I want to give tab after each and every heading using GREP which did not work for me.
What i did was for Find - This text box was empty. / In Replace Textbox I typed - $0\t
In find Format I selected Heading Paragraph style. It did not work
Second place where I got stuck was My vectors are all anchored to headings. So its displaying above the green line (tab object) and there is no option to send to back.
I tried Peter Spier's method also which worked very well. There is only once concern. For each and every heading I will have to individually change the mask.
Any ideas on the above two methods??
I'm not a script writer, so I don't have any idea how rto actually do it, but I suspect there is a way to detect the x-coordinate of the anchor position in the text (assuming you anchor the graphic at the end of the line) and then do a transform on the maks frame to change its width and move the rignt edge to that x-coordinate. Unless this is a very long document, or you will have a lot of documents that need similar treatment, this may take more effort to create a script than to do the process manually.
I do have lots of documents to cover. Approx 20 documents, each documents containing 30 pages approx.
I gues I will follow your method and then change the mask manually.
I think the anchored art would exclude my idea. Another option would be to shorten the art and align it carefully with an underline, but you have probably already tried that.