Copy link to clipboard
Copied
Hi everyone,
I'm thinking about laying out a book with InDesign, but I wanted to know from you experts if it's possible to do what I need:
The text is a combination of four different texts; to indicate which text it is, I'd need to underline it with four different colors; sometimes just one line, sometimes two, sometimes three, etc.
Is it possible?
Hi @pino_2179, I have made a proof-of-concept script that may might be a good way for you. So buckle up because I want you to come on a little journey with me...
We cannot do your job the normal way, using Indesign's normal underlining because Indesign cannot assign more than one underline to the same character. Your job requires runs of underlining starting and stopping on their own schedule, overlapping however they like. A corollary of that problem is that there is no convenient user inter
...Hi @pino_2179 according to ChatGPT, Conditional Text was introduced in Indesign CS4, so my script definitely won't work in CS3. Even in CS4 I have no idea if the script will work as other things in the scripting API may have changed—there have been 17 major versions released since then!
Sorry to pass on the bad news. Perhaps you could subscribe for a month or two to finish your project?
- Mark
Copy link to clipboard
Copied
You can add different character styles on the same text via manually, GREP and nested styles. Additional you can use paragraph frames and rulers.
Copy link to clipboard
Copied
Can you show us a sample of what the text will look like?
Does one piece of text potentially get one, two, three, or four underlines?
Copy link to clipboard
Copied
Hi @pino_2179:
You can customize color and position of both an underline and a strikethrough so by that covers two of the lines.
The other lines that Willie referred to (paragraph rules and borders) are added at the paragraph level, which means you can't assign them to individual words within a paragraph. Not sure if you need to.
A sample or two would be very helpful— even if you just sketch it on paper and then take a picture of it to share with us.
~Barb
Copy link to clipboard
Copied
The text is a combination of four different texts;
Just clarify do you want a single underline with different colors, or different colors and multiple strokes?
Single lines different colors:
Different colors and multiple lines:
Copy link to clipboard
Copied
Hi @pino_2179 here is a screenshot showing the standard underline options available. You can adjust colour, thickness, offset and also choose from some preset line types. Maybe they would help in your case?
- Mark
Copy link to clipboard
Copied
Thank you so much everyone for your replies, and sorry for the delay 🙂
I'm attaching a screenshot of the hand-drawn underlining on a text...
I really hope I can complete this project!
I'm not an InDesign expert, but I know for sure that it's the only software that can help me 🙂
Thank you so much
Copy link to clipboard
Copied
Okay @pino_2179 I don't think any of our options will work because Indesign cannot apply multiple coloured underlines to the same text so where the black and green overlaps is a problem.
We are going to have to think outside the box on this one. I have some ideas but they all involve scripting.
Copy link to clipboard
Copied
I don't know how to make a script, I used InDesign many years ago and I'm not a programmer 😞
Can you help me? What I'm asking is very complicated?
Copy link to clipboard
Copied
I *think* it's going to be a bit complicated, but hopefully I'm wrong and someone here will have some better ideas.
Meanwhile I'm going to try something as a proof of concept.
- Mark
Copy link to clipboard
Copied
Hi @pino_2179, I have made a proof-of-concept script that may might be a good way for you. So buckle up because I want you to come on a little journey with me...
We cannot do your job the normal way, using Indesign's normal underlining because Indesign cannot assign more than one underline to the same character. Your job requires runs of underlining starting and stopping on their own schedule, overlapping however they like. A corollary of that problem is that there is no convenient user interface for managing those wild runs of overlapping characters...
Or is there?
Well yes! There actually is—Conditional Text. Open the panel at menu Window > Type and Tables > Conditional Text. We can apply Conditions to text and they will overlap and we can see them quite well using either underlines or solid highlights (my preference). Keep reading to see a screenshot of this.
So we make a Condition "Underline Black" and "Underline Blue" etc. Then select some underline text and click "Underline Black" in the Conditional Text Panel. That is how—with my approach—you will decide what text gets underlined and in which color.
Then we make Object Styles also called "Underline Black" etc to match. These will be applied to the underline, where you can set stroke weight and colour, etc.
Once you have set all your underline conditions, then select one or more text frames and run my script below called "Generate Underlining.js". The script creates an underlying group for each text frame which contains the underlines, which are literally just drawn path items.
Have a look at these screen shots and also look at the attached .indd document if you like.
1. Some sample text.
2. After you've set the underline conditions. See how they overlap?
3. After running my script. The underlines are in a group (see layers panel).
4. Just so you can see what I mean—here are the underlines with text frames removed.
The good things:
And the bad things:
And here's the script. It's a fairly quick one, and there are many possible improvements, but for proof-of-concept I think it is pretty solid. Until someone comes up with a better approach anyway!
Let me know what you think. I know it's totally overwhelming if you haven't used Indesign for a long time!
- Mark
TO DOWNLOAD SCRIPT: Please see my Scripts for Adobe Indesign github repository and you can read about, and download, it there, but you can also download the script directly.
Copy link to clipboard
Copied
Congratulations!
You were spectacular!
What version of InDesign can I use to do this? I'm embarrassed to write this, but I currently have CS3 😮
How do I upload the script you created?
Thank you for your support; this work is for a good cause, and I'm really happy to be able to complete it with your help!
Pino
Copy link to clipboard
Copied
How do I upload the script you created?
By @pino_2179
Copy the full text of the script, paste it into a simple text editor - Notepad, TextEdit, etc. - and save it out as plain text, with the filename as specified: Generate Underlines.js
Move this file into InDesign's Scripts folder (go to the Scripts window in InDesign, select the 'User' folder, then right click and it should offer you the option to view that folder) and it should be ready for use. If not, you should only need to restart InDesign for it to be picked up.
Copy link to clipboard
Copied
Hi @pino_2179 according to ChatGPT, Conditional Text was introduced in Indesign CS4, so my script definitely won't work in CS3. Even in CS4 I have no idea if the script will work as other things in the scripting API may have changed—there have been 17 major versions released since then!
Sorry to pass on the bad news. Perhaps you could subscribe for a month or two to finish your project?
- Mark
Copy link to clipboard
Copied
This looks awesome! When I select object style it creates an outline around the text box, not under each individual line as I want it to look 😞
Copy link to clipboard
Copied
And sorry, also asks me that I don't have a "Blue underline".
I mainly just want to have a white highlight on a specific set of text and a lavender underline under it. Like the attached. But it would be HELL to do this manually! I have 225 pages lol.
Copy link to clipboard
Copied
Hi @Raffi35430004124r You need to configure the script for your document, such as settings which Object Styles you have set up for your different underlines.
However I don't think you need to go to that trouble. Perhaps you can just use Indesign's native underlining to achieve your effect. See the attached .indd.
- Mark
Copy link to clipboard
Copied
Hi m1b. I think maybe a bit more guidance would be useful because I still don't know how this works.
So, no. That's not what I'm trying to achieve. If you look at the screenshot there's one white underline in the whole text, I'm not looking to create a box around it, I would like the text to be underline to show the illustration under it.
Then, on top of the while underline, I'd like an additional thinner lavender underline.
Copy link to clipboard
Copied
I also don't use object style to create my underlines because they need to be specific to a chunk of text! Not the whole text frame. I use character styles!
Copy link to clipboard
Copied
[Quickly done just for fun!] Apparently, something as simplistic just using 2 char styles ("white" and "purple").
Note I've no idea about the op's layout.
(^/) The Jedi
Copy link to clipboard
Copied
"Note I've no idea about the op's layout."
Hi Michel,
well, the OP's layout is done in InDesign CS3.
FWIW: Back then feature Conditional Text was not there.
But:
"Underline" was possible.
"Strike Through" was possible.
Both could be combined easily with a character style.
"Custom Line Styles" were possible and used with both features from above.
And gaps in striped lines could be filled with color.
Should be enough for a mix of features to do what the OP wants to do.
Kind regards,
Uwe Laubender
( Adobe Community Expert )
Copy link to clipboard
Copied
Hi m1b, thanks again. I finally got a new Mac and installed a trial version of InDesign.
I was just starting to understand how to set up all the steps you kindly described.
Now I'd like to ask you an even greater favor, since I'm not an expert: would it be possible for you to record your screen while you perform the entire process? Unfortunately, I'm missing a few steps 😞 .
Thanks again, so much.
Copy link to clipboard
Copied
@m1bI'm waiting 🙂
Copy link to clipboard
Copied
Because you are not very familiar with Indesign, the quickest way is for you to share your document and I will set up the conditionals. Send me a PM (click on my name to access my profile). Don't share your document publicly here if it is sensitive.
- Mark
Copy link to clipboard
Copied
@m1b file sent
Find more inspiration, events, and resources on the new Adobe Community
Explore Now